spark 写 hbase 数据库,遇到Will not attempt to authenticate using SASL (unknown error)

Posted 格格巫 MMQ!!

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了spark 写 hbase 数据库,遇到Will not attempt to authenticate using SASL (unknown error)相关的知识,希望对你有一定的参考价值。

今日在windows上用spark写hbase的函数 saveAsHadoopDataset 写hbase数据库的时候,遇到Will not attempt to authenticate using SASL (unknown error) 错误,程序卡在那里不动了,百度后发现是我的windows上面hosts文件没有配置。

观察ambari的hosts显示

然后我开始配置hosts

ip1 a.hadoop2.com
ip2 a.hadoop3.com
ip3 a.hadoop4.com
配置好后运行,尼玛不起作用啊,还是卡在那不动。。。

继续百度。。发现每个帖子基本都在说让配hosts,绝望了。然后我突然反应过来去看一下服务器上的hosts文件到底咋配的,一看发现。。

ip1 hadoop2 a.hadoop2.com
ip2 hadoop3 a.hadoop3.com
ip3 hadoop4 a.hadoop4.com
尼玛。。。好坑。。。原来是这么配的。ambari里面显示的是域名,而我之前把域名配置在了主机名的位置,所以不能解决问题。

然后我把windows的ip配的和linux的一模一样,程序就不卡在那了,成功写入了hbase。

liunx 下:

待补充!

18/06/20 10:45:02 INFO RecoverableZooKeeper: Process identi

以上是关于spark 写 hbase 数据库,遇到Will not attempt to authenticate using SASL (unknown error)的主要内容,如果未能解决你的问题,请参考以下文章

Spark读HBase写MySQL

记一次 spark rdd 写数据到 hbase 报 NPE 的问题排查

大数据学习系列之七 ----- Hadoop+Spark+Zookeeper+HBase+Hive集群搭建 图文详解

原创问题定位分享(16)spark写数据到hive外部表报错ClassCastException: org.apache.hadoop.hive.hbase.HiveHBaseTableOutpu(代

spark 写hbase

Spark操作HBase