Sets the HDFS root directory.





The full path in HDFS to be set as the current root directory. If this argument is omitted, then your HDFS home directory is used as the root.

Usage Notes

Use hdfs.root to see the current root directory.

All HDFS paths and operations using Oracle R Connector for Hadoop are relative to the current HDFS root. You cannot change the current working directory above the root directory. Users do not have write access to the HDFS / directory, which is the default HDFS root directory.

Return Value

The full path to the newly set HDFS root directory, or NULL if an error prevented a new root directory from being set


This example changes the HDFS root directory from /user/oracle to /user/oracle/demo.

R> hdfs.root()
[1] "/user/oracle"
R> hdfs.setroot("/user/oracle/demo")
R> hdfs.root()
[1] "/user/oracle/demo"