无法在Hive 3.1.2中连接Hiveserver2

时间:2019-12-23 07:03:10

标签: mysql hive hive-metastore

Hadoop 3.0 Hive 3.1.2

嵌入式模式:-

jdbc:hive2://通过使用它,我可以在Beeline中连接蜂巢

已连接到:Apache Hive(版本3.1.2) 驱动程序:Hive JDBC(版本3.1.2) 事务隔离:TRANSACTION_REPEATABLE_READ 0: jdbc:hive2://>使用零售; 好 没有受影响的行(2.168秒)

但是当我使用URL jdbc:hive2 // localhost:10000连接时,我无法在Beeline中连接蜂巢。

错误消息:

直线>!connect jdbc:hive2:// localhost:10000 连接到jdbc:hive2:// localhost:10000 输入jdbc:hive2:// localhost:10000的用户名:hiveuser 输入jdbc:hive2:// localhost:10000的密码:**************** 19/12/23 01:09:31 [main]:WARN jdbc.HiveConnection:无法连接到本地主机:10000 无法打开与HS2服务器的连接。请检查服务器URI,如果URI正确,请要求管理员检查服务器状态。 错误:无法使用JDBC Uri打开客户端传输:jdbc:hive2:// localhost:10000:java.net.ConnectException:连接被拒绝(连接被拒绝)(状态= 08S01,代码= 0)

hive-site.xml中的

属性:

<property>
    <name>hive.server2.transport.mode</name>
    <value>binary</value>
    <description>
      Expects one of [binary, http].
      Transport mode of HiveServer2.
    </description>
  </property>
  <property>
    <name>hive.server2.thrift.bind.host</name>
    <value>localhost<value/>
    <description>Bind host on which to run the HiveServer2 Thrift service.</description>
  </property>
  <property>
    <name>hive.server2.thrift.http.port</name>
    <value>10001</value>
    <description>Port number of HiveServer2 Thrift interface when hive.server2.transport.mode is 'http'.</description>
  </property>
  <property>
    <name>hive.server2.thrift.http.path</name>
    <value>cliservice</value>
    <description>Path component of URL endpoint when in HTTP mode.</description>
  </property>
  <property>
    <name>hive.server2.thrift.http.min.worker.threads</name>
    <value>5</value>
    <description>Minimum number of worker threads when in HTTP mode.</description>
  </property>
  <property>
    <name>hive.server2.thrift.http.max.worker.threads</name>
    <value>500</value>
    <description>Maximum number of worker threads when in HTTP mode.</description>
  </property>
  <property>
    <name>hive.server2.thrift.http.max.idle.time</name>
    <value>1800s</value>
    <description>
      Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is msec if not specified.
      Maximum idle time for a connection on the server when in HTTP mode.
    </description>
  </property>
  <property>
    <name>hive.server2.thrift.http.worker.keepalive.time</name>
    <value>60s</value>
    <description>
      Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is sec if not specified.
      Keepalive time for an idle http worker thread. When the number of workers exceeds min workers, excessive threads are killed after this time interval.
    </description>
  </property>
  <property>
    <name>hive.server2.thrift.port</name>
    <value>10000</value>
    <description>Port number of HiveServer2 Thrift interface when hive.server2.transport.mode is 'binary'.</description>
  </property>

有人在这方面帮助我

0 个答案:

没有答案