Reply
New Contributor
Posts: 2
Registered: ‎03-10-2014

When doing some tests on hadoop map-reduce on hbase, anyone encountered NetUtils no such method?

Hi,

 

We're currently running some tests regarding the use of HBase with hadoop map-red jobs and encountering the following errors when connecting to local hbase for our tests.

Environment is standard edition CDH 4.3 and using the hbase-0.94.6-cdh4.3.0.jar in our Java program.

 

...

14/03/11 16:37:08 INFO zookeeper.ClientCnxn: Opening socket connection to server...

14/03/11 16:37:08 INFO zookeeper.ClientCnxn: Socket connection established..

14/03/11 16:37:08 INFO zookeeper.ClientCnxn: Session establishment complete on server...

Exception in thread "main" 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:437)
    at org.apache.hadoop.hbase.ipc.HBaseClient.getConnection(HBaseClient.java:1124)
    at org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:974)
    at org.apache.hadoop.hbase.ipc.WritableRpcEngine$Invoker.invoke(WritableRpcEngine.java:86)
    at $Proxy7.getProtocolVersion(Unknown Source)
    at org.apache.hadoop.hbase.ipc.WritableRpcEngine.getProxy(WritableRpcEngine.java:138)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getMaster(HConnectionManager.java:712)
    at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:126)
    at HbaseClient.<init>(HbaseClient.java:29)

Any information/feedback will be much appreciated.

 

Thanks,

 

Mark dg

New Contributor
Posts: 2
Registered: ‎03-10-2014

Re: When doing some tests on hadoop map-reduce on hbase, anyone encountered NetUtils no such method?

solved the problem, hbase jar file needs to be set in hadoop-env.sh
New Contributor
Posts: 3
Registered: ‎02-18-2017

Re: When doing some tests on hadoop map-reduce on hbase, anyone encountered NetUtils no such method?

am getting the same error. may i know what changes you did clearly. it will help

New Contributor
Posts: 3
Registered: ‎02-18-2017

Re: When doing some tests on hadoop map-reduce on hbase, anyone encountered NetUtils no such method?

am getting the same error. may i know what changes you did clearly. it will help
Champion
Posts: 600
Registered: ‎05-16-2016

Re: When doing some tests on hadoop map-reduce on hbase, anyone encountered NetUtils no such method?

@mark dg @gops

 

In java when ever you come across this below exception 

"Exception in thread "main" java.lang.NoSuchMethodError:  " 

it denotest that the method that you are invoking is no where to be found in any class meaning there is no jars pertain to that class / method in the class path were you are runining the java code . 

 

so the fix is to find the approrpriate jar file and add that jar file to the hadoop class path and give the nesseasry permission to it , meaning . 

 

in his case he solved by adding the hbase.jar file to class path by adding entry to the hadoop-env.sh 

which in this location  by default  -  /etc/hadoop/hadoop-env.sh

Announcements