Hbase的NoServerForRegionException: Unable to find region for talk,,99999999999999 after 10 tries问题
2017-06-14 11:54
603 查看
第一次使用Hbase的java api来写程序就遇到了NoServerForRegionException: Unable to find region for talk,,99999999999999 after 10 tries这个问题,经过一系列的查询终于解决,下面就总结一下出现这个问题的解决办法,下面是错误信息:
很明显,错误信息提示的是找不到RegionServer的信息,由于对于Hbase来说,RegionServer的信息是在zookeeper中存储的,所以,我们首先要想到是不是zookeeper没有连接上,或没有启动起来,这就需要您去查看您的集群的情况,查看zookeeper的日志信息,看起是否工作良好。
如果zookeeper工作良好,那么就有可能您的程序中没有加载hbase-site.xml中的参数,您只需在程序中加入一下代码: configuration = HBaseConfiguration.create();
configuration.set("hbase.zookeeper.quorum", "hdfsvm001.hogpu.cc,hdfsvm002.hogpu.cc");
configuration.set("hbase.zookeeper.property.clientPort","2181");
configuration.set("zookeeper.znode.parent","/hbase-unsecure");
try {
connection = ConnectionFactory.createConnection(configuration);
} catch (IOException e) {
e.printStackTrace();
} 再次尝试。
如果以上都没问题,那么下面就是我遇到的问题,版本问题,Hbase1.*和Hbase0.*有很大的变化,其中一部分api发生了改变,比如说:Htable(Hbase0.*)和Table(Hbase1.*),那么您就需要重新从Hbase的lib文件夹下面找到您所需的jar包,修改您的代码,即可成功。
很明显,错误信息提示的是找不到RegionServer的信息,由于对于Hbase来说,RegionServer的信息是在zookeeper中存储的,所以,我们首先要想到是不是zookeeper没有连接上,或没有启动起来,这就需要您去查看您的集群的情况,查看zookeeper的日志信息,看起是否工作良好。
如果zookeeper工作良好,那么就有可能您的程序中没有加载hbase-site.xml中的参数,您只需在程序中加入一下代码: configuration = HBaseConfiguration.create();
configuration.set("hbase.zookeeper.quorum", "hdfsvm001.hogpu.cc,hdfsvm002.hogpu.cc");
configuration.set("hbase.zookeeper.property.clientPort","2181");
configuration.set("zookeeper.znode.parent","/hbase-unsecure");
try {
connection = ConnectionFactory.createConnection(configuration);
} catch (IOException e) {
e.printStackTrace();
} 再次尝试。
如果以上都没问题,那么下面就是我遇到的问题,版本问题,Hbase1.*和Hbase0.*有很大的变化,其中一部分api发生了改变,比如说:Htable(Hbase0.*)和Table(Hbase1.*),那么您就需要重新从Hbase的lib文件夹下面找到您所需的jar包,修改您的代码,即可成功。
相关文章推荐
- Hbase集群client执行报错:Unable to find region for TABLE,,99999999999999 after 10 tries.
- Hbase异常宕机,NoServerForRegionException: Unable to find region(2)
- hbase分布式部署问题之org.apache.hadoop.hbase.regionserver.HRegionServer: Unable to connect to master
- HBase client访问ZooKeeper获取root-region-server DeadLock问题(zookeeper.ClientCnxn Unable to get data of znode /hbase/root-region-server)
- hadoop 2.2 hbase "Unable to load native-hadoop library for your platform" 问题解决
- 关于org.apache.jasper.JasperException: Unable to compile class for JSP问题的解决
- 问题:org.apache.jasper.JasperException: Unable to compile class for JSP
- 关于org.apache.jasper.JasperException: Unable to compile class for JSP问题的解决
- Android开发问题:ActivityNotFoundException: Unable to find explicit activity class
- java.lang.SecurityException: Unable to find app for caller android.app.ApplicationThreadProxy
- Caused by: java.lang.SecurityException: Unable to find app for caller android.app.ApplicationThreadP
- 基于hadoop 2.0 的hbase "Unable to load native-hadoop library for your platform" 问题解决
- 关于org.apache.jasper.JasperException: Unable to compile class for JSP问题的解决方案
- org.apache.jasper.JasperException: Unable to compile class for JSP 问题
- org.apache.jasper.JasperException: Unable to compile class for JSP:为什么不能编译问题
- Spark 2.0 DataFrame map操作中Unable to find encoder for type stored in a Dataset问题的分析与解决
- Android开发问题:ActivityNotFoundException: Unable to find explicit activity class
- Spark 2.0 DataFrame map操作中Unable to find encoder for type stored in a Dataset.问题的分析与解决
- 记一次git fatal: Unable to find remote helper for 'https'问题的解决
- 解决使用Struts2的s:textfield标签出现Unable to find setter method for attribute: style的问题