rhdfs库不起作用

时间:2014-12-10 13:50:17

标签: r cloudera rhadoop

我试图将带有R的hadoop用于cloudera VM。 我将rhdfs库加载到R中并且正常但是当我尝试执行hdfs.init()时,这不起作用并且给我以下错误:

> hdfs.init()
14/12/10 05:48:20 ERROR security.UserGroupInformation: Unable to find JAAS    classes:com.sun.security.auth.UnixPrincipal 
not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:/home/cloudera/R/x86_64-redhat-linux-gnu-library/3.1/rJava/java/boot/],
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
14/12/10 05:48:20 WARN util.NativeCodeLoader: Unable to load native-hadoop library for 
your platform... using builtin-java classes where applicable
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl,  : 
java.io.IOException: failure to login

这是我的代码:

  

Sys.setenv(" HADOOP_CMD" =" / usr / lib中/ hadoop的/ bin中/ hadoop的&#34)   Sys.setenv(" HADOOP_STREAMING" =" /usr/lib/hadoop-0.20-mapreduce/contrib/streaming/hadoop-streaming-2.5.0-mr1-cdh5.2.0.jar" )   Sys.setenv(" HADOOP_HOME" =" / usr / lib中/ hadoop的&#34)   Sys.setenv(" HADOOP_CONF_DIR" ="在/ etc / hadoop的/ CONF&#34)

     

库(rhdfs)   加载必需的包:rJava

     

HADOOP_CMD = / usr / lib中/ hadoop的/ bin中/ hadoop的

     

一定要运行hdfs.init()   hdfs.init()   14/12/11 05:55:21错误security.UserGroupInformation:无法找到JAAS类:在gnu.gcj.runtime.SystemClassLoader中找不到com.sun.security.auth.UnixPrincipal {urls = [file:/ home / cloudera /R/x86_64-redhat-linux-gnu-library/3.1/rJava/java/boot/],parent = gnu.gcj.runtime.ExtensionClassLoader {urls = [],parent = null}}   14/12/11 05:55:21 WARN util.NativeCodeLoader:无法为您的平台加载native-hadoop库...使用适用的builtin-java类   .jcall错误(" RJavaTools"," Ljava / lang / Object;"," invokeMethod",cl,:     java.io.IOException:登录失败

1 个答案:

答案 0 :(得分:0)

我用sudo解决了运行RStudio的问题,然后重新加载了hrdfs和rmr的tar.gz然后在执行rhdfs.init()时收到此消息:

> hdfs.init()
14/12/15 10:29:31 WARN util.NativeCodeLoader: Unable to load native-hadoop library for    your platform... using builtin-java classes where applicable
>

sholud没问题