Need to add /user/trafodion for hive to work correctly

Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/4fa6ca06
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/4fa6ca06
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/4fa6ca06

Branch: refs/heads/master
Commit: 4fa6ca060edc342882cc50232cb7fa5ace101513
Parents: 70631ba
Author: Amanda Moran <ama...@apache.com>
Authored: Wed Jul 6 23:10:42 2016 +0000
Committer: Amanda Moran <ama...@apache.com>
Committed: Wed Jul 6 23:10:42 2016 +0000

----------------------------------------------------------------------
 install/installer/traf_apache_mods      | 7 +++++++
 install/installer/traf_cloudera_mods    | 9 +++++++++
 install/installer/traf_hortonworks_mods | 8 ++++++++
 3 files changed, 24 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/4fa6ca06/install/installer/traf_apache_mods
----------------------------------------------------------------------
diff --git a/install/installer/traf_apache_mods 
b/install/installer/traf_apache_mods
index cf16918..c267977 100755
--- a/install/installer/traf_apache_mods
+++ b/install/installer/traf_apache_mods
@@ -129,6 +129,13 @@ sudo chown trafodion.trafodion $TRAF_WORKDIR/hbase-site.xml
 # create new directories for bulkload and lobs if not already there
 rm $LOCAL_WORKDIR/traf_temp_output 2>/dev/null
 
+ssh -q -n $HDFS_NODE 'sudo su' "$HDFS_USER" '--command "' 
"$HADOOP_PREFIX"'/bin/hdfs dfs -mkdir -p /user/'"$TRAF_USER"'"'
+if [ $? != 0 ]; then
+   echo "***ERROR: hds dfs -mkdir -p /hbase-staging' command failed"
+   exit -1
+fi
+ssh -q -n $HDFS_NODE 'sudo su' "$HDFS_USER" '--command "' 
"$HADOOP_PREFIX"'/bin/hdfs dfs -chown -R '"$TRAF_USER"' /user/'"$TRAF_USER"'"'
+
 ssh -q -n $HDFS_NODE 'sudo su' "$HDFS_USER" '--command "' 
"$HADOOP_PREFIX"'/bin/hdfs dfs -mkdir -p /hbase-staging"'
 if [ $? != 0 ]; then
    echo "***ERROR: hds dfs -mkdir -p /hbase-staging' command failed"

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/4fa6ca06/install/installer/traf_cloudera_mods
----------------------------------------------------------------------
diff --git a/install/installer/traf_cloudera_mods 
b/install/installer/traf_cloudera_mods
index 0147c2b..d380773 100755
--- a/install/installer/traf_cloudera_mods
+++ b/install/installer/traf_cloudera_mods
@@ -158,6 +158,15 @@ fi
 sudo cp $HOME/hbase-site.xml $TRAF_WORKDIR
 sudo chown trafodion.trafodion $TRAF_WORKDIR/hbase-site.xml
 
+ssh -q -n $HDFS_NODE 'sudo su' "$HDFS_USER" '--command "' 
"$HADOOP_BIN_PATH"'/hdfs dfs -mkdir -p /user/'"$TRAF_USER"'"'
+if [ $? != 0 ]; then
+   echo "***ERROR: '$HADOOP_BIN_PATH/hdfs dfs -mkdir -p /user/$TRAF_USER' 
command failed"
+   exit -1
+fi
+
+ssh -q -n $HDFS_NODE 'sudo su' "$HDFS_USER" '--command "' 
"$HADOOP_BIN_PATH"'/hdfs dfs -chown -R '"$TRAF_USER"' /user/'"$TRAF_USER"'"'
+
+
 ssh -q -n $HDFS_NODE 'sudo su' "$HDFS_USER" '--command "' 
"$HADOOP_BIN_PATH"'/hadoop fs -mkdir -p /hbase-staging"'
 if [ $? != 0 ]; then
    echo "***ERROR: '$HADOOP_BIN_PATH/hadoop fs -mkdir -p /hbase-staging' 
command failed"

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/4fa6ca06/install/installer/traf_hortonworks_mods
----------------------------------------------------------------------
diff --git a/install/installer/traf_hortonworks_mods 
b/install/installer/traf_hortonworks_mods
index 61b561c..a707137 100755
--- a/install/installer/traf_hortonworks_mods
+++ b/install/installer/traf_hortonworks_mods
@@ -164,6 +164,14 @@ sudo chown trafodion.trafodion $TRAF_WORKDIR/hbase-site.xml
 # create new directories for bulkload and lobs if not already there
 rm $LOCAL_WORKDIR/traf_temp_output 2>/dev/null
 
+ssh -q -n $HDFS_NODE 'sudo su' "$HDFS_USER" '--command "hadoop fs -mkdir -p 
/user/'"$TRAF_USER"'"'
+if [ $? != 0 ]; then
+   echo "***ERROR: 'hadoop fs -mkdir -p /user/$TRAF_USER' command failed"
+   exit -1
+fi
+
+ssh -q -n $HDFS_NODE 'sudo su' "$HDFS_USER" '--command "hadoop fs -chown -R 
'"$TRAF_USER"' /user/'"$TRAF_USER"'"'
+
 ssh -q -n $HDFS_NODE 'sudo su' "$HDFS_USER" '--command "hadoop fs -mkdir -p 
/hbase-staging"'
 if [ $? != 0 ]; then
    echo "***ERROR: 'hadoop fs -mkdir -p /hbase-staging' command failed"

Reply via email to