执行HBase建表操作,每次创建表HRegionServer都会挂掉,而 HMaster还在!RetriesExhaustedException: Can't get the locations
来源:互联网 发布:编程cim是做什么的 编辑:程序博客网 时间:2024/06/14 05:25
在IDE 执行HBase建表操作,每次创建表HRegionServer都会挂掉,而 HMaster还在!
报错如下:
Exception in thread "main" org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed after attempts=36, exceptions:
Sun Sep 03 14:02:03 CST 2017, null, java.net.SocketTimeoutException: callTimeout=60000, callDuration=62783: row 'ns2:stu,,' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=hadoop02,16020,1504416746839, seqNum=0
at org.apache.hadoop.hbase.client.RpcRetryingCallerWithReadReplicas.throwEnrichedException(RpcRetryingCallerWithReadReplicas.java:271)
at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:195)
at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:59)
at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:200)
at org.apache.hadoop.hbase.client.ClientScanner.call(ClientScanner.java:320)
at org.apache.hadoop.hbase.client.ClientScanner.loadCache(ClientScanner.java:403)
at org.apache.hadoop.hbase.client.ClientScanner.next(ClientScanner.java:364)
at org.apache.hadoop.hbase.MetaTableAccessor.fullScan(MetaTableAccessor.java:604)
at org.apache.hadoop.hbase.MetaTableAccessor.tableExists(MetaTableAccessor.java:366)
at org.apache.hadoop.hbase.client.HBaseAdmin.tableExists(HBaseAdmin.java:303)
at org.apache.hadoop.hbase.client.HBaseAdmin.tableExists(HBaseAdmin.java:313)
at day01.Demo01HBaseAPI.createTable(Demo01HBaseAPI.java:75)
at day01.Demo01HBaseAPI.main(Demo01HBaseAPI.java:36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: java.net.SocketTimeoutException: callTimeout=60000, callDuration=62783: row 'ns2:stu,,' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=hadoop02,16020,1504416746839, seqNum=0
at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:159)
at org.apache.hadoop.hbase.client.ResultBoundedCompletionService$QueueingFuture.run(ResultBoundedCompletionService.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.hadoop.hbase.client.RetriesExhaustedException: Can't get the locations
at org.apache.hadoop.hbase.client.RpcRetryingCallerWithReadReplicas.getRegionLocations(RpcRetryingCallerWithReadReplicas.java:312)
at org.apache.hadoop.hbase.client.ScannerCallable.prepare(ScannerCallable.java:149)
at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas$RetryingRPC.prepare(ScannerCallableWithReplicas.java:358)
at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:124)
... 4 more
Process finished with exit code 1
部分建表语句如下:
/** * 创建表 * @param admin * @throws IOException */public static void createTable(HBaseAdmin admin) throws IOException { //先判断表是否存在 if (!admin.tableExists("ns2:stu1")){ HTableDescriptor hTable = new HTableDescriptor(TableName.valueOf("ns2:stu2")); //创建一个表 至少需要添加一个列族 hTable.addFamily(new HColumnDescriptor("cf_info")); hTable.addFamily(new HColumnDescriptor("cf_beizhu")); admin.createTable(hTable); } admin.close(); System.out.println("----createTable end-----");}
解决办法:
自己常熟各种办法,均无果,查看节点日志也没找到有价值的信息。
最后把代码里面 if 判断表存在的语句注释掉,神奇的一幕发生了,能创建表了!好吧问题就这样解决了,还是不知道问题的根源!
最后希望大神看到后请指教!
- 执行HBase建表操作,每次创建表HRegionServer都会挂掉,而 HMaster还在!RetriesExhaustedException: Can't get the locations
- Can't get the locations
- Hbase启动后,在主节点只有Hmaster,而在slave节点上没有Hregionserver
- HBase中的HMaster、HRegionServer、Zookeeper
- HBase中的HMaster、HRegionServer、Zookeeper
- HBase中的HMaster、HRegionServer、Zookeeper
- 使用start-hbase.sh 启动服务 然后HMaster 和 HRegionServer 相继挂掉
- R连接hbase错误(Can't get the location)
- Hbase的HRegionServer进程无法和HMaster同步停止
- 启动Hbase,HMaster进程可以启动,但是HRegionServer启动不成功
- HBase的Hmaster、HRegionserver、Region、Hstore、memstore、HFile的关系
- hbase无法启动,The node /hbase is not in ZooKeeper和Can't get master address from ZooKeeper;
- HBASE-1.1.12集群启动之后Hmaster,HregionServer进程会很快死掉问题
- java远程连接hbase can't get location
- 启动Hbase后Hmaster节点挂掉的几个原因
- hbase环境搭建,启动之后HMaster挂掉,或者是集群里,只启动了HMaster节点,HRegionServer节点没有启动的问题
- 执行顺序:(优先级从高到低)静态代码块>mian方法>构造代码块>构造方法。 其中静态代码块只执行一次。构造代码块在每次创建对象是都会执行。
- Mysql创建用户后,执行grant授权命令,提示can't find any matching row in the user table
- Python学习第一课
- nodejs爬虫参考
- python maximum recursion depth exceeded解决方式
- 倒水(rms2017模拟2-1)* 【推理】
- 169. Majority Element
- 执行HBase建表操作,每次创建表HRegionServer都会挂掉,而 HMaster还在!RetriesExhaustedException: Can't get the locations
- POJ2699 The Maximum Number of Strong Kings (maxflow)
- 由四个点求两条线段交点代码实现
- CentOS 7 下安装Chrome浏览器
- 二叉树遍历(已知先序、中序求后序)
- 深入学习APC
- dom解析
- java中的接口和抽象类的区别
- 【操作系统学习日记】3.配置bochs