Closed XilefNori closed 6 years ago
That won't be easy https://stackoverflow.com/questions/47413109/changing-hadoop-username-during-runtime-doesnt-work At this time I don't know how to implement it. MR are welcome.
I think I found a solution for unsecured HDFS. Together with 'su' command I also added support for 'whoami' command.
Thank you!!!
You are welcome. If you like HDFSShell, please spread a word about it.
Usually you set user hdfs is working by setting HADOOP_USER_NAME env variable оr switch user with sudo before executing hdfs
HADOOP_USER_NAME="flume" hdfs dfs -text /user/flume/file sudo -E -u flume hdfs dfs -text /user/flume/file
It would be nice if you could switch user inside hdfs-shell session and hdfs-shell-daemon proccess by sending command like 'su {username}' or something like that