nexr / RHive

RHive is an R extension facilitating distributed computing via Apache Hive.
http://nexr.github.io/RHive
122 stars 63 forks source link

rhive.connect write perm error #60

Open ypalrecha opened 10 years ago

ypalrecha commented 10 years ago

Why it needs write permission in root folder? Can I change

rhive.connect(host = "xxx", port = xxx); No encryption was performed by peer. No encryption was performed by peer. Error: org.apache.hadoop.security.AccessControlException: Permission denied: user=xxx, access=WRITE, inode="/":hdfs:supergroup:drwxr-xr-x at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:224) at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:204) at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:149) at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkPermission(FSNamesystem.java:4846)

prabhunkl commented 10 years ago

I had same issue and the following is the answer I got.

HDFS default directory for RHive is /rhive. If Rhive default dir. don't exist, RHive will make it. After that, RHive continue to use it.

However, if rhive directory don't have the 755 or 777 permission, AccessControlException can occur like your case. In this case, please change the directory permission to 775 for single-user or 777 for multi-user, and try again.

If you don't want to use default DIR., you can change it by changing R system environment value like the following: You must change it before load RHive library or executing rhive.init()

Sys.setenv(RHIVE_FS_HOME="/*/rhive*")
rhive.init()