Created 07-19-2019 05:44 AM
I am trying to connect Java api to Hbase, I am using Ambari for Hbase and netbean for java. I am facing an error
Exception in thread "main" java.lang.IllegalArgumentException: Not a host:port pair: PBUF
#
sandbox.hortonworks.com�}�����-.
libraries of Hbase-client-0.95.0.jar and Hbase-server.0.95.0.jar have same version. please guide how can I resolve ?
this is a code that I am using for connection.
Configuration conf = HBaseConfiguration.create();
conf.set("hbase.master", "192.168.23.143:16020");
conf.set("hbase.zookeeper.quorum","192.168.23.143");
conf.set("hbase.zookeeper.property.clientPort", "2181");
conf.set("zookeeper.znode.parent", "/hbase-unsecure");
System.out.println("Connecting ...");
HBaseAdmin admin = new HBaseAdmin(conf);
HBaseAdmin.checkHBaseAvailable(conf);
System.out.println("Connecting ...");
boolean bool = admin.tableExists("transport");
System.out.println( bool);
}
Error:
run:
Connecting ...
19/07/18 21:31:32 INFO zookeeper.ZooKeeper: Client environment:zookeeper.version=3.3.1-942149, built on 05/07/2010 17:14 GMT
19/07/18 21:31:32 INFO zookeeper.ZooKeeper: Client environment:host.name=DESKTOP-959ROGC
19/07/18 21:31:32 INFO zookeeper.ZooKeeper: Client environment:java.version=1.8.0_192
19/07/18 21:31:32 INFO zookeeper.ZooKeeper: Client environment:java.vendor=Oracle Corporation
19/07/18 21:31:32 INFO zookeeper.ZooKeeper: Client environment:java.home=C:\Program Files\Java\jdk1.8.0_192\jre
19/07/18 21:31:32 INFO zookeeper.ZooKeeper: Client environment:java.class.path=E:\NetBeanProject\HBaseConnection\jar_file\commons-beanutils-1.7.0.jar;E:\NetBeanProject\HBaseConnection\jar_file\commons-beanutils-core-1.8.0.jar;E:\NetBeanProject\HBaseConnection\jar_file\commons-cli-1.2.jar;E:\NetBeanProject\HBaseConnection\jar_file\commons-codec-1.4.jar;E:\NetBeanProject\HBaseConnection\jar_file\commons-collections-3.2.1.jar;E:\NetBeanProject\HBaseConnection\jar_file\commons-configuration-1.6.jar;E:\NetBeanProject\HBaseConnection\jar_file\commons-digester-1.8.jar;E:\NetBeanProject\HBaseConnection\jar_file\commons-el-1.0.jar;E:\NetBeanProject\HBaseConnection\jar_file\commons-httpclient-3.0.1.jar;E:\NetBeanProject\HBaseConnection\jar_file\commons-io-2.1.jar;E:\NetBeanProject\HBaseConnection\jar_file\commons-lang-2.4.jar;E:\NetBeanProject\HBaseConnection\jar_file\commons-logging-1.0.3.jar;E:\NetBeanProject\HBaseConnection\jar_file\commons-logging-1.1.2.jar;E:\NetBeanProject\HBaseConnection\jar_file\commons-math-2.1.jar;E:\NetBeanProject\HBaseConnection\jar_file\commons-net-1.4.1.jar;E:\NetBeanProject\HBaseConnection\jar_file\core-3.1.1.jar;E:\NetBeanProject\HBaseConnection\jar_file\hadoop-core-1.1.2.jar;E:\NetBeanProject\HBaseConnection\jar_file\hadoop-core-1.2.1.jar;E:\NetBeanProject\HBaseConnection\jar_file\hbase-0.94.10.jar;E:\NetBeanProject\HBaseConnection\jar_file\hbase-client-0.95.0.jar;E:\NetBeanProject\HBaseConnection\jar_file\hbase-server-0.95.0.jar;E:\NetBeanProject\HBaseConnection\jar_file\hsqldb-1.8.0.10.jar;E:\NetBeanProject\HBaseConnection\jar_file\log4j-1.2.16.jar;E:\NetBeanProject\HBaseConnection\jar_file\servlet-api-2.5-20081211.jar;E:\NetBeanProject\HBaseConnection\jar_file\servlet-api-2.5-6.1.14.jar;E:\NetBeanProject\HBaseConnection\jar_file\zookeeper.jar;E:\NetBeanProject\HBaseConnection\build\classes
19/07/18 21:31:32 INFO zookeeper.ZooKeeper: Client environment:java.library.path=C:\Program Files\Java\jdk1.8.0_192\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Java\bin;C:\Java;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Users\sidra\AppData\Local\Microsoft\WindowsApps;;.
19/07/18 21:31:32 INFO zookeeper.ZooKeeper: Client environment:java.io.tmpdir=C:\Users\sidra\AppData\Local\Temp\
19/07/18 21:31:32 INFO zookeeper.ZooKeeper: Client environment:java.compiler=<NA>
19/07/18 21:31:32 INFO zookeeper.ZooKeeper: Client environment:os.name=Windows 10
19/07/18 21:31:32 INFO zookeeper.ZooKeeper: Client environment:os.arch=amd64
19/07/18 21:31:32 INFO zookeeper.ZooKeeper: Client environment:os.version=10.0
19/07/18 21:31:32 INFO zookeeper.ZooKeeper: Client environment:user.name=sidra
19/07/18 21:31:32 INFO zookeeper.ZooKeeper: Client environment:user.home=C:\Users\sidra
19/07/18 21:31:32 INFO zookeeper.ZooKeeper: Client environment:user.dir=E:\NetBeanProject\HBaseConnection
19/07/18 21:31:32 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=192.168.23.143:2181 sessionTimeout=180000 watcher=hconnection
19/07/18 21:31:32 INFO zookeeper.RecoverableZooKeeper: The identifier of this process is 17072@DESKTOP-959ROGC
19/07/18 21:31:32 INFO zookeeper.ClientCnxn: Opening socket connection to server /192.168.23.143:2181
19/07/18 21:31:39 INFO zookeeper.ClientCnxn: Socket connection established to 192.168.23.143/192.168.23.143:2181, initiating session
19/07/18 21:31:39 INFO zookeeper.ClientCnxn: Session establishment complete on server 192.168.23.143/192.168.23.143:2181, sessionid = 0x16c04d6c5dc002e, negotiated timeout = 40000
Exception in thread "main" java.lang.IllegalArgumentException: Not a host:port pair: PBUF
#
sandbox.hortonworks.com�}�����-
Created 07-19-2019 01:57 PM
HBase 0.94 and 0.95 are extremely old versions. You should not be using them any longer.
In general, you should use the same exact version of client jars which match the HBase cluster version you are trying to interact with.
Created 07-19-2019 12:17 PM
Please anybody guide ?
Created 07-19-2019 01:57 PM
HBase 0.94 and 0.95 are extremely old versions. You should not be using them any longer.
In general, you should use the same exact version of client jars which match the HBase cluster version you are trying to interact with.
Created 07-19-2019 04:19 PM
@Josh Elser How can we check HBase cluster version?
Created 07-20-2019 04:55 AM
My Apachi Ambari 2.2.1.0 version and HBase client 2.2.0 are same now. but still getting same error Not a host:port pair: PBUF. Can you explain in detail how can I resolve it?