小编fra*_*zzi的帖子

在Amazon EMR上使用java中的hbase时出现问题

所以我试图使用自定义jar在Amazon ec2上查询我的hbase集群,我将其作为MapReduce步骤启动.我的jar(在map函数内)我将Hbase称为:

public void map( Text key, BytesWritable value, Context contex ) throws IOException, InterruptedException {
    Configuration conf = HBaseConfiguration.create();
    HTable table = new HTable(conf, "tablename");
      ...
Run Code Online (Sandbox Code Playgroud)

问题是,当它到达HTable线并尝试连接到hbase时,步骤失败,我得到以下错误:

2014-02-28 18:00:49,936 INFO [main] org.apache.zookeeper.ZooKeeper: Initiating client connection, connectString=localhost:2181 sessionTimeout=180000 watcher=hconnection
2014-02-28 18:00:49,974 INFO [main] org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper: The identifier of this process is 5119@ip-10-0-35-130.ec2.internal
2014-02-28 18:00:49,998 INFO [main-SendThread(localhost:2181)] org.apache.zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
2014-02-28 18:00:50,005 WARN [main-SendThread(localhost:2181)] org.apache.zookeeper.ClientCnxn: Session 0x0 for server …
Run Code Online (Sandbox Code Playgroud)

hadoop hbase amazon-web-services elastic-map-reduce apache-zookeeper

5
推荐指数
1
解决办法
2010
查看次数