我正在尝试连接到远程HBase集群以检索数据,但客户端在同一个地方连续挂起:
15/02/11 11:32:58 INFO zookeeper.ZooKeeper: Client environment:zookeeper.version=3.4.5-1392090, built on 09/30/2012 17:52 GMT
15/02/11 11:32:58 INFO zookeeper.ZooKeeper: Client environment:host.name=rap-es-1.hidden.host.com
15/02/11 11:32:58 INFO zookeeper.ZooKeeper: Client environment:java.version=1.7.0_75
15/02/11 11:32:58 INFO zookeeper.ZooKeeper: Client environment:java.vendor=Oracle Corporation
15/02/11 11:32:58 INFO zookeeper.ZooKeeper: Client environment:java.home=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75.x86_64/jre
15/02/11 11:32:58 INFO zookeeper.ZooKeeper: Client environment:java.class.path=CassandraBulkTest-1.0-SNAPSHOT.jar
15/02/11 11:32:58 INFO zookeeper.ZooKeeper: Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
15/02/11 11:32:58 INFO zookeeper.ZooKeeper: Client environment:java.io.tmpdir=/tmp
15/02/11 11:32:58 INFO zookeeper.ZooKeeper: Client environment:java.compiler=<NA>
15/02/11 11:32:58 INFO zookeeper.ZooKeeper: Client environment:os.name=Linux
15/02/11 11:32:58 INFO zookeeper.ZooKeeper: Client environment:os.arch=amd64
15/02/11 11:32:58 INFO zookeeper.ZooKeeper: Client environment:os.version=2.6.32-431.20.3.el6.x86_64
15/02/11 11:32:58 INFO zookeeper.ZooKeeper: Client environment:user.name=root
15/02/11 11:32:58 INFO zookeeper.ZooKeeper: Client environment:user.home=/root
15/02/11 11:32:58 INFO zookeeper.ZooKeeper: Client environment:user.dir=/data/cassandra-import
15/02/11 11:32:58 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=rap-cdh-1.hidden.host.com:2181 sessionTimeout=180000 watcher=hconnection
15/02/11 11:32:58 INFO zookeeper.RecoverableZooKeeper: The identifier of this process is 7831@rap-es-1.hidden.host.com
15/02/11 11:32:58 INFO zookeeper.ClientCnxn: Opening socket connection to server rap-cdh-1.hidden.host.com/141.161.88.163:2181. Will not attempt to authenticate using SASL (unknown error)
15/02/11 11:32:58 INFO zookeeper.ClientCnxn: Socket connection established to rap-cdh-1.hidden.host.com/141.161.88.163:2181, initiating session
15/02/11 11:32:58 INFO zookeeper.ClientCnxn: Session establishment complete on server rap-cdh-1.hidden.host.com/141.161.88.163:2181, sessionid = 0x14764e5eb66024b, negotiated timeout = 60000
我已经读完了,听起来它应该是客户端/服务器版本之间的差异,但我检查了我的版本:
-sh-4.1$ hbase version
15/02/11 11:38:16 INFO util.VersionInfo: HBase 0.94.6-cdh4.3.0
15/02/11 11:38:16 INFO util.VersionInfo: Subversion file:///data/1/jenkins/workspace/generic-package-rhel64-6-0/topdir/BUILD/hbase-0.94.6-cdh4.3.0 -r Unknown
15/02/11 11:38:16 INFO util.VersionInfo: Compiled by jenkins on Mon May 27 20:22:05 PDT 2013
-sh-4.1$ hadoop version
Hadoop 2.0.0-cdh4.3.0
Subversion file:///data/1/jenkins/workspace/generic-package-rhel64-6-0/topdir/BUILD/hadoop-2.0.0-cdh4.3.0/src/hadoop-common-project/hadoop-common -r 48a9315b342ca16de92fcc5be95ae3650629155a
Compiled by jenkins on Mon May 27 19:45:25 PDT 2013
From source with checksum a4218d77f9b12df4e3e49ef96f9d357d
This command was run using /opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib/hadoop/hadoop-common-2.0.0-cdh4.3.0.jar
我的pom.xml依赖项:
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase</artifactId>
<version>0.94.6</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-core</artifactId>
<version>1.2.1</version>
</dependency>
我也试过了:
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>2.0.0-cdh4.3.0</version>
</dependency>
奇怪的是,当我在Netbeans IDE中运行它时,程序运行正常,但是当我尝试从另一台服务器运行它时,它就会挂起。有什么见解吗?
答案 0 :(得分:1)
对于那些想知道的人,你必须使用cloudera jar。您可以将pom.xml的repo更改为cloudera:http://www.cloudera.com/documentation/enterprise/5-2-x/topics/cdh_vd_cdh5_maven_repo.html 或者您可以将jar用于/ opt / cloudera