看尚硅谷视频,在windows上运行集群上的hbase时

package org.example;import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.client.HBaseAdmin;import java.io.IOException;public class TestHBaseApi {private static HBaseConfiguration conf;private static HBaseAdmin admin;public static void conncet2HBase() throws IOException {conf=new HBaseConfiguration();conf.set("hbase.zookeeper.quorum","node1,node2,node3");admin=new HBaseAdmin(conf);}public static boolean isTableExist(String tableName) throws IOException {boolean is;is=admin.tableExists(tableName);admin.close();return is;}public static void main(String[] args) throws IOException {conncet2HBase();String tableName="ORDER_INFO";System.out.println(isTableExist(tableName));}
}

出现了以下的错误,说找不到位置:

Exception in thread "main" org.apache.hadoop.hbase.client.RetriesExhaustedException: Can't get the locations

其实是windows不认识node1,node2,node3是什么意思,去windows的hosts文件夹下把 node1的ip 和node1做一个映射,跟linux上的hosts一样
C:\Windows\System32\drivers\etc\hosts,会出现不能编辑的问题,更改一下文件的权限就好了

Exception in thread “main“ org.apache.hadoop.hbase.client.RetriesExhaustedException: Can‘t get the l相关推荐

  1. Exception in thread “main“ org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed after at

    使用HBase API连接HBase集群时一直报错 查看报错原因 : 报错原因说是无法不知道 hadoop102.hadoop.com这个域名 其实这个信息,并不是Hbase的异常,而是客户端找不到z ...

  2. HADOOP Exception in thread “main“ org.apache.hadoop.security.AccessControlException: Permission deni

    错误:Exception in thread "main" org.apache.hadoop.security.AccessControlException: Permissio ...

  3. 【异常】org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed after attempts=36, exceptions:

    [异常]org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed after attempts=36, exceptions: ...

  4. exception in thread “main” org.apache.hadoop.hadooplllcgalargumentException:Ha is not enabled for

    注册zk的时候碰到了这个问题 直接去找你hadoop下面的hdfs-site.xml 找找看这个位置 小编这里就是没打 少了一个ha导致了这个错误 咱们修改过来 dfs.ha.namenodes.my ...

  5. 解决Exception in thread “main“ org.apache.spark.SparkException: When running with master ‘yarn‘ either

    Exception in thread "main" org.apache.spark.SparkException: When running with master 'yarn ...

  6. Exception in thread “main“ org.apache.ibatis.exceptions.PersistenceException奇葩解决方案

    项目场景: Exception in thread "main" org.apache.ibatis.exceptions.PersistenceException: ### Er ...

  7. Exception in thread main org.apache.thrift.transport.TTransportException: Could not create ServerS

    Exception in thread "main" org.apache.thrift.transport.TTransportException: Could not crea ...

  8. Exception in thread “main“ org.apache.http.conn.ConnectTimeoutException: Connect to 134.00.00.00:00

    Exception in thread "main" org.apache.http.conn.ConnectTimeoutException: Connect to 134.00 ...

  9. Exception in thread “main“ org.apache.ibatis.binding.BindingException: Invalid bound statement (not

    IDEA报错–mybatis Exception in thread "main" org.apache.ibatis.binding.BindingException: Inva ...

最新文章

  1. C++ template
  2. 6步傻瓜式点击在树莓派上安好Win11
  3. svn patch 功能
  4. php脏在哪里,逍遥游户外联盟-人身上最“脏”的地方是哪里?3个地方,建议经常清洗 -...
  5. C/Cpp / STL / vector 释放内存的方案
  6. postgresql测试题_PostgreSQL练习
  7. 【Android开发】文本框、按钮、文本编辑框、提交登录、单选框
  8. linux终端命令教程,Linux终端命令入坑技巧
  9. js 对象去除undefined_undefined和null区别
  10. Cloud一分钟 |百度遭北京信管局行政处罚;双11计算能力超100万核;腾讯回应高管被抓系谣言...
  11. IT部门如何应对VDI问题
  12. MongoDB 之 $关键字 及 $修改器 $set $inc $push $pull $pop MongoDB - 4
  13. jquery uploadify 避免jquery.uploadify.min.js 文件多次引用导致只有最后一个才能上传
  14. confluence编辑文件和文字_知识管理Confluence:常用基本操作
  15. 机器视觉——镜头介绍
  16. 如何检测android手机是否支持3g网络或者4g网络 源码,iOS中怎么判断当前网络环境是2G/3G/4G/5G/WiFi...
  17. EduCoder Java程序设计---Java语言基础(十)- 方法的使用
  18. css p段落首行缩进两个字符
  19. 工业物联网解决方案:PLC数据上云
  20. 直接在服务器上跑系统,在服务器上跑代码

热门文章

  1. centos7 无法启动网络(service network restart)错误解决办法
  2. Android-MeasureSpec那些事
  3. GitNote 基于 Git 的跨平台笔记软件正式发布
  4. Netflix Play API:我们为什么构建了一个演进式架构?
  5. Entity Framework Core介绍(1)
  6. Django Models一对多操作
  7. 8.2.5: Spring3.0新增的@DependsOn和@Lazy
  8. 程序包 javax.servlet 不存在 解决办法
  9. Java实现世代距离_IGD反转世代距离-多目标优化评价指标概念及实现
  10. linuv创建文件的命令_ECS实践案例丨逻辑卷的创建和扩容操作指导