我正在尝试使用spark 2.2.3读取phoenix表,因此我将此依赖项添加到build.sbt:
"org.apache.phoenix" % "phoenix-spark" % "4.14.3-HBase-1.4"
我在代码中创建一个Dataframe,如下所示:
val df = spark.sqlContext
.read
.format("org.apache.phoenix.spark")
.option("table", "TEST.MY_TABLE")
.option("zkUrl", "myhost:2181:/hbase-secure:my_user@DEV-REALM.COMPANY.COM")
.load
df.show
但我有以下问题:
14:37:12.760 [main-SendThread(ip:2181)] INFO org.apache.zookeeper.ClientCnxn - Opening socket connection to server ip1/ip2:2181. Will not attempt to authenticate using SASL (unknown error)
14:38:42.736 [main-SendThread(ip:2181)] WARN org.apache.zookeeper.ClientCnxn - Client session timed out, have not heard from server in 90090ms for sessionid 0x0
14:38:42.736 [main-SendThread(ip:2181)] INFO org.apache.zookeeper.ClientCnxn - Client session timed out, have not heard from server in 90090ms for sessionid 0x0, closing socket connection and attempting reconnect
14:38:42.737 [main-SendThread(ip:2181)] DEBUG o.a.zookeeper.ClientCnxnSocketNIO - Ignoring exception during shutdown input
java.net.SocketException: Socket is not connected
at sun.nio.ch.Net.translateToSocketException(Net.java:122) ~[na:1.8.0_261]
at sun.nio.ch.Net.translateException(Net.java:156) ~[na:1.8.0_261]
at sun.nio.ch.Net.translateException(Net.java:162) ~[na:1.8.0_261]
at sun.nio.ch.SocketAdaptor.shutdownInput(SocketAdaptor.java:401) ~[na:1.8.0_261]
at org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:200) ~[zookeeper-3.4.10.jar:3.4.10-39d3a4f269333c922ed3db283be479f9deacaa0f]
at org.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:1246) [zookeeper-3.4.10.jar:3.4.10-39d3a4f269333c922ed3db283be479f9deacaa0f]
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1170) [zookeeper-3.4.10.jar:3.4.10-39d3a4f269333c922ed3db283be479f9deacaa0f]
Caused by: java.nio.channels.NotYetConnectedException: null
at sun.nio.ch.SocketChannelImpl.shutdownInput(SocketChannelImpl.java:780) ~[na:1.8.0_261]
at sun.nio.ch.SocketAdaptor.shutdownInput(SocketAdaptor.java:399) ~[na:1.8.0_261]
... 3 common frames omitted
你知道吗?谢谢
暂无答案!
目前还没有任何答案,快来回答吧!