Skip to content Skip to sidebar Skip to footer

Permissions Error On Webhdfs

I'm working on using the REST interface to Hadoop's HDFS as a convenient way to store files over the network. To test I installed hadoop on my mac (10.8.5) following these instruc

Solution 1:

You need to have the PyWebHdfsClient user_name match a unix user that has permission to the directory you are trying to write to. The user that starts the namenode service is by default the "superuser"

I wrote the pywebhdfs client you are using in response to a need at work. If you have any issues or would like to ask for features on the client itself please leave an issue on github and I can address it.

https://github.com/ProjectMeniscus/pywebhdfs/issues

Thank you

Solution 2:

Figured this one out after stepping away and reading some more docs. webdhfs expects you to specify a user value that matches the unix user who launched hdfs from the shell. So the correct python is:

from pywebhdfs.webhdfs import PyWebHdfsClient  
user=<specify_linux_user_who_launched_hadoop>
hdfs = PyWebHdfsClient(user_name=user)  
my_dir ='%s/data/new_dir'%user  
hdfs.make_dir(my_dir, permission=755)  

Post a Comment for "Permissions Error On Webhdfs"