rhive.connect()线程错误

hxzsmxv2  于 2021-06-03  发布在  Hadoop
关注(0)|答案(0)|浏览(214)

当我打开r,

library(Rserve) Rserve(args="--no-save")  

Sys.setenv(HADOOP_HOME="/home/hadoop/hadoop-1.2.1")

Sys.setenv(HIVE_HOME="/usr/local/hive")

library(RHive)

rhive.connect()

我得到以下错误和连接失败。请帮帮我。

Warning: 
    +----------------------------------------------------------+
    + / hiveServer2 argument has not been provided correctly.  +
    + / RHive will use a default value: hiveServer2=TRUE.      +
    +----------------------------------------------------------+

Exception in thread "Thread-10" java.lang.RuntimeException: java.sql.SQLException: Could not open connection to jdbc:hive2://127.0.0.1:10000/default: java.net.SocketException: Connection reset
    at com.nexr.rhive.hive.HiveJdbcClient$HiveJdbcConnector.connect(HiveJdbcClient.java:337)
    at com.nexr.rhive.hive.HiveJdbcClient$HiveJdbcConnector.run(HiveJdbcClient.java:322)
Caused by: java.sql.SQLException: Could not open connection to jdbc:hive2://127.0.0.1:10000/default: java.net.SocketException: Connection reset
    at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:206)
    at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:178)
    at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    at java.sql.DriverManager.getConnection(DriverManager.java:185)
    at com.nexr.rhive.hive.DatabaseConnection.connect(DatabaseConnection.java:51)
    at com.nexr.rhive.hive.HiveJdbcClient$HiveJdbcConnector.connect(HiveJdbcClient.java:330)
    ... 1 more
Caused by: org.apache.thrift.transport.TTransportException: java.net.SocketException: Connection reset
    at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:129)
    at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
    at org.apache.thrift.transport.TSaslTransport.receiveSaslMessage(TSaslTransport.java:178)
    at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:288)
    at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37)
    at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:203)
    ... 7 more
Caused by: java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:168)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
    at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:127)
    ... 12 more
Error: java.lang.IllegalStateException: Not connected to hiveserver

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题