rhdfs not writing to hdfs

64 views
Skip to first unread message

Aaron Benz

unread,
Feb 11, 2015, 7:34:14 PM2/11/15
to rha...@googlegroups.com
I'm sure I'm missing something obvious, but I can't seem to write/put/etc... to hdfs using rhdfs. That is to say that I can run hdfs commands on the command line, and they actually work correctly; however, when I use rhdfs, it outputs to my local home directory... weird right? Any ideas?

Antonio Piccolboni

unread,
Feb 11, 2015, 10:45:07 PM2/11/15
to RHadoop Google Group
Did you call hdfs.init?




On Wed, Feb 11, 2015 at 4:34 PM, Aaron Benz <aaron....@gmail.com> wrote:
I'm sure I'm missing something obvious, but I can't seem to write/put/etc... to hdfs using rhdfs. That is to say that I can run hdfs commands on the command line, and they actually work correctly; however, when I use rhdfs, it outputs to my local home directory... weird right? Any ideas?

--
post: rha...@googlegroups.com ||
unsubscribe: rhadoop+u...@googlegroups.com ||
web: https://groups.google.com/d/forum/rhadoop?hl=en-US
---
You received this message because you are subscribed to the Google Groups "RHadoop" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rhadoop+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Aaron Benz

unread,
Feb 12, 2015, 11:02:25 AM2/12/15
to rha...@googlegroups.com, ant...@piccolboni.info
Yes, no issues there.

Antonio Piccolboni

unread,
Mar 10, 2015, 2:03:13 PM3/10/15
to RHadoop Google Group
Had to go ask people who are deeper into rhdfs and the answer is the following

----

It has to do with not being able to find the Hadoop configuration files in the CLASSPATH (i.e core-site.xml, hdfs-site.xml)  What version of Hadoop are they running?  Here is the relevant bit of code from the hdfs.init function  (see below).  they can run this in an R console and print out hadoop.CP and send it to us

command<-sprintf("%s classpath", Sys.getenv("HADOOP_CMD"))
  hcp<-system(command, intern=TRUE)
  hcp_filelist<-""
  if (length(hcp) > 0) {
    if(.Platform$OS.type == "windows") {
      hcp<-strsplit(gsub("\\*","",hcp), ";")
    } else {
      hcp<-strsplit(gsub("\\*","",hcp), ":")
    }
hcp_filelist<-hcp[[1]]
  }

  hadoop.CP <- c(hcp_filelist
                 ,unlist(lapply(hcp_filelist, function(x) list.files(x, full.names=TRUE,pattern="jar$",recursive=FALSE)))
                 ,list.files(paste(system.file(package="rhdfs"),"java",sep=.Platform$file.sep),pattern="jar$",full.names=T)
               )

---

Can you do this? Hopefully we can get you going.
Reply all
Reply to author
Forward
0 new messages