4. Set Up HDFS User and Prepare WebHCat Directories On HDFS

  1. Set up the WebHCat user.

    Login as $HDFS_USER
    hadoop fs -mkdir /user/$WEBHCAT_USER 
    hadoop fs -chown -R $WEBHCAT_USER:$HDFS_USER /user/$WEBHCAT_USER 
    hadoop fs -mkdir /apps/webhcat 
  2. Prepare WebHCat directories on HDFS.

    hdfs dfs -copyFromLocal /usr/share/HDP-webhcat/pig.tar.gz /apps/webhcat/
    hdfs dfs -copyFromLocal /usr/share/HDP-webhcat/hive.tar.gz /apps/webhcat/
    hdfs dfs -copyFromLocal /usr/lib/hadoop-mapreduce/hadoop-streaming*.jar /apps/webhcat/
  3. Set appropriate permissions for the HDFS user and the webhcat directory.

    hadoop fs -chown -R $WEBHCAT_USER:users /apps/webhcat 
    hadoop fs -chmod -R 755 /apps/webhcat

    where:

    • $HDFS_USER is the user owning the HDFS services. For example, hdfs.

    • $WEBHCAT_USER is the user owning the WebHCat services. For example, hcat.


loading table of contents...