2018-03-30

作者: qmyhj | 来源:发表于2018-03-30 14:11 被阅读0次

window下解决hadoop的Unable to load native-hadoop library的一种可行方案

首先,window7上已经安装了JDK1.8版本, scala2.12.5版本,hadoop2.7.0版本,spark2.2.0版本,并且配置好了相应的环境变量。但是在cmder(一种win下替代cmd的非常强大的工具,内置了Linux的一些命令,并且可以使用vim)下输入spark-shell,结果报了三个警告。

1、 Unable to load native-hadoop library for your platform...。上网上看了很多教程,有建议升级glibc版本的,有认为是32和64位版本不对的。但试了很多方案都不能解决问题。后来,看到有的博客建议到Github上下载winutils.exe,我就试着把https://github.com/steveloughran/winutils下面的hadoop2.7.1的bin文件替换了hadoop目录下的bin文件,结果就不报错了,注意是整个替换bin文件,而不是只将winutils.exe添加到hadoop的bin目录下,否则还是会报错的。

2、 The root scratch dir: /tmp/hive on HDFS should be writable. Current permissions are: rwx------这个错误的解决参考了http://www.mamicode.com/info-detail-1474722.html这篇内容,直接在cmder下输入hadoop fs -chmod 777 /tmp/hive就行了。

3、 Plugin (Bundle) "org.datanucleus.api.jdo" is already registered. Ensure you dont have multiple JAR versions of the same plugin in the classpath.这个问题尚未解决,但好像不影响正常使用。

相关文章

网友评论

    本文标题:2018-03-30

    本文链接:https://www.haomeiwen.com/subject/vlcicftx.html