You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by db...@apache.org on 2015/10/30 16:38:16 UTC

[1/2] incubator-trafodion git commit: [[ TRAFODION 1567 ]]

Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 54f44ec28 -> 693090511


[[ TRAFODION 1567 ]]


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

Branch: refs/heads/master
Commit: 28dff27d712051c49b1b570aebc291b985ea229c
Parents: 397e06b
Author: Amanda Moran <am...@apache.com>
Authored: Wed Oct 28 22:02:36 2015 +0000
Committer: Amanda Moran <am...@apache.com>
Committed: Wed Oct 28 22:02:36 2015 +0000

----------------------------------------------------------------------
 install/installer/traf_cloudera_mods98 | 86 ++++++++++-------------------
 1 file changed, 28 insertions(+), 58 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/28dff27d/install/installer/traf_cloudera_mods98
----------------------------------------------------------------------
diff --git a/install/installer/traf_cloudera_mods98 b/install/installer/traf_cloudera_mods98
index ed7ac9e..062e206 100755
--- a/install/installer/traf_cloudera_mods98
+++ b/install/installer/traf_cloudera_mods98
@@ -100,86 +100,56 @@ fi
 # create new directories for bulkload and lobs if not already there
 rm $LOCAL_WORKDIR/traf_temp_output 2>/dev/null
 
-count=0
-for node in $HADOOP_NODES
-do
-   isClouderaRunning=$(ssh -q -n $node sudo /etc/init.d/cloudera-scm-server status)
-
-   clouderaUp=$(echo $isClouderaRunning | grep "running" | wc -l)
-
-   if [[ "$clouderaUp" -eq "1" ]]; then
-      echo "***INFO: Cloudera Manager is on $node"
-      CDH_START_NODE=$node
-      break
-   fi
-   count=$[$count+1]
-   if [[ $count -ge $hadoop_node_count ]]; then
-      echo "***ERROR: Could not find Cloudera Server status on any node"
-      echo "***ERROR: Restart Cloudera Server" 
-      exit -1 
-   fi
-done
-
-echo "export HADOOP_START_NODE=\"$CDH_START_NODE\"" >> $TRAF_CONFIG
-sudo chmod 777 $TRAF_CONFIG
-source $TRAF_CONFIG
-
 #Copy hbase-site.xml file
-ssh -q -n $CDH_START_NODE sudo cp /etc/hbase/conf/hbase-site.xml $HOME
-ssh -q -n $CDH_START_NODE sudo chown $(whoami).$(whoami) $HOME/hbase-site.xml
-ssh -q -n $CDH_START_NODE sudo chmod 777 $HOME/hbase-site.xml
+sudo cp /etc/hbase/conf/hbase-site.xml $HOME
+sudo chown $(whoami).$(whoami) $HOME/hbase-site.xml
+sudo chmod 777 $HOME/hbase-site.xml
 
-scp -q $(whoami)@$CDH_START_NODE:$HOME/hbase-site.xml $HOME
-if [[ $? -ne 0 ]]; then
-   echo "***ERROR: Unable to find /etc/hbase/conf/hbase-site.xml file on $CDH_START_NODE or unable to copy."
-   exit -1
-fi
 sudo cp $HOME/hbase-site.xml $TRAF_WORKDIR
 sudo chown trafodion.trafodion $TRAF_WORKDIR/hbase-site.xml
 
-
-
-ssh -q -n $CDH_START_NODE 'sudo su' "$HDFS_USER" '--command "hadoop fs -mkdir /hbase-staging" 2> $HOME/traf_temp_output'
+sudo su $HDFS_USER --command "hadoop fs -mkdir /hbase-staging" 2> $HOME/traf_temp_output
 if [ $? != 0 ]; then
    # ok if directory already exists
-   dir_exists=$(ssh -q -n $CDH_START_NODE 'grep "File exists" $HOME/traf_temp_output | wc -l')
+   dir_exists=$(grep "File exists" $HOME/traf_temp_output | wc -l)
    if [ $dir_exists -eq 0 ]; then
