DFS_cat( file, con = stdout(), henv = hive() )
DFS_delete( file, recursive = FALSE, henv = hive() )
DFS_dir_create( path, henv = hive() )
DFS_dir_exists( path, henv = hive() )
DFS_dir_remove( path, recursive = TRUE, henv = hive() )
DFS_file_exists( file, henv = hive() )
DFS_get_object( file, henv = hive() )
DFS_read_lines( file, n = -1L, henv = hive() )
DFS_list( path = ".", henv = hive() )
DFS_tail( file, n = 6L, size = 1024L, henv = hive() )
DFS_put( files, path = ".", henv = hive() )
DFS_put_object( obj, file, henv = hive() )
DFS_write_lines( text, file, henv = hive() )
hdfs://
); for many functions the
default corresponds to the user's home directory in the DFS.n
does not have the desired effect.cat
. Default: standard output connection, has currently no
other effectDFS_dir_create
returns a logical value indicating if the
operation succeeded for the given argument. DFS_dir_exists
and DFS_file_exists
return TRUE
if
the named directories or files exist in the HDFS.
DFS_cat
is useful for producing output in user-defined
functions. It reads from files in the DFS and typically prints the
output to the standard output. It's behaviour is similar to the base
function cat
. DFS_dir_create
creates directories with the given path names if
they do not already exist. It's behaviour is similar to the base
function dir.create
.
DFS_dir_exists
and DFS_file_exists
return a logical
vector indicating whether the directory or file respectively named by
its argument exist. See also function file.exists
.
DFS_dir_remove
attempts to remove the directory named in its
argument and if recursive
is set to TRUE
also attempts
to remove subdirectories in a recursive manner.
DFS_list
produces a character vector of the names of files
in the directory named by its argument.
DFS_read_lines
is a reader for (plain text) files stored on the
DFS. It returns a vector of character strings representing lines in
the (text) file. If n
is given as an argument it reads that
many lines from the given file. It's behaviour is similar to the base
function readLines
.
DFS_put
copies files named by its argument to a given path in
the DFS.
DFS_put_object
serializes an R object to the DFS.
DFS_write_lines
writes a given vector of character strings to a
file stored on the DFS. It's behaviour is similar to the base
function writeLines
.
## Do we have access to the root tree of the DFS?
DFS_dir_exists("/")
## If so, list the contents.
DFS_list("/")
Run the code above in your browser using DataLab