0

I have zip files in HDFS.I am going to write a mapreduce program in R. Now R is having command to unzip the zip file.

unzip("filepath")

but here it is not accepting my HDFS file path? I tried like

 unzip(hdfs.file("HDFS file path"))

it is throwing error..

invalid path argument..

Is there any way to give HDFS file path to my R commands?

IRTFM
  • 258,963
  • 21
  • 364
  • 487
User12345
  • 455
  • 2
  • 10
  • 21
  • If you do not post the details of how you formed your "HDFS file path" (and your OS) it is not possible to comment on possible errors in that specification. It could be that including details about what you will be doing with that file are extraneous. When I first saw this I thought ... hey I don't use rmr2 ... but now I wonder if the problem might be more simple. – IRTFM Dec 01 '13 at 16:45
  • @DWin unzip(hdfs.file("/usr/hadoop/radshape.zip") <--passing HDFS file path. I have already installed rmr2,rhdfs.Not only zip files,I am not able to read normal files also. I am also using following method: readshapepoly("/usr/hadoop/aershape.shp")<--passing HDFS file path . If I give the local path--> unzip("/home/radshape.zip") and readshapepoly("/home/aershape.shp"), both are working fine,but when I give HDFS'(Hadoop Distributed File System) file path,I couldn't read.It always showing me the error --> Invalid path argument... – User12345 Dec 02 '13 at 17:34
  • readshapepoly("/usr/hadoop/aershape.shp") also not working for HDFS file but working for a local file. – User12345 Dec 02 '13 at 17:51
  • Looking at https://github.com/RevolutionAnalytics/RHadoop/wiki/rhdfs I do not see an unzip (or a zip) method for hdfs files. I think you may need to use hdfs-supported functions with rhdfs access to the filesystem. How did you create this file (and I ask again what OS?) – IRTFM Dec 02 '13 at 19:48
  • "LINUX OS" and unzip() is not a rhdfs method.It is a R package called utils' method. can't we use other R packages' method to read or process HDFS files other than rhdfs' methods??? – User12345 Dec 03 '13 at 04:54

0 Answers0