版本:hbase-0.98.11-hadoop1,hadoop-1.2.1,jdk1.6,rhel4-x64
我在虚拟机上配置了一个伪分布式,
这是hadoop的配置文件
这是hbase的配置文件
使用shell 操作 hadoop 和 hbase 均好使
30523 JobTracker
30437 SecondaryNameNode
30279 DataNode
31007 HMaster
30655 TaskTracker
30948 HQuorumPeer
31380 Jps
30159 NameNode
31107 HRegionServer
通过JAVA aip 与 hbase交互出现如下情况
15/03/18 12:41:02 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=192.168.244.128:2181 sessionTimeout=90000 watcher=hconnection-0xe61fd10x0, quorum=192.168.244.128:2181, baseZNode=/hbase
15/03/18 12:41:03 INFO zookeeper.ClientCnxn: Opening socket connection to server 192.168.244.128/192.168.244.128:2181. Will not attempt to authenticate using SASL (java.lang.SecurityException: 无法定位登录配置)
15/03/18 12:41:03 INFO zookeeper.ClientCnxn: Socket connection established to 192.168.244.128/192.168.244.128:2181, initiating session
15/03/18 12:41:04 INFO zookeeper.ClientCnxn: Session establishment complete on server 192.168.244.128/192.168.244.128:2181, sessionid = 0x14c2b2c35900009, negotiated timeout = 90000
15/03/18 12:42:13 INFO client.RpcRetryingCaller: Call exception, tries=10, retries=35, retryTime=68676ms, msg=row 'people,row,99999999999999' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=localhost.localdomain,60020,1426653467064, seqNum=0
15/03/18 12:42:33 INFO client.RpcRetryingCaller: Call exception, tries=11, retries=35, retryTime=88763ms, msg=row 'people,row,99999999999999' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=localhost.localdomain,60020,1426653467064, seqNum=0
15/03/18 12:42:54 INFO client.RpcRetryingCaller: Call exception, tries=12, retries=35, retryTime=108924ms, msg=row 'people,row,99999999999999' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=localhost.localdomain,60020,1426653467064, seqNum=0
15/03/18 12:43:14 INFO client.RpcRetryingCaller: Call exception, tries=13, retries=35, retryTime=129056ms, msg=row 'people,row,99999999999999' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=localhost.localdomain,60020,1426653467064, seqNum=0
15/03/18 12:43:34 INFO client.RpcRetryingCaller: Call exception, tries=14, retries=35, retryTime=149280ms, msg=row 'people,row,99999999999999' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=localhost.localdomain,60020,1426653467064, seqNum=0
15/03/18 12:43:54 INFO client.RpcRetryingCaller: Call exception, tries=15, retries=35, retryTime=169405ms, msg=row 'people,row,99999999999999' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=localhost.localdomain,60020,1426653467064, seqNum=0
---------------------------------------------------------------------------------------------------------------------------------------------------------
下面是我的代码
Configuration conf = HBaseConfiguration.create();
conf.set("hbase.rootdir", "hdfs://192.168.244.128:9000/hbase");
conf.set("hbase.master", "192.168.244.128:60000");
conf.set("hbase.cluster.distributed", "true");
conf.set("hbase.zookeeper.quorum", "192.168.244.128");
HTable ht = new HTable(conf, "people");
Put put = new Put(Bytes.toBytes("row"));
put.add(Bytes.toBytes("famcol"), Bytes.toBytes("col"), Bytes.toBytes("value"));
ht.put(put);
求大神指点下
5 个解决方案
#1
你确定hbase中有对应的表/列族?
#2
解决这个问题了么?
#3
查一查主机名和60020端口,hostname=localhost.localdomain,60020
#4
都忘了结贴了,原因是没有设置对应的hostname
要将IP地址对应设置成一个名字 加到hosts文件中 并在主机windows下hosts文件中也加上对应的ip和名字
要将IP地址对应设置成一个名字 加到hosts文件中 并在主机windows下hosts文件中也加上对应的ip和名字
#5
怎么配置的,我也遇到了类似的问题
#1
你确定hbase中有对应的表/列族?
#2
解决这个问题了么?
#3
查一查主机名和60020端口,hostname=localhost.localdomain,60020
#4
都忘了结贴了,原因是没有设置对应的hostname
要将IP地址对应设置成一个名字 加到hosts文件中 并在主机windows下hosts文件中也加上对应的ip和名字
要将IP地址对应设置成一个名字 加到hosts文件中 并在主机windows下hosts文件中也加上对应的ip和名字
#5
怎么配置的,我也遇到了类似的问题