Skip to content

Commit 1925a3b

Browse files
authored
Merge pull request #78591 from dagiro/freshness109
freshness109
2 parents 82baf7d + 1ca7d5a commit 1925a3b

File tree

1 file changed

+9
-18
lines changed

1 file changed

+9
-18
lines changed

articles/hdinsight/hadoop/apache-hadoop-connect-hive-jdbc-driver.md

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ ms.reviewer: jasonh
77
ms.service: hdinsight
88
ms.custom: hdinsightactive,hdiseo17may2017
99
ms.topic: conceptual
10-
ms.date: 02/14/2019
10+
ms.date: 06/03/2019
1111
ms.author: hrasheed
12-
1312
---
13+
1414
# Query Apache Hive through the JDBC driver in HDInsight
1515

1616
[!INCLUDE [ODBC-JDBC-selector](../../../includes/hdinsight-selector-odbc-jdbc.md)]
@@ -25,7 +25,6 @@ For more information on the Hive JDBC Interface, see [HiveJDBCInterface](https:/
2525
* The [Java Developer Kit (JDK) version 11](https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads-5066655.html) or higher.
2626
* [SQuirreL SQL](http://squirrel-sql.sourceforge.net/). SQuirreL is a JDBC client application.
2727

28-
2928
## JDBC connection string
3029

3130
JDBC connections to an HDInsight cluster on Azure are made over port 443, and the traffic is secured using SSL. The public gateway that the clusters sit behind redirects the traffic to the port that HiveServer2 is actually listening on. The following connection string shows the format to use for HDInsight:
@@ -50,20 +49,12 @@ SQuirreL SQL is a JDBC client that can be used to remotely run Hive queries with
5049

5150
1. Create a directory to contain certain files to be copied from your cluster.
5251

53-
2. In the following script, replace `sshuser` with the SSH user account name for the cluster. Replace `CLUSTERNAME` with the HDInsight cluster name. From a command line, enter the following command to copy files from an HDInsight cluster:
54-
55-
```bash
56-
scp [email protected]:/usr/hdp/current/hadoop-client/hadoop-auth.jar .
57-
scp [email protected]:/usr/hdp/current/hadoop-client/hadoop-common.jar .
58-
scp [email protected]:/usr/hdp/current/hadoop-client/lib/log4j-*.jar .
59-
scp [email protected]:/usr/hdp/current/hadoop-client/lib/slf4j-*.jar .
60-
scp [email protected]:/usr/hdp/current/hive-client/lib/commons-codec*.jar .
61-
scp [email protected]:/usr/hdp/current/hive-client/lib/commons-logging-*.jar .
62-
scp [email protected]:/usr/hdp/current/hive-client/lib/hive-*-1.2*.jar .
63-
scp [email protected]:/usr/hdp/current/hive-client/lib/httpclient-*.jar .
64-
scp [email protected]:/usr/hdp/current/hive-client/lib/httpcore-*.jar .
65-
scp [email protected]:/usr/hdp/current/hive-client/lib/libfb*.jar .
66-
scp [email protected]:/usr/hdp/current/hive-client/lib/libthrift-*.jar .
52+
2. In the following script, replace `sshuser` with the SSH user account name for the cluster. Replace `CLUSTERNAME` with the HDInsight cluster name. From a command line, change your work directory to the one created in the prior step, and then enter the following command to copy files from an HDInsight cluster:
53+
54+
```cmd
55+
scp [email protected]:/usr/hdp/current/hadoop-client/{hadoop-auth.jar,hadoop-common.jar,lib/log4j-*.jar,lib/slf4j-*.jar} .
56+
57+
scp [email protected]:/usr/hdp/current/hive-client/lib/{commons-codec*.jar,commons-logging-*.jar,hive-*-1.2*.jar,httpclient-*.jar,httpcore-*.jar,libfb*.jar,libthrift-*.jar} .
6758
```
6859
6960
3. Start the SQuirreL SQL application. From the left of the window, select **Drivers**.
@@ -78,7 +69,7 @@ SQuirreL SQL is a JDBC client that can be used to remotely run Hive queries with
7869
7970
* **Name**: Hive
8071
* **Example URL**: `jdbc:hive2://localhost:443/default;transportMode=http;ssl=true;httpPath=/hive2`
81-
* **Extra Class Path**: Use the Add button to add the all of jar files downloaded earlier
72+
* **Extra Class Path**: Use the **Add** button to add the all of jar files downloaded earlier
8273
* **Class Name**: org.apache.hive.jdbc.HiveDriver
8374
8475
![add driver dialog](./media/apache-hadoop-connect-hive-jdbc-driver/adddriver.png)

0 commit comments

Comments
 (0)