org.apache.hadoop.hbase.client.RetriesExhaustedException: Can't get the locations

Hbase API操作表时报出异常

Exception in thread “main” org.apache.hadoop.hbase.client.RetriesExhaustedException: Can’t get the locations

org.apache.hadoop.hbase.client.RetriesExhaustedException: Can't get the locations_第1张图片

问题解决:

其他博客中所说的要在/etc/hosts中添加的映射关系已经添加,所以不是这里的问题

org.apache.hadoop.hbase.client.RetriesExhaustedException: Can't get the locations_第2张图片

使用ping 命令在cmd中尝试网络连接,也可以进行ping通

查看控制台打印的log日志发现一直是127.0.0.1/127.0.0.1:2181,可是在代码中命名已经设置了相关的IP,后来发现是在创建连接时没有使用conf… 所以默认成为本地连接… 好尴尬…

org.apache.hadoop.hbase.client.RetriesExhaustedException: Can't get the locations_第3张图片

你可能感兴趣的:(BigData)