rhive.connect()线程错误

时间:2014-07-15 01:45:56

标签: java multithreading hadoop hive

当我打开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

0 个答案:

没有答案