【问题标题】:Loading data into HBASE using importtsv causes error使用 importtsv 将数据加载到 HBASE 会导致错误
【发布时间】:2014-08-11 07:46:13
【问题描述】:

我正在尝试使用 importtsv 工具将数据从 CSV 文件加载到 HBASE。我已经建立了一个由 3 台机器组成的集群。 这是我的 hbase-site.xml 文件

<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://ec2-54-190-103-64.us-west-2.compute.amazonaws.com:9000/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
 <property>
   <name>hbase.zookeeper.quorum</name>
   <value>ec2-54-203-95-235.us-west-2.compute.amazonaws.com</value>
  </property>
 <property>
    <name>dfs.replication</name>
    <value>1</value>
  </property>

  <property>
      <name>hbase.zookeeper.property.clientPort</name>
      <value>2222</value>
   </property>
   <property>
   <name>hbase.zookeeper.property.dataDir</name>
   <value>/home/ubuntu/zookeeper</value>
   <description>Property from ZooKeeper's config zoo.cfg.
   The directory where the snapshot is stored.
    </description>
 </property>
 </configuration>

当我启动并运行 jps。在主节点下,我看到 HMaster,在数据节点下,我看到 Hquorumpeer 和 Hregionserver 当我尝试加载数据时出现以下错误

INFO zookeeper.ClientCnxn: Opening socket connection to server       localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
 14/08/11 07:41:28 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:739)
    at   org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068)
   14/08/11 07:41:28 WARN zookeeper.RecoverableZooKeeper: Possibly transient   ZooKeeper    exception: org.apache.zookeeper.KeeperException$ConnectionLossException:    KeeperErrorCode = ConnectionLoss for /hbase
 14/08/11 07:41:28 INFO util.RetryCounter: Sleeping 8000ms before retry #3...
  14/08/11 07:41:29 INFO zookeeper.ClientCnxn: Opening socket connection to server   localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)

不确定 zookeeper 有什么问题。提前致谢

【问题讨论】:

    标签: hadoop hbase apache-zookeeper


    【解决方案1】:

    您需要在您的 hbase-site.xml 文件中添加以下属性(master 和 slave)

    <property>
     <name>hbase.zookeeper.property.maxClientCnxns</name>
     <value>1000</value>
    </property>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-12-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多