-      echo "***ERROR: 'hadoop fs -mkdir /hbase-staging' command failed on $CDH_START_NODE"
-      echo "***ERROR: $(ssh -q -n $CDH_START_NODE 'cat $HOME/traf_temp_output')"
+      echo "***ERROR: 'hadoop fs -mkdir /hbase-staging' command failed"
+      echo "***ERROR: $(cat $HOME/traf_temp_output)"
       exit -1
    fi
 fi
-ssh -q -n $CDH_START_NODE 'sudo su' "$HDFS_USER" '--command "hadoop fs -chown -R' "$HBASE_USER"':'"$HBASE_GROUP" '/hbase-staging"'
-ssh -q -n $CDH_START_NODE 'sudo su' "$HDFS_USER" '--command "hadoop fs -mkdir /bulkload" 2> $HOME/traf_temp_output'
+
+sudo su $HDFS_USER --command "hadoop fs -chown -R $HBASE_USER:$HBASE_GROUP /hbase-staging"
+sudo su $HDFS_USER --command "hadoop fs -mkdir /bulkload" 2> $HOME/traf_temp_output
 if [ $? != 0 ]; then
    # ok if directory already exists
-   dir_exists=$(ssh -q -n $CDH_START_NODE 'grep "File exists" $HOME/traf_temp_output | wc -l')
+   dir_exists=$(grep "File exists" $HOME/traf_temp_output | wc -l)
    if [ $dir_exists -eq 0 ]; then
-      echo "***ERROR: 'hadoop fs -mkdir /bulkload' command failed on $CDH_START_NODE"
-      echo "***ERROR: $(ssh -q -n $CDH_START_NODE cat $HOME/traf_temp_output)"
+      echo "***ERROR: 'hadoop fs -mkdir /bulkload' command failed"
+      echo "***ERROR: $(cat $HOME/traf_temp_output)"
       exit -1
    fi
 fi
-ssh -q -n $CDH_START_NODE 'sudo su' "$HDFS_USER" '--command "hadoop fs -chown -R' "$TRAF_USER"':trafodion /bulkload"'
+sudo su $HDFS_USER --command "hadoop fs -chown -R $TRAF_USER:trafodion /bulkload"
 
 # Create lobs directory
-ssh -q -n $CDH_START_NODE 'sudo su' "$HDFS_USER" '--command "hadoop fs -mkdir /lobs" 2> $HOME/traf_temp_output'
+sudo su $HDFS_USER --command "hadoop fs -mkdir /lobs" 2> $HOME/traf_temp_output
 if [ $? != 0 ]; then
    # ok if directory already exists
-   dir_exists=$(ssh -q -n $CDH_START_NODE 'grep "File exists" $HOME/traf_temp_output | wc -l')
+   dir_exists=$(grep "File exists" $HOME/traf_temp_output | wc -l)
    if [ $dir_exists -eq 0 ]; then
-      echo "***ERROR: 'hadoop fs -mkdir /lobs' command failed on $CDH_START_NODE"
-      echo "***ERROR: $(ssh -q -n $CDH_START_NODE 'cat $LOCAL_WORKDIR/traf_temp_output')"
+      echo "***ERROR: 'hadoop fs -mkdir /lobs' command failed"
+      echo "***ERROR: $(cat $LOCAL_WORKDIR/traf_temp_output)"
       exit -1
    fi
 fi
-ssh -q -n $CDH_START_NODE 'sudo su' "$HDFS_USER" '--command "hadoop fs -chown -R' "$TRAF_USER"':trafodion /lobs"'
+sudo su $HDFS_USER --command "hadoop fs -chown -R $TRAF_USER:trafodion /lobs"
 
 #=====================================
 # Modify hadoop settings as needed by Trafodion
 
-ssh -q -n $CDH_START_NODE 'rm $HOME/traf_hdfs1_config_temp 2> /dev/null'
-ssh -q -n $CDH_START_NODE 'rm $HOME/traf_hbase_config_temp 2> /dev/null'
+rm $HOME/traf_hdfs1_config_temp 2> /dev/null
+rm $HOME/traf_hbase_config_temp 2> /dev/null
 
 # change the hdfs configuration using Cloudera's REST API
 curl -X PUT -H 'Content-Type:application/json' -u $ADMIN:$PASSWORD  --data \
