Create Hive user home directory on HDFS.
Login as $HDFS_USER hadoop fs -mkdir -p /user/$HIVE_USER hadoop fs -chown $HIVE_USER:$HDFS_USER /user/$HIVE_USER
Create warehouse directory on HDFS.
Login as $HDFS_USER hadoop fs -mkdir -p /apps/hive/warehouse hadoop fs -chown -R $HIVE_USER:$HDFS_USER /apps/hive hadoop fs -chmod -R 775 /apps/hive
where:
$HDFS_USER
is the user owning the HDFS services. For example,hdfs
.$HIVE_USER
is the user owning the Hive services. For example,hive
.
Create hive scratch directory on HDFS.
Login as $HDFS_USER hadoop fs -mkdir -p /tmp/scratch hadoop fs -chown -R $HIVE_USER:$HDFS_USER /tmp/scratch hadoop fs -chmod -R 777 /tmp/scratch
where:
$HDFS_USER
is the user owning the HDFS services. For example,hdfs
.$HIVE_USER
is the user owning the Hive services. For example,hive
.