RevolutionAnalytics / rhdfs

A package that allows R developers to use Hadoop HDFS
64 stars 73 forks source link

Recursive hdfs.read on directory path #13

Open rapidoo opened 9 years ago

rapidoo commented 9 years ago
hdfs.init()
modelfilename <- "<PATH_TO_DIRECTORY>"
modelfile = hdfs.read(modelfilename, "r")
m <- hdfs.read(modelfile)
head(m)

Console :

> modelfilename <- "<PATH_TO_DIRECTORY>"
> modelfile = hdfs.read(modelfilename, "r")
Error in con$fh : $ operator is invalid for atomic vectors
> m <- hdfs.read(modelfile)
> head(m)
[1] 06 f7 9f 04 50 28
> 

Access to data is OK but an error on "con$fh"

rapidoo commented 9 years ago

In fact reading a PATH is not working at all, I wrote a recursive function to create a list of file from a PATH ...

it seem to be a feature to add ...

Sorry for that

piccolbo commented 9 years ago

Thanks for the analysis. But how come head(m) returned data anyway? Are those the first bytes of some file in directory modelfilename?

rapidoo commented 9 years ago

Bad manipulation from Rstudio :(

I had initialized the variable with a file first ...

Sorry about that !

Fred

Le 26 janv. 2015 à 18:08, Antonio Piccolboni notifications@github.com a écrit :

Thanks for the analysis. But how come head(m) returned data anyway? Are those the first bytes of some file in directory modelfilename?

— Reply to this email directly or view it on GitHub.

piccolbo commented 9 years ago

Turned into a feature request.