分布式方式部署的HBase,启动正常,Shell操作正常,使用HBase的Java Api操作时总是连接失败,信息如下:

This server is in the failed servers list: localhost.localdomain/202.102.110.204:60000
 
HBase部署在192.168.100.28,IP地址变掉了原因在于DNS解析,
临时解决办法,可以在调用Api的客户端机器上的hosts文件中加上一条记录
192.168.100.28  localhost.localdomain
将localhost.localdomain指向部署HBase的机器。
 
运行结果正常,如下:
14/01/07 13:42:13 INFO zookeeper.ClientCnxn: Session establishment complete on server localhost.localdomain/192.168.100.28:2181, sessionid = 0x1436ac6e838002f, negotiated timeout = 180000
14/01/07 13:42:14 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=192.168.100.28:2181 sessionTimeout=180000 watcher=catalogtracker-on-org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation@9df6f1
14/01/07 13:42:14 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost.localdomain/192.168.100.28:2181. Will not attempt to authenticate using SASL (无法定位登录配置)
14/01/07 13:42:14 INFO zookeeper.ClientCnxn: Socket connection established to localhost.localdomain/192.168.100.28:2181, initiating session
14/01/07 13:42:14 INFO zookeeper.ClientCnxn: Session establishment complete on server localhost.localdomain/192.168.100.28:2181, sessionid = 0x1436ac6e8380030, negotiated timeout = 180000
2014-1-7 13:42:14 org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper <init>
信息: The identifier of this process is 664@zhaozh
table already exists!
14/01/07 13:42:14 INFO zookeeper.ZooKeeper: Session: 0x1436ac6e8380030 closed
14/01/07 13:42:14 INFO zookeeper.ClientCnxn: EventThread shut down
insert recored zkb to table scores ok.
insert recored zkb to table scores ok.
insert recored zkb to table scores ok.
insert recored zkb to table scores ok.
insert recored zkb to table scores ok.
insert recored baoniu to table scores ok.
insert recored baoniu to table scores ok.
===========get one record========
family  ::  course
qualifier  ::  art
course: 
course:art 
1389073395709 
course:math 
grade: 
===========show all record========
baoniu course:math 1389073395719 89
baoniu grade: 1389073395714 4
zkb course: 1389073395672 90
zkb course:art 1389073395709 

最新文章

  1. CodeIgniter 3.0问题集锦
  2. Linux:-拷贝或传送文件的技巧
  3. 自定义 Activity 的 标题栏 TitleBar
  4. CentOS vsftp安装与配置
  5. Android的图片缓存ImageCache(转)
  6. float使内联支持宽高
  7. js执行顺序&lt;转&gt;
  8. java高薪之路__007_反射
  9. [整理]Selector、shape详解
  10. 关于vmware下复制linux系统虚拟机后eth0变成eth1问题解决
  11. Incorrect key file for table &#39;/tmp/#sql_882_0.MYI&#39;; try to repair it
  12. Solr的检索运算符 (转载)
  13. DSP知识
  14. 【动态规划】Codeforces 711C Coloring Trees
  15. 跑Java -jar somefile.jar时会发生什么(一个)
  16. Mac下配置Maven环境变量
  17. Python语法教程总结规范
  18. 如何在github上搭建一个免费的 无限流量的静态网页博客Github pages
  19. Git的gc功能
  20. 2019-03-26-day019-面向对象耦合与组合

热门文章

  1. Solr开发文档(转)
  2. [GO]使用go语言实现比特币的工作量证明
  3. [GO]结构体类型添加方法
  4. OBD Problem Vehicles
  5. Error creating bean with name &#39;as&#39; defined in class path resource
  6. kcp结构体字段含义
  7. java IO之File基本操作
  8. java中Integer常量池
  9. java 获取cookie
  10. jquery datepicker 中文