当我尝试使用java hbase客户端在我的aws hbase上创建表时 ,它给了我例外:
org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed after attempts=36, exceptions:
Sun Dec 13 08:26:29 EST 2015, null, java.net.SocketTimeoutException: callTimeout=60000, callDuration=69130: row 'wujintao,,00000000000000' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=Slave1,60020,1449708947932, seqNum=0
我的java代码是这样的:
public static Configuration configuration;
static {
configuration = HBaseConfiguration.create();
configuration.set("hbase.zookeeper.property.clientPort", "2181");
configuration.set("hbase.zookeeper.quorum","ec2-52-2-133-43.compute-1.amazonaws.com,ec2-52-70-140-152.compute-1.amazonaws.com,ec2-52-70-195-91.compute-1.amazonaws.com");
// configuration.set("hbase.zookeeper.property.clientPort","2181");
configuration.set("hbase.master", "*ec2-52-2-133-43.compute-1.amazonaws.com:9000");
}
是否意味着它已连接到主服务器但在从服务器上失败了?为什么失败?
答案 0 :(得分:0)
是否可以从客户端计算机和主服务器访问/ etc / hosts文件或Slave1主机名中定义的 First Formate:-
---------------
NSString * mainStringvalue = [IdArray objectAtIndex:12];
NSDictionary *mainDictionary = [NSDictionary dictionaryWithObjectsAndKeys:
@"COLLECTION",@"key1",
mainStringvalue,@"key2" ,
nil];
Second Formate:-
----------------
NSDictionary *mainDictionary = [NSDictionary dictionaryWithObjectsAndKeys:
@"COLLECTION",@"key1",
@"15",@"key2" ,
nil];
?
Hbase和其他人使用主机名,即使您尝试使用ip连接,它也会返回主机名,并尝试在下次调用时使用它。