楼主,现在HBaseAdmin 过时了
这位兄台指教下,现在流行什么样的方式咧? 大家好,请教个问题,我在windows下,远程读hbase 数据,如果把hbase_site.xml文件打到jar包里,就可以运行这个jar,但是把hbase_site.xml放到跟jar包同一个目录下,就不能执行了。
在linux下,就可以,不知道大家遇到过这种问题没有。
15/10/29 21:37:48 INFO zookeeper.ZooKeeper: Initiating client connection, conne
tString=localhost:2181 sessionTimeout=180000 watcher=hconnection
15/10/29 21:37:49 INFO zookeeper.RecoverableZooKeeper: The identifier of this p
ocess is 14864@zhangxq3519a
15/10/29 21:37:49 INFO zookeeper.ClientCnxn: Opening socket connection to serve
127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown
error)
15/10/29 21:37:50 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexp
cted error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocke
NIO.java:350)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068) 谁有资料 给点啊 buildhappy 发表于 2015-8-22 11:53
你好我的链接代码如下package hadoop.hbase;
import java.io.IOException;
你这个解决了吗?我也出现这个问题
六月 16, 2016 7:03:44 下午 org.apache.zookeeper.ClientCnxn$SendThread onConnected
信息: Session establishment complete on server dn05/10.1.32.7:2181, sessionid = 0x555541927a50d29, negotiated timeout = 90000
Exception in thread "main" java.io.IOException: java.lang.reflect.InvocationTargetException
at org.apache.hadoop.hbase.client.HConnectionManager.createConnection(HConnectionManager.java:413)
at org.apache.hadoop.hbase.client.HConnectionManager.createConnection(HConnectionManager.java:390)
at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:271)
at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:195)
at com.base.test.HelloHBase.main(HelloHBase.java:19)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.apache.hadoop.hbase.client.HConnectionManager.createConnection(HConnectionManager.java:411)
... 4 more
Caused by: java.lang.VerifyError: class org.apache.hadoop.hbase.protobuf.generated.ClientProtos$Result overrides final method getUnknownFields.()Lcom/google/protobuf/UnknownFieldSet;
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
-------------------------------------------------------------
我的报错是这样的,麻烦问一下如何解决啊 unbelieve 发表于 2016-6-16 19:29
六月 16, 2016 7:03:44 下午 org.apache.zookeeper.ClientCnxn$SendThread onConnected
信息: Session est ...
应该是自己代码的问题
buildhappy 发表于 2015-8-22 11:53
你好我的链接代码如下package hadoop.hbase;
import java.io.IOException;
遇到了这个问题,请问你解决了么??
ananan36 发表于 2016-1-11 10:48
你这个解决了吗?我也出现这个问题
解决了吗?
我参考的楼主的第一种方法,遇到以下异常:
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.apache.hadoop.util.StringUtils.<clinit>(StringUtils.java:78)
at org.apache.hadoop.security.Groups.parseStaticMapping(Groups.java:93)
at org.apache.hadoop.security.Groups.<init>(Groups.java:77)
at org.apache.hadoop.security.Groups.getUserToGroupsMappingService(Groups.java:240)
at org.apache.hadoop.security.Groups.getUserToGroupsMappingService(Groups.java:225)
at org.apache.hadoop.hbase.security.UserProvider.<clinit>(UserProvider.java:56)
at org.apache.hadoop.hbase.client.HConnectionKey.<init>(HConnectionKey.java:71)
at org.apache.hadoop.hbase.client.ConnectionManager.getConnectionInternal(ConnectionManager.java:298)
at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:236)
at demo.HelloHBase.main(HelloHBase.java:18)
Caused by: java.lang.StringIndexOutOfBoundsException: begin 0, end 3, length 1
at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3116)
at java.base/java.lang.String.substring(String.java:1885)
at org.apache.hadoop.util.Shell.<clinit>(Shell.java:49)
... 10 more
RE: 总结Eclipse 远程连接 HBase问题及解决方案大全
HELTIC 发表于 2017-11-30 15:05我参考的楼主的第一种方法,遇到以下异常:
Exception in thread "main" java.lang.ExceptionInInitialize ...
有没有人知道这是什么原因,该怎么解决呢?