@@ -346,33 +316,33 @@ echo "***INFO: Hadoop restart completed successfully"
 
 # wait to make sure HDFS is fully restarted and out of safemode
 echo "***INFO: waiting for HDFS to exit safemode"
-ssh -q -n $CDH_START_NODE 'sudo su hdfs --command "hdfs dfsadmin -safemode wait"'
+sudo su hdfs --command "hdfs dfsadmin -safemode wait"
 
 #====================================================
 # NOTE: These command must be done AFTER acls are 
 #       enabled and HDFS has been restarted
 echo "***INFO: Setting HDFS ACLs for snapshot scan support"
-ssh -q -n $CDH_START_NODE 'sudo su hdfs --command "hdfs dfs -mkdir -p /hbase/archive"'
+sudo su hdfs --command "hdfs dfs -mkdir -p /hbase/archive"
 if [ $? != 0 ]; then
-   echo "***ERROR: (hdfs dfs -mkdir -p /hbase/archive) command failed on $CDH_START_NODE"
+   echo "***ERROR: (hdfs dfs -mkdir -p /hbase/archive) command failed"
    exit -1
 fi
-ssh -q -n $CDH_START_NODE 'sudo su hdfs --command "hdfs dfs -chown hbase:hbase /hbase/archive"'
+sudo su hdfs --command "hdfs dfs -chown hbase:hbase /hbase/archive"
 if [ $? != 0 ]; then
    echo "***ERROR: (hdfs dfs -chown hbase:hbase /hbase/archive) command failed"
    exit -1
 fi
-ssh -q -n $CDH_START_NODE 'sudo su hdfs --command "hdfs dfs -setfacl -R -m user:'"$TRAF_USER"':rwx /hbase/archive"'
+sudo su hdfs --command "hdfs dfs -setfacl -R -m user:$TRAF_USER:rwx /hbase/archive"
 if [ $? != 0 ]; then
    echo "***ERROR: (hdfs dfs -setfacl -R -m user:$TRAF_USER:rwx /hbase/archive) command failed"
    exit -1
 fi
-ssh -q -n $CDH_START_NODE 'sudo su hdfs --command "hdfs dfs -setfacl -R -m default:user:'"$TRAF_USER"':rwx /hbase/archive"'
+sudo su hdfs --command "hdfs dfs -setfacl -R -m default:user:$TRAF_USER:rwx /hbase/archive"
 if [ $? != 0 ]; then
    echo "***ERROR: (hdfs dfs -setfacl -R -m default:user:$TRAF_USER:rwx /hbase/archive) command failed"
    exit -1
 fi
-ssh -q -n $CDH_START_NODE 'sudo su hdfs --command "hdfs dfs -setfacl -R -m mask::rwx /hbase/archive"'
+sudo su hdfs --command "hdfs dfs -setfacl -R -m mask::rwx /hbase/archive"
 if [ $? != 0 ]; then
    echo "***ERROR: (hdfs dfs -setfacl -R -m mask::rwx /hbase/archive) command failed"
    exit -1


[2/2] incubator-trafodion git commit: Merge [TRAFODION-1567] PR 149 Run HDFS commands only on nodes with HDFS

Posted by db...@apache.org.
Merge [TRAFODION-1567] PR 149 Run HDFS commands only on nodes with HDFS


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

Branch: refs/heads/master
Commit: 69309051151b3af3f13040cd2d2636be52a3bd0d
Parents: 54f44ec 28dff27
Author: Dave Birdsall <db...@apache.org>
Authored: Fri Oct 30 15:37:20 2015 +0000
Committer: Dave Birdsall <db...@apache.org>
Committed: Fri Oct 30 15:37:20 2015 +0000

----------------------------------------------------------------------
 install/installer/traf_cloudera_mods98 | 86 ++++++++++-------------------
 1 file changed, 28 insertions(+), 58 deletions(-)
----------------------------------------------------------------------