在上篇博客成功搭建好hadoop集群后,现在简单完成一下,通过jdbc连接hadoop上的hive.

如题,java连接hive就是类似连接mysql与sqlserver数据库的jdbc方式。

就是两个步骤,加载加载驱动程序,获取与数据库的连接。

先来看下配置pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.example</groupId>
    <artifactId>hive</artifactId>
    <version>1.0-SNAPSHOT</version>
    <name>hive</name>
    <packaging>war</packaging>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.source>1.8</maven.compiler.source>
        <junit.version>5.8.2</junit.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>4.0.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.hive</groupId>
            <artifactId>hive-jdbc</artifactId>
            <version>1.1.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-common</artifactId>
            <version>2.6.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.hive</groupId>
            <artifactId>hive-exec</artifactId>
            <version>1.1.0</version>
        </dependency>


    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>3.3.2</version>
            </plugin>
        </plugins>
    </build>
</project>

maven的依赖与版本

java调用hive创建表 java hive jdbc_jar

 

 

 

java调用hive创建表 java hive jdbc_jar_02

 

 

 再来看代码

package com.example.hive.dbutils;

import java.sql.*;

public class HiveJDBC {
    private static String driverName = "org.apache.hive.jdbc.HiveDriver";

    private static String url = "jdbc:hive2://node1:10000/itheima";
    private static String user = "root";
    private static String password ="123456";
    private static String sql="";
    private static ResultSet res;

    private static Connection conn;
    public Connection getConnect(){
        try {
            Class.forName(driverName);
            conn = DriverManager.getConnection(url, user, password);
        }  catch (Exception e) {
            throw new RuntimeException(e);
        }
        return conn;
    }

    public static void main(String[] args) {
        HiveJDBC hiveJDBC = new HiveJDBC();
        hiveJDBC.getConnect();
        System.out.println(conn);
        String sql = "select * from t_archer";
        try {
            PreparedStatement preparedStatement = conn.prepareStatement(sql);
            res = preparedStatement.executeQuery();

            System.out.println(res);
            while (res.next()){
                System.out.println(123);
                System.out.println(res.getString("name")+res.getString("hp_max"));
            }
        } catch (SQLException e) {


        }
    }
}

分析代码:

驱动名的变化:

driverName = "org.apache.hive.jdbc.HiveDriver"
数据库链接地址:
"jdbc:hive2://node1:10000/itheima"
这里我使用node1:10000是因为我在C:\Windows\System32\drivers\etc\hosts中有如下配置:

java调用hive创建表 java hive jdbc_maven_03

 

 itheima就是数据库名,我们在node1:9870(就是hadoop集群web页面)可以看到数据库的位置

java调用hive创建表 java hive jdbc_maven_04

 

 在我的itheima.db数据库中有t_archer这张表,展示如下:

java调用hive创建表 java hive jdbc_java调用hive创建表_05

 

 表在hive存储的内容:

java调用hive创建表 java hive jdbc_jar_06

 

 就是这样存储的,很不直观,在DataGrip上看,就比较容易了

java调用hive创建表 java hive jdbc_hive_07

 

 最后看下程序运行的结果吧,主要就是输出获取的name和hp_max的值:

