AnsweredAssumed Answered

Need to connect to MapR Hbase via Java Client from a remote machine

Question asked by rushabh on Nov 21, 2014
Latest reply on Nov 24, 2014 by snelson2
I am getting following exception continuously from a java client. Looks like my client is able to connect to the server on 5181 and specified quorum but it is not able to fetch the data.

Are there any specific requirement to use MapR with Hbase & Spring-Data?

I am trying to connect to remote MapR hbase using spring-data - hbaseTemplate.

a) MapR5 is configured.

b)
org.springframework.data
spring-data-hadoop
2.0.3.RELEASE

c)

org.apache.hbase
hbase
0.94.17


      (ZKUtil.java:1597) org.apache.hadoop.hbase.zookeeper.ZKUtil - hconnection-0x149906a0b290963 Retrieved 41 byte(s) of data from znode /hbase/root-region-server and set watcher; xxx.com,60020,1...
      2014-11-21 16:08:51,923 DEBUG [main] (HConnectionManager.java:987) org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation - Looked up root region location, connection=org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation@3acf7786; serverName=xxx.cisco.com,60020,1416530382312
      2014-11-21 16:08:51,981 DEBUG [main] (HBaseClient.java:436) org.apache.hadoop.ipc.HBaseClient - Connecting to org.apache.hadoop.hbase.ipc.HBaseClient$ConnectionId@183c468b
      2014-11-21 16:08:51,987 DEBUG [main] (HBaseClient.java:739) org.apache.hadoop.ipc.HBaseClient - closing ipc connection to xxx.com/x.x.x.x:60020: Could not set up IO Streams
      java.io.IOException: Could not set up IO Streams
     at org.apache.hadoop.hbase.ipc.HBaseClient$Connection.setupIOstreams(HBaseClient.java:456)
     at org.apache.hadoop.hbase.ipc.HBaseClient.getConnection(HBaseClient.java:1141)
     at org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:988)
     at org.apache.hadoop.hbase.ipc.WritableRpcEngine$Invoker.invoke(WritableRpcEngine.java:87)
     at com.sun.proxy.$Proxy18.getProtocolVersion(Unknown Source)
     at org.apache.hadoop.hbase.ipc.WritableRpcEngine.getProxy(WritableRpcEngine.java:141)
     at org.apache.hadoop.hbase.ipc.HBaseRPC.waitForProxy(HBaseRPC.java:208)
     at   org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getHRegionConnection(HConnectionManager.java:1473)
     at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getHRegionConnection(HConnectionManager.java:1432)
     at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getHRegionConnection(HConnectionManager.java:1419)
     at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:1102)
     at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:997)
     at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:1099)
     at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:1001)
     at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:958)
     at org.apache.hadoop.hbase.client.HTable.finishSetup(HTable.java:251)
     at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:155)
     at org.springframework.data.hadoop.hbase.HbaseUtils.getHTable(HbaseUtils.java:76)
     at org.springframework.data.hadoop.hbase.HbaseTemplate.getTable(HbaseTemplate.java:75)
     at org.springframework.data.hadoop.hbase.HbaseTemplate.execute(HbaseTemplate.java:54)
     at com.cisco.cstg.nwssot.api.internal.dao.impl.HbaseDaoImpl.save(HbaseDaoImpl.java:46)
     at com.cisco.cstg.nwssot.api.internal.dao.impl.HbaseDaoImplTest.setup(HbaseDaoImplTest.java:36)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:606)
     at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
     at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
     at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
     at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
     at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
     at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83)
     at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
     at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:233)
     at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:87)
     at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
     at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
     at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
     at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
     at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
     at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
     at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
     at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
     at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:176)
     at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
     at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
      Caused by: java.lang.NoSuchMethodError: org.apache.hadoop.net.NetUtils.getInputStream(Ljava/net/Socket;)Ljava/io/InputStream;
     at org.apache.hadoop.hbase.ipc.HBaseClient$Connection.setupIOstreams(HBaseClient.java:439)


Outcomes