Setting up your HDFS Home directory

You need an HDFS Home directory to store temporary logs and data of your application to run a Flink job. You must set up the HDFS Home directory for your user to avoid error when using Flink.

To run a Flink job, your HDFS Home directory has to exist. If it does not exist, you receive an error message similar to the following:
Permission denied: user=$USER_NAME, access=WRITE, inode=“/user”.
Create HDFS Home directory. Ask your HDFS administrator to perform the following (or obtain HDFS administrator role).
OptionsCommand

Kerberos enabled

kinit hdfs
hdfs dfs -mkdir /user/$USER_NAME
hdfs dfs -chown $USER_NAME:$USER_NAME /user/$USER_NAME

Kerberos disabled

HADOOP_USER_NAME=hdfs hdfs dfs -mkdir /user/$USER_NAME
HADOOP_USER_NAME=hdfs hdfs dfs -chown $USER_NAME:$USER_NAME /user/$USER_NAME

In case of an enterprise environment, you can use Hue to set up the Home directory by enabling automatic synchronization for users. For more information, see the Cloudera Runtime documentation.