"C:\Program Files\Java\jdk1.8.0_333\bin\java.exe" "-javaagent:D:\IntelliJ IDEA 2022.1\lib\idea_rt.jar=15674:D:\IntelliJ IDEA 2022.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_333\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_333\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_333\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_333\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_333\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_333\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_333\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_333\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_333\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_333\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_333\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_333\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_333\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_333\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_333\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_333\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_333\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_333\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_333\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_333\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_333\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_333\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_333\jre\lib\rt.jar;D:\hiveproject\hive\target\classes;D:\JAVA\maven\repository\org\apache\hive\hive-jdbc\1.1.0\hive-jdbc-1.1.0.jar;D:\JAVA\maven\repository\org\apache\hive\hive-common\1.1.0\hive-common-1.1.0.jar;D:\JAVA\maven\repository\org\apache\hive\hive-service\1.1.0\hive-service-1.1.0.jar;D:\JAVA\maven\repository\net\sf\jpam\jpam\1.1\jpam-1.1.jar;D:\JAVA\maven\repository\org\eclipse\jetty\aggregate\jetty-all\7.6.0.v20120127\jetty-all-7.6.0.v20120127.jar;D:\JAVA\maven\repository\org\apache\geronimo\specs\geronimo-jta_1.1_spec\1.1.1\geronimo-jta_1.1_spec-1.1.1.jar;D:\JAVA\maven\repository\javax\mail\mail\1.4.1\mail-1.4.1.jar;D:\JAVA\maven\repository\javax\activation\activation\1.1\activation-1.1.jar;D:\JAVA\maven\repository\org\apache\geronimo\specs\geronimo-jaspic_1.0_spec\1.0\geronimo-jaspic_1.0_spec-1.0.jar;D:\JAVA\maven\repository\org\apache\geronimo\specs\geronimo-annotation_1.0_spec\1.1.1\geronimo-annotation_1.0_spec-1.1.1.jar;D:\JAVA\maven\repository\asm\asm-commons\3.1\asm-commons-3.1.jar;D:\JAVA\maven\repository\asm\asm-tree\3.1\asm-tree-3.1.jar;D:\JAVA\maven\repository\org\apache\hive\hive-serde\1.1.0\hive-serde-1.1.0.jar;D:\JAVA\maven\repository\net\sf\opencsv\opencsv\2.3\opencsv-2.3.jar;D:\JAVA\maven\repository\com\twitter\parquet-hadoop-bundle\1.6.0rc3\parquet-hadoop-bundle-1.6.0rc3.jar;D:\JAVA\maven\repository\org\apache\hive\hive-metastore\1.1.0\hive-metastore-1.1.0.jar;D:\JAVA\maven\repository\com\jolbox\bonecp\0.8.0.RELEASE\bonecp-0.8.0.RELEASE.jar;D:\JAVA\maven\repository\org\apache\derby\derby\10.11.1.1\derby-10.11.1.1.jar;D:\JAVA\maven\repository\org\datanucleus\datanucleus-api-jdo\3.2.6\datanucleus-api-jdo-3.2.6.jar;D:\JAVA\maven\repository\org\datanucleus\datanucleus-rdbms\3.2.9\datanucleus-rdbms-3.2.9.jar;D:\JAVA\maven\repository\commons-pool\commons-pool\1.5.4\commons-pool-1.5.4.jar;D:\JAVA\maven\repository\commons-dbcp\commons-dbcp\1.4\commons-dbcp-1.4.jar;D:\JAVA\maven\repository\javax\jdo\jdo-api\3.0.1\jdo-api-3.0.1.jar;D:\JAVA\maven\repository\javax\transaction\jta\1.1\jta-1.1.jar;D:\JAVA\maven\repository\org\apache\hive\hive-shims\1.1.0\hive-shims-1.1.0.jar;D:\JAVA\maven\repository\org\apache\hive\shims\hive-shims-common\1.1.0\hive-shims-common-1.1.0.jar;D:\JAVA\maven\repository\org\apache\hive\shims\hive-shims-0.20S\1.1.0\hive-shims-0.20S-1.1.0.jar;D:\JAVA\maven\repository\org\apache\hive\shims\hive-shims-0.23\1.1.0\hive-shims-0.23-1.1.0.jar;D:\JAVA\maven\repository\org\apache\hadoop\hadoop-yarn-server-resourcemanager\2.6.0\hadoop-yarn-server-resourcemanager-2.6.0.jar;D:\JAVA\maven\repository\com\google\inject\extensions\guice-servlet\3.0\guice-servlet-3.0.jar;D:\JAVA\maven\repository\com\google\inject\guice\3.0\guice-3.0.jar;D:\JAVA\maven\repository\javax\inject\javax.inject\1\javax.inject-1.jar;D:\JAVA\maven\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;D:\JAVA\maven\repository\com\sun\jersey\contribs\jersey-guice\1.9\jersey-guice-1.9.jar;D:\JAVA\maven\repository\org\apache\hadoop\hadoop-yarn-common\2.6.0\hadoop-yarn-common-2.6.0.jar;D:\JAVA\maven\repository\org\apache\hadoop\hadoop-yarn-api\2.6.0\hadoop-yarn-api-2.6.0.jar;D:\JAVA\maven\repository\com\sun\jersey\jersey-client\1.9\jersey-client-1.9.jar;D:\JAVA\maven\repository\org\apache\hadoop\hadoop-yarn-server-common\2.6.0\hadoop-yarn-server-common-2.6.0.jar;D:\JAVA\maven\repository\org\fusesource\leveldbjni\leveldbjni-all\1.8\leveldbjni-all-1.8.jar;D:\JAVA\maven\repository\org\apache\hadoop\hadoop-yarn-server-applicationhistoryservice\2.6.0\hadoop-yarn-server-applicationhistoryservice-2.6.0.jar;D:\JAVA\maven\repository\org\apache\hadoop\hadoop-yarn-server-web-proxy\2.6.0\hadoop-yarn-server-web-proxy-2.6.0.jar;D:\JAVA\maven\repository\org\apache\hive\shims\hive-shims-scheduler\1.1.0\hive-shims-scheduler-1.1.0.jar;D:\JAVA\maven\repository\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar;D:\JAVA\maven\repository\org\apache\httpcomponents\httpclient\4.2.5\httpclient-4.2.5.jar;D:\JAVA\maven\repository\org\apache\httpcomponents\httpcore\4.2.5\httpcore-4.2.5.jar;D:\JAVA\maven\repository\org\apache\thrift\libthrift\0.9.2\libthrift-0.9.2.jar;D:\JAVA\maven\repository\org\apache\zookeeper\zookeeper\3.4.6\zookeeper-3.4.6.jar;D:\JAVA\maven\repository\io\netty\netty\3.7.0.Final\netty-3.7.0.Final.jar;D:\JAVA\maven\repository\org\apache\curator\curator-framework\2.6.0\curator-framework-2.6.0.jar;D:\JAVA\maven\repository\org\slf4j\slf4j-api\1.7.5\slf4j-api-1.7.5.jar;D:\JAVA\maven\repository\org\slf4j\slf4j-log4j12\1.7.5\slf4j-log4j12-1.7.5.jar;D:\JAVA\maven\repository\org\apache\hadoop\hadoop-common\2.6.0\hadoop-common-2.6.0.jar;D:\JAVA\maven\repository\org\apache\hadoop\hadoop-annotations\2.6.0\hadoop-annotations-2.6.0.jar;C:\Program Files\Java\jdk1.8.0_333\lib\tools.jar;D:\JAVA\maven\repository\com\google\guava\guava\11.0.2\guava-11.0.2.jar;D:\JAVA\maven\repository\commons-cli\commons-cli\1.2\commons-cli-1.2.jar;D:\JAVA\maven\repository\org\apache\commons\commons-math3\3.1.1\commons-math3-3.1.1.jar;D:\JAVA\maven\repository\xmlenc\xmlenc\0.52\xmlenc-0.52.jar;D:\JAVA\maven\repository\commons-httpclient\commons-httpclient\3.1\commons-httpclient-3.1.jar;D:\JAVA\maven\repository\commons-codec\commons-codec\1.4\commons-codec-1.4.jar;D:\JAVA\maven\repository\commons-io\commons-io\2.4\commons-io-2.4.jar;D:\JAVA\maven\repository\commons-net\commons-net\3.1\commons-net-3.1.jar;D:\JAVA\maven\repository\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar;D:\JAVA\maven\repository\javax\servlet\servlet-api\2.5\servlet-api-2.5.jar;D:\JAVA\maven\repository\org\mortbay\jetty\jetty\6.1.26\jetty-6.1.26.jar;D:\JAVA\maven\repository\org\mortbay\jetty\jetty-util\6.1.26\jetty-util-6.1.26.jar;D:\JAVA\maven\repository\com\sun\jersey\jersey-core\1.9\jersey-core-1.9.jar;D:\JAVA\maven\repository\com\sun\jersey\jersey-json\1.9\jersey-json-1.9.jar;D:\JAVA\maven\repository\org\codehaus\jettison\jettison\1.1\jettison-1.1.jar;D:\JAVA\maven\repository\com\sun\xml\bind\jaxb-impl\2.2.3-1\jaxb-impl-2.2.3-1.jar;D:\JAVA\maven\repository\javax\xml\bind\jaxb-api\2.2.2\jaxb-api-2.2.2.jar;D:\JAVA\maven\repository\javax\xml\stream\stax-api\1.0-2\stax-api-1.0-2.jar;D:\JAVA\maven\repository\org\codehaus\jackson\jackson-jaxrs\1.8.3\jackson-jaxrs-1.8.3.jar;D:\JAVA\maven\repository\org\codehaus\jackson\jackson-xc\1.8.3\jackson-xc-1.8.3.jar;D:\JAVA\maven\repository\com\sun\jersey\jersey-server\1.9\jersey-server-1.9.jar;D:\JAVA\maven\repository\asm\asm\3.1\asm-3.1.jar;D:\JAVA\maven\repository\tomcat\jasper-compiler\5.5.23\jasper-compiler-5.5.23.jar;D:\JAVA\maven\repository\tomcat\jasper-runtime\5.5.23\jasper-runtime-5.5.23.jar;D:\JAVA\maven\repository\javax\servlet\jsp\jsp-api\2.1\jsp-api-2.1.jar;D:\JAVA\maven\repository\commons-el\commons-el\1.0\commons-el-1.0.jar;D:\JAVA\maven\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar;D:\JAVA\maven\repository\net\java\dev\jets3t\jets3t\0.9.0\jets3t-0.9.0.jar;D:\JAVA\maven\repository\com\jamesmurty\utils\java-xmlbuilder\0.4\java-xmlbuilder-0.4.jar;D:\JAVA\maven\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;D:\JAVA\maven\repository\commons-configuration\commons-configuration\1.6\commons-configuration-1.6.jar;D:\JAVA\maven\repository\commons-digester\commons-digester\1.8\commons-digester-1.8.jar;D:\JAVA\maven\repository\commons-beanutils\commons-beanutils\1.7.0\commons-beanutils-1.7.0.jar;D:\JAVA\maven\repository\commons-beanutils\commons-beanutils-core\1.8.0\commons-beanutils-core-1.8.0.jar;D:\JAVA\maven\repository\org\codehaus\jackson\jackson-core-asl\1.9.13\jackson-core-asl-1.9.13.jar;D:\JAVA\maven\repository\org\codehaus\jackson\jackson-mapper-asl\1.9.13\jackson-mapper-asl-1.9.13.jar;D:\JAVA\maven\repository\org\apache\avro\avro\1.7.4\avro-1.7.4.jar;D:\JAVA\maven\repository\com\thoughtworks\paranamer\paranamer\2.3\paranamer-2.3.jar;D:\JAVA\maven\repository\org\xerial\snappy\snappy-java\1.0.4.1\snappy-java-1.0.4.1.jar;D:\JAVA\maven\repository\com\google\protobuf\protobuf-java\2.5.0\protobuf-java-2.5.0.jar;D:\JAVA\maven\repository\com\google\code\gson\gson\2.2.4\gson-2.2.4.jar;D:\JAVA\maven\repository\org\apache\hadoop\hadoop-auth\2.6.0\hadoop-auth-2.6.0.jar;D:\JAVA\maven\repository\org\apache\directory\server\apacheds-kerberos-codec\2.0.0-M15\apacheds-kerberos-codec-2.0.0-M15.jar;D:\JAVA\maven\repository\org\apache\directory\server\apacheds-i18n\2.0.0-M15\apacheds-i18n-2.0.0-M15.jar;D:\JAVA\maven\repository\org\apache\directory\api\api-asn1-api\1.0.0-M20\api-asn1-api-1.0.0-M20.jar;D:\JAVA\maven\repository\org\apache\directory\api\api-util\1.0.0-M20\api-util-1.0.0-M20.jar;D:\JAVA\maven\repository\com\jcraft\jsch\0.1.42\jsch-0.1.42.jar;D:\JAVA\maven\repository\org\apache\curator\curator-client\2.6.0\curator-client-2.6.0.jar;D:\JAVA\maven\repository\org\apache\curator\curator-recipes\2.6.0\curator-recipes-2.6.0.jar;D:\JAVA\maven\repository\com\google\code\findbugs\jsr305\1.3.9\jsr305-1.3.9.jar;D:\JAVA\maven\repository\org\htrace\htrace-core\3.0.4\htrace-core-3.0.4.jar;D:\JAVA\maven\repository\org\apache\commons\commons-compress\1.4.1\commons-compress-1.4.1.jar;D:\JAVA\maven\repository\org\tukaani\xz\1.0\xz-1.0.jar;D:\JAVA\maven\repository\org\apache\hive\hive-exec\1.1.0\hive-exec-1.1.0.jar;D:\JAVA\maven\repository\org\apache\hive\hive-ant\1.1.0\hive-ant-1.1.0.jar;D:\JAVA\maven\repository\org\apache\velocity\velocity\1.5\velocity-1.5.jar;D:\JAVA\maven\repository\oro\oro\2.0.8\oro-2.0.8.jar;D:\JAVA\maven\repository\log4j\apache-log4j-extras\1.2.17\apache-log4j-extras-1.2.17.jar;D:\JAVA\maven\repository\org\antlr\antlr-runtime\3.4\antlr-runtime-3.4.jar;D:\JAVA\maven\repository\org\antlr\stringtemplate\3.2.1\stringtemplate-3.2.1.jar;D:\JAVA\maven\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;D:\JAVA\maven\repository\org\antlr\ST4\4.0.4\ST4-4.0.4.jar;D:\JAVA\maven\repository\org\apache\ant\ant\1.9.1\ant-1.9.1.jar;D:\JAVA\maven\repository\org\apache\ant\ant-launcher\1.9.1\ant-launcher-1.9.1.jar;D:\JAVA\maven\repository\org\apache\thrift\libfb303\0.9.2\libfb303-0.9.2.jar;D:\JAVA\maven\repository\org\codehaus\groovy\groovy-all\2.1.6\groovy-all-2.1.6.jar;D:\JAVA\maven\repository\org\datanucleus\datanucleus-core\3.2.10\datanucleus-core-3.2.10.jar;D:\JAVA\maven\repository\org\apache\calcite\calcite-core\1.0.0-incubating\calcite-core-1.0.0-incubating.jar;D:\JAVA\maven\repository\org\apache\calcite\calcite-linq4j\1.0.0-incubating\calcite-linq4j-1.0.0-incubating.jar;D:\JAVA\maven\repository\org\pentaho\pentaho-aggdesigner-algorithm\5.1.5-jhyde\pentaho-aggdesigner-algorithm-5.1.5-jhyde.jar;D:\JAVA\maven\repository\eigenbase\eigenbase-properties\1.1.4\eigenbase-properties-1.1.4.jar;D:\JAVA\maven\repository\org\codehaus\janino\janino\2.7.6\janino-2.7.6.jar;D:\JAVA\maven\repository\org\codehaus\janino\commons-compiler\2.7.6\commons-compiler-2.7.6.jar;D:\JAVA\maven\repository\org\apache\calcite\calcite-avatica\1.0.0-incubating\calcite-avatica-1.0.0-incubating.jar;D:\JAVA\maven\repository\stax\stax-api\1.0.1\stax-api-1.0.1.jar;D:\JAVA\maven\repository\jline\jline\2.12\jline-2.12.jar" com.example.hive.dbutils.HiveJDBC
22/09/18 18:37:32 INFO jdbc.Utils: Supplied authorities: node1:10000
22/09/18 18:37:32 INFO jdbc.Utils: Resolved authority: node1:10000
22/09/18 18:37:32 INFO jdbc.HiveConnection: Will try to open client transport with JDBC Uri: jdbc:hive2://node1:10000/itheima
22/09/18 18:37:32 DEBUG transport.TSaslTransport: opening transport org.apache.thrift.transport.TSaslClientTransport@51efea79
22/09/18 18:37:32 DEBUG transport.TSaslClientTransport: Sending mechanism name PLAIN and initial response of length 12
22/09/18 18:37:32 DEBUG transport.TSaslTransport: CLIENT: Writing message with status START and payload length 5
22/09/18 18:37:32 DEBUG transport.TSaslTransport: CLIENT: Writing message with status COMPLETE and payload length 12
22/09/18 18:37:32 DEBUG transport.TSaslTransport: CLIENT: Start message handled
22/09/18 18:37:32 DEBUG transport.TSaslTransport: CLIENT: Main negotiation loop complete
22/09/18 18:37:32 DEBUG transport.TSaslTransport: CLIENT: SASL Client receiving last message
22/09/18 18:37:32 DEBUG transport.TSaslTransport: CLIENT: Received message with status COMPLETE and payload length 0
22/09/18 18:37:33 DEBUG transport.TSaslTransport: writing data length: 71
22/09/18 18:37:33 DEBUG transport.TSaslTransport: CLIENT: reading data length: 169
org.apache.hive.jdbc.HiveConnection@13805618
22/09/18 18:37:33 DEBUG transport.TSaslTransport: writing data length: 129
22/09/18 18:37:33 DEBUG transport.TSaslTransport: CLIENT: reading data length: 109
22/09/18 18:37:33 DEBUG transport.TSaslTransport: writing data length: 100
22/09/18 18:37:33 DEBUG transport.TSaslTransport: CLIENT: reading data length: 144
22/09/18 18:37:33 DEBUG transport.TSaslTransport: writing data length: 102
22/09/18 18:37:33 DEBUG transport.TSaslTransport: CLIENT: reading data length: 563
org.apache.hive.jdbc.HiveQueryResultSet@6043cd28
22/09/18 18:37:33 DEBUG transport.TSaslTransport: writing data length: 112
22/09/18 18:37:34 DEBUG transport.TSaslTransport: CLIENT: reading data length: 866
22/09/18 18:37:34 DEBUG jdbc.HiveQueryResultSet: Fetched row string: 
123
后羿5986
22/09/18 18:37:34 DEBUG jdbc.HiveQueryResultSet: Fetched row string: 
123
马可波罗5584
22/09/18 18:37:34 DEBUG jdbc.HiveQueryResultSet: Fetched row string: 
123
鲁班七号5989
22/09/18 18:37:34 DEBUG jdbc.HiveQueryResultSet: Fetched row string: 
123
李元芳5725
22/09/18 18:37:34 DEBUG jdbc.HiveQueryResultSet: Fetched row string: 
123
孙尚香6014
22/09/18 18:37:34 DEBUG jdbc.HiveQueryResultSet: Fetched row string: 
123
黄忠5898
22/09/18 18:37:34 DEBUG jdbc.HiveQueryResultSet: Fetched row string: 
123
狄仁杰5710
22/09/18 18:37:34 DEBUG jdbc.HiveQueryResultSet: Fetched row string: 
123
虞姬5669
22/09/18 18:37:34 DEBUG jdbc.HiveQueryResultSet: Fetched row string: 
123
成吉思汗5799
22/09/18 18:37:34 DEBUG jdbc.HiveQueryResultSet: Fetched row string: 
123
百里守约5611
22/09/18 18:37:34 DEBUG transport.TSaslTransport: writing data length: 112
22/09/18 18:37:34 DEBUG transport.TSaslTransport: CLIENT: reading data length: 264

进程已结束,退出代码0