我正在尝试使用sqoop import导入HBASE表。作为其中的一部分,我将需要使用hbase-site.xml提供HBASE特定参数。没有参数允许在sqoop导入上提供此参数。如何指定导入?它是在命令行(HBASE_CONF_DIR等)上提供的参数。 HDP是使用的平台。
Edits- SQOOP Command。请注意,我的HBASE位于不同的群集中,与我运行此群集的位置不同。
sqoop --options-file my_db_opts.txt --query "SELECT SYSDATE FROM DUAL" --hbase-row-key "SYSDATE" --hbase-table "MASTER_2" --column-family "0" --hbase-create-table -m 1
和例外
17/08/13 14:58:19 WARN zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper, quorum=localhost:2181, exception=org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase
17/08/13 14:58:20 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
17/08/13 14:58:20 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1125)