Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
808 views
in Technique[技术] by (71.8m points)

java - Connecting to a remote HBase instance

I have an HBase-0.98.3-hadoop2 instance running on a ubuntu VM, I could not connect to it (the main thread stuck when creating HTable instance) with the following code:

Configuration config = HBaseConfiguration.create();
config.set("hbase.zookeeper.quorum", "192.168.56.101");
HTableInterface usersTable = new HTable(config, "users");

Here is what I got in the console

SLF4J: The requested version 1.5.8 by your slf4j binding is not compatible with [1.6, 1.7]
SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.
14/06/14 12:40:05 INFO zookeeper.ZooKeeper: Client environment:zookeeper.version=3.4.3-1240972, built on 02/06/2012 10:48 GMT
14/06/14 12:40:05 INFO zookeeper.ZooKeeper: Client environment:host.name=EL-OUED
14/06/14 12:40:05 INFO zookeeper.ZooKeeper: Client environment:java.version=1.7.0_45
14/06/14 12:40:05 INFO zookeeper.ZooKeeper: Client environment:java.vendor=Oracle Corporation
14/06/14 12:40:05 INFO zookeeper.ZooKeeper: Client environment:java.home=C:Program FilesJavajdk1.7.0_45jre
14/06/14 12:40:05 INFO zookeeper.ZooKeeper: Client environment:java.class.path=D:UserArbiworkspacesformationhbase-samplesargetest-classes;D:UserArbiworkspacesformationhbase-samplesargetclasses;D:Workmaven-repojavaxservletservlet-api2.5servlet-api-2.5.jar;D:Workmaven-repojavaxxmlindjaxb-api2.2.1jaxb-api-2.2.1.jar;D:Workmaven-repojavaxactivationactivation1.1activation-1.1.jar;D:Workmaven-repojunitjunit3.8.1junit-3.8.1.jar;D:Workmaven-repoorgapachelucenelucene-core3.6.2lucene-core-3.6.2.jar;D:Workmaven-repoorgapachelucenelucene-analyzers3.6.2lucene-analyzers-3.6.2.jar;D:Workmaven-repoorgapachehbasehbase.92.1hbase-0.92.1.jar;D:Workmaven-repocomgoogleguavaguava17.0guava-17.0.jar;D:Workmaven-repocommons-clicommons-cli1.2commons-cli-1.2.jar;D:Workmaven-repocommons-configurationcommons-configuration1.6commons-configuration-1.6.jar;D:Workmaven-repocommons-collectionscommons-collections3.2.1commons-collections-3.2.1.jar;D:Workmaven-repocommons-langcommons-lang2.5commons-lang-2.5.jar;D:Workmaven-repocommons-loggingcommons-logging1.1.2commons-logging-1.1.2.jar;D:Workmaven-repocommons-digestercommons-digester1.8commons-digester-1.8.jar;D:Workmaven-repocommons-beanutilscommons-beanutils1.9.1commons-beanutils-1.9.1.jar;D:Workmaven-repocommons-beanutilscommons-beanutils-core1.8.0commons-beanutils-core-1.8.0.jar;D:Workmaven-repocomgithubstephenchigh-scale-libhigh-scale-lib1.1.1high-scale-lib-1.1.1.jar;D:Workmaven-repocommons-codeccommons-codec1.4commons-codec-1.4.jar;D:Workmaven-repocommons-httpclientcommons-httpclient3.1commons-httpclient-3.1.jar;D:Workmaven-repolog4jlog4j1.2.16log4j-1.2.16.jar;D:Workmaven-repoorgapacheavroavro1.5.3avro-1.5.3.jar;D:Workmaven-repoorgcodehausjacksonjackson-mapper-asl1.5.5jackson-mapper-asl-1.5.5.jar;D:Workmaven-repoorgcodehausjacksonjackson-core-asl1.5.5jackson-core-asl-1.5.5.jar;D:Workmaven-repoorgxerialsnappysnappy-java1.0.3.2snappy-java-1.0.3.2.jar;D:Workmaven-repoorgslf4jslf4j-api1.7.7slf4j-api-1.7.7.jar;D:Workmaven-repoorgapacheavroavro-ipc1.5.3avro-ipc-1.5.3.jar;D:Workmaven-repoorgmortbayjettyjetty6.1.26jetty-6.1.26.jar;D:Workmaven-repoorgmortbayjettyjetty-util6.1.26jetty-util-6.1.26.jar;D:Workmaven-repoorgjboss
etty
etty3.2.4.Final
etty-3.2.4.Final.jar;D:Workmaven-repoorgapachevelocityvelocity1.7velocity-1.7.jar;D:Workmaven-repoorgapachezookeeperzookeeper3.4.3zookeeper-3.4.3.jar;D:Workmaven-repoorgslf4jslf4j-log4j121.5.8slf4j-log4j12-1.5.8.jar;D:Workmaven-repoorgapachehriftlibthrift.7.0libthrift-0.7.0.jar;D:Workmaven-repoorgapachehttpcomponentshttpclient4.0.1httpclient-4.0.1.jar;D:Workmaven-repoorgapachehttpcomponentshttpcore4.0.1httpcore-4.0.1.jar;D:Workmaven-repoorgjrubyjruby-complete1.6.5jruby-complete-1.6.5.jar;D:Workmaven-repoorgmortbayjettyjsp-2.16.1.14jsp-2.1-6.1.14.jar;D:Workmaven-repoorgeclipsejdtcore3.1.1core-3.1.1.jar;D:Workmaven-repoorgmortbayjettyjsp-api-2.16.1.14jsp-api-2.1-6.1.14.jar;D:Workmaven-repoorgmortbayjettyservlet-api-2.56.1.14servlet-api-2.5-6.1.14.jar;D:Workmaven-repoorgcodehausjacksonjackson-jaxrs1.9.13jackson-jaxrs-1.9.13.jar;D:Workmaven-repoorgcodehausjacksonjackson-xc1.5.5jackson-xc-1.5.5.jar;D:Workmaven-repoomcatjasper-compiler5.5.23jasper-compiler-5.5.23.jar;D:Workmaven-repoomcatjasper-runtime5.5.23jasper-runtime-5.5.23.jar;D:Workmaven-repocommons-elcommons-el1.0commons-el-1.0.jar;D:Workmaven-repoorgjamonjamon-runtime2.3.1jamon-runtime-2.3.1.jar;D:Workmaven-repocomgoogleprotobufprotobuf-java2.4.0aprotobuf-java-2.4.0a.jar;D:Workmaven-repocomsunjerseyjersey-core1.4jersey-core-1.4.jar;D:Workmaven-repocomsunjerseyjersey-json1.4jersey-json-1.4.jar;D:Workmaven-repoorgcodehausjettisonjettison1.3.5jettison-1.3.5.jar;D:Workmaven-repostaxstax-api1.0.1stax-api-1.0.1.jar;D:Workmaven-repocomsunxmlindjaxb-impl2.1.12jaxb-impl-2.1.12.jar;D:Workmaven-repocomsunjerseyjersey-server1.4jersey-server-1.4.jar;D:Workmaven-repoasmasm3.1asm-3.1.jar;D:Workmaven-repoorgmapdbmapdb1.0.2mapdb-1.0.2.jar;D:Workmaven-repocomakibanakiban-persistit3.3.0akiban-persistit-3.3.0.jar;D:Workmaven-repoorgapachehadoophadoop-core1.2.1hadoop-core-1.2.1.jar;D:Workmaven-repoxmlencxmlenc.52xmlenc-0.52.jar;D:Workmaven-repocommons-iocommons-io2.1commons-io-2.1.jar;D:Workmaven-repoorgapachecommonscommons-math2.1commons-math-2.1.jar;D:Workmaven-repocommons-netcommons-net1.4.1commons-net-1.4.1.jar;D:Workmaven-repoorooro2.0.8oro-2.0.8.jar;D:Workmaven-repo
etjavadevjets3tjets3t.6.1jets3t-0.6.1.jar;D:Workmaven-repohsqldbhsqldb1.8.0.10hsqldb-1.8.0.10.jar
14/06/14 12:40:05 INFO zookeeper.ZooKeeper: Client environment:java.library.path=C:Program FilesJavajdk1.7.0_45in;C:WindowsSunJavain;C:Windowssystem32;C:Windows;C:Program Files (x86)InteliCLS Client;C:Program FilesInteliCLS Client;C:Program Files (x86)AMD APPinx86_64;C:Program Files (x86)AMD APPinx86;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program Files (x86)ATI TechnologiesATI.ACECore-Static;C:Program FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine ComponentsIPT;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT;C:Program FilesJavajdk1.7.0_45in;C:inapache-maven-3.2.1in;C:Program Files (x86)Windows Kits8.1Windows Performance Toolkit;C:Program FilesMicrosoft SQL Server110ToolsBinn;C:Program FilesTortoiseSVNin;%ANDROID_HOME%ools;%ANDROID_HOME%platform-tools;.
14/06/14 12:40:05 INFO zookeeper.ZooKeeper: Client environment:java.io.tmpdir=C:UsersArbiAppDataLocalTemp
14/06/14 12:40:05 INFO zookeeper.ZooKeeper: Client environment:java.compiler=<NA>
14/06/14 12:40:05 INFO zookeeper.ZooKeeper: Client environment:os.name=Windows 7
14/06/14 12:40:05 INFO zookeeper.ZooKeeper: Client environment:os.arch=amd64
14/06/14 12:40:05 INFO zookeeper.ZooKeeper: Client environment:os.version=6.1
14/06/14 12:40:05 INFO zookeeper.ZooKeeper: Client environment:user.name=Arbi
14/06/14 12:40:05 INFO zookeeper.ZooKeeper: Client environment:user.home=C:UsersArbi
14/06/14 12:40:05 INFO zookeeper.ZooKeeper: Client environment:user.dir=D:UserArbiworkspacesformationhbase-samples
14/06/14 12:40:05 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=192.168.56.101:2181 sessionTimeout=180000 watcher=hconnection
14/06/14 12:40:05 INFO zookeeper.ClientCnxn: Opening socket connection to server /192.168.56.101:2181
14/06/14 12:40:05 INFO zookeeper.RecoverableZooKeeper: The identifier of this process is 6912@EL-OUED
14/06/14 12:40:10 INFO client.ZooKeeperSaslClient: Client will not SASL-authenticate because the default JAAS configuration section 'Client' could not be found. If you are not using SASL, you may ignore this. On the other hand, if you expected SASL to work, please fix your JAAS configuration.
14/06/14 12:40:10 INFO zookeeper.ClientCnxn: Socket connection established to 192.168.56.101/192.168.56.101:2181, initiating session
14/06/14 12:40:10 INFO zookeeper.ClientCnxn: Session establishment complete on server 192.168.56.101/192.168.56.101:2181, sessionid = 0x14699e94b5d0005, negotiated timeout = 40000

In the hbase-site.xml I've only set the hbase.rootdir property. Any idea what I'm missing here?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...