rhdfs未连接

odopli94  于 2021-06-03  发布在  Hadoop
关注(0)|答案(1)|浏览(337)

我已经设置了hadoop\u cmd(hadoop path)变量,但是它没有选择路径,比如说as not found

library("rhdfs")
hdfs.init()
Sys.setenv(HADOOP_CMD="C:/cygwin64/usr/local/hadoop/bin/hadoop") 
Error in system(command, intern = TRUE) : 
'C:/cygwin64/usr/local/hadoop/bin/hadoop' not found

我在systemenv变量和cygwin中都定义了hadoop\ucmd

export HADOOP_CMD="C:/cygwin64/usr/local/hadoop/bin/hadoop"

我哪里错了,这方面有什么帮助吗,谢谢。

kb5ga3dv

kb5ga3dv1#

HADOOP_HOME & HADOOP_CMD 应在r会话中设置,然后调用 hdfs.init() 还记得在启动rhadoop之前遵循检查点
r-hadoop依赖项
rmr2- RCpp, RJSONIO, digest, functional, stringr, plyr rhdfs- rJava 在运行之前导出r会话中的环境变量
init() # requied Sys.setenv(HADOOP_HOME="/home/trendwise/apache/hadoop-1.0.4"); Sys.setenv(HADOOP_CMD="/home/trendwise/apache/hadoop-1.0.4/bin/hadoop"); Sys.setenv(HADOOP_STREAMING='/home/trendwise/apache/hadoop-1.0.4/contrib/streaming/hadoop-streaming-1.0.4.jar') #optional Sys.setenv(HADOOP_BIN="/home/trendwise/apache/hadoop-1.0.4/bin"); Sys.setenv(HADOOP_CONF_DIR="/home/trendwise/apache/hadoop-1.0.4/conf"); Sys.setenv(HIVE_HOME="/home/trendwise/apache/hive-0.10.0"); Sys.setenv(HBASE_HOME="/home/trendwise/apache/hbase-0.94.3"); # Library Path Sys.setenv(LD_LIBRARY_PATH="/lib:/lib/x86_64-linux-gnu:/lib64:/usr/lib:/usr/lib64:/usr/local/lib:/usr/local/lib64:/usr/lib/jvm/jdk1.7.0_10/lib:/usr/lib/jvm/jdk1.7.0_10/jre/lib:/usr/lib/jvm/jdk1.7.0_10/jre/lib/amd64:/usr/lib/jvm/jdk1.7.0_10/jre/lib/amd64/server"); # Loading library library(rmr2) library(rhdfs) # initializing hdfs.init()

相关问题