trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ama...@apache.org
Subject [1/4] incubator-trafodion git commit: [[TRAFODION 1884 ]] CDH 5.5 and HDP 2.4 install support
Date Mon, 14 Mar 2016 20:12:40 GMT
Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 17dbda7a1 -> 99557ec60


[[TRAFODION 1884 ]] CDH 5.5 and HDP 2.4 install support

Added check to make sure hbase-trx*.jar is copied to all nodes.

Installer support only for CDH 5.5 and HDP 2.4.


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

Branch: refs/heads/master
Commit: feeb3502cbc5f6f3c626645935495a5b9a0d4303
Parents: 1eb6051
Author: Amanda Moran <amanda@apache.com>
Authored: Fri Mar 11 23:07:21 2016 +0000
Committer: Amanda Moran <amanda@apache.com>
Committed: Fri Mar 11 23:07:21 2016 +0000

----------------------------------------------------------------------
 install/installer/checkHBase              | 37 +++++++++++
 install/installer/parseHBaseSite.py       | 25 ++++----
 install/installer/traf_add_sudoAccess     |  3 +-
 install/installer/traf_cloudera_mods98    | 40 ++++++++----
 install/installer/traf_config_check       | 46 ++++++--------
 install/installer/traf_config_setup       |  5 +-
 install/installer/traf_getHadoopNodes     | 21 +++---
 install/installer/traf_hortonworks_mods98 | 68 +++++++++++++++-----
 install/installer/traf_package_setup      |  2 +-
 install/installer/trafodion_install       | 88 ++++++--------------------
 10 files changed, 182 insertions(+), 153 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/feeb3502/install/installer/checkHBase
----------------------------------------------------------------------
diff --git a/install/installer/checkHBase b/install/installer/checkHBase
new file mode 100755
index 0000000..354ed1a
--- /dev/null
+++ b/install/installer/checkHBase
@@ -0,0 +1,37 @@
+#!/bin/bash
+# @@@ START COPYRIGHT @@@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# @@@ END COPYRIGHT @@@
+
+echo "**INFO: Checking HBase status" 
+
+
+echo 'status' | hbase shell -n | grep "0 dead"
+
+status=$?
+
+if [[ "$status" -ne 0 ]]; then
+   echo "***ERROR: HBase not up"
+   echo "***ERROR: HBase MUST be installed and up for installation"
+   exit -1
+else
+   echo "***INFO: HBase up and running"
+   echo
+fi

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/feeb3502/install/installer/parseHBaseSite.py
----------------------------------------------------------------------
diff --git a/install/installer/parseHBaseSite.py b/install/installer/parseHBaseSite.py
index 043282b..4fb5905 100755
--- a/install/installer/parseHBaseSite.py
+++ b/install/installer/parseHBaseSite.py
@@ -21,6 +21,7 @@
 #
 # @@@ END COPYRIGHT @@@
 
+
 import os
 
 import xml.etree.ElementTree as ET
@@ -30,6 +31,10 @@ hbaseRegion="hbase.regionserver.info.port"
 zooKeeperNodes="hbase.zookeeper.quorum"
 pathToHome= os.environ['HOME']
 
+hbaseMasterInfoPort="60010"
+regionServerInfoPort="60030"
+zookeeperNodeNames=""
+
 tree = ET.parse( pathToHome + '/hbase-site.xml')
 
 root = tree.getroot()
@@ -38,18 +43,14 @@ root = tree.getroot()
 for x in root.findall('property'):
     name = str(x.find('name').text)
     if name == hbaseMaster:
-       value = x.find('value').text
-       f = open( '/etc/trafodion/trafodion_config', 'a')
-       f.write ( 'export HBASE_MASTER_INFO_PORT="' + value + '"\n' )
-       f.close()
+       hbaseMasterInfoPort = x.find('value').text
     if name == hbaseRegion:
-       value = x.find('value').text
-       f = open( '/etc/trafodion/trafodion_config', 'a')
-       f.write ( 'export REGIONSERVER_INFO_PORT="' + value + '"\n' )
-       f.close()
+       regionServerInfoPort = x.find('value').text
     if name == zooKeeperNodes:
-       value = x.find('value').text
-       f = open( '/etc/trafodion/trafodion_config', 'a')
-       f.write ( 'export ZOOKEEPER_NODES="' + value + '"\n' )
-       f.close()
+       zookeeperNodeNames = x.find('value').text
 
+f = open( '/etc/trafodion/trafodion_config', 'a')
+f.write ( 'export HBASE_MASTER_INFO_PORT="' + hbaseMasterInfoPort + '"\n' )
+f.write ( 'export REGIONSERVER_INFO_PORT="' + regionServerInfoPort + '"\n' )
+f.write ( 'export ZOOKEEPER_NODES="' + zookeeperNodeNames + '"\n' )
+f.close()

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/feeb3502/install/installer/traf_add_sudoAccess
----------------------------------------------------------------------
diff --git a/install/installer/traf_add_sudoAccess b/install/installer/traf_add_sudoAccess
index 1e5cc9b..23fd67f 100755
--- a/install/installer/traf_add_sudoAccess
+++ b/install/installer/traf_add_sudoAccess
@@ -40,7 +40,7 @@ function backupRestore {
 
 source $TRAF_CONFIG
 
-echo "## Allow $BACKUP_USER id to run commands needed for backup and restore" >> $BACKUP_USER
+echo "## Allow $BACKUP_USER id to run commands needed for backup and restore" > $BACKUP_USER
 echo "%$BACKUP_USER ALL =(hbase) NOPASSWD: /usr/bin/hbase" >> $BACKUP_USER
 
 }
@@ -74,7 +74,6 @@ fi
 #Main
 echo "***INFO: Creating $TRAF_USER sudo access file"
 echo
-touch trafodion 
 
 if [[ "$ENABLE_HA" == "true" ]]; then
    haSudoAdd

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/feeb3502/install/installer/traf_cloudera_mods98
----------------------------------------------------------------------
diff --git a/install/installer/traf_cloudera_mods98 b/install/installer/traf_cloudera_mods98
index b8da481..edb09e1 100755
--- a/install/installer/traf_cloudera_mods98
+++ b/install/installer/traf_cloudera_mods98
@@ -39,23 +39,18 @@ export PDCP_HADOOP_NODES="$PDCP $MY_HADOOP_NODES"
 cd $UNTAR_DIR
 
 # determine java version for hbase 0.98 only java 1.7 is allowed
-echo "***INFO: Detected JAVA version $JAVA_VERSION"
-if [ "$JAVA_VERSION" == "1.6" ]; then
-   echo "***ERROR: Java 1.6 not supported for Trafodion HBase 0.98"
-   exit -1
-elif [ "$JAVA_VERSION" == "1.7" ]; then
-   if [[ $CDH_5_3_HDP_2_2_SUPPORT == "N" ]]; then
-      if [[ $CDH_5_4_SUPPORT == "Y" ]]; then
+if [[ $CDH_5_3_HDP_2_2_SUPPORT == "N" ]]; then
+   if [[ $CDH_5_4_SUPPORT == "Y" ]] || [[ $CDH_5_5_SUPPORT == "Y" ]]; then
+      if [[ $CDH_VERSION == "5.4" ]]; then
          hbase_trx_jar="hbase-trx-cdh5_4-${TRAF_VERSION}.jar"
       else
-         hbase_trx_jar="hbase-trx-${TRAF_VERSION}.jar" 
-      fi 
+         hbase_trx_jar="hbase-trx-cdh5_5-${TRAF_VERSION}.jar"
+      fi
    else
-      hbase_trx_jar="hbase-trx-cdh5_3-${TRAF_VERSION}.jar"
-   fi
+      hbase_trx_jar="hbase-trx-${TRAF_VERSION}.jar" 
+   fi 
 else
-    echo "***ERROR: unable to determine Hadoop's java version"
-    exit -1
+    hbase_trx_jar="hbase-trx-cdh5_3-${TRAF_VERSION}.jar"
 fi
 
 traf_util_jar="trafodion-utility-${TRAF_VERSION}.jar"
@@ -109,6 +104,25 @@ else
     ssh -q -n $node sudo chmod 644 $HADOOP_PATH/$traf_util_jar
     done
 fi
+
+#====================================
+#Make sure hbase-trx*jar got copied
+
+for node in $HADOOP_NODES
+do
+   copiedOver=$(ssh -q -n $node sudo ls $HADOOP_PATH/hbase-trx* | wc -l)
+   if [[ $copiedOver -ne "1" ]]; then
+      echo "***ERROR: $hbase_trx_jar was not copied on $node"
+      echo "***ERROR: Please investigate why this happened"
+      echo "***ERROR: Trafodion can not start without this. EXITING..."
+      exit -1
+   fi
+done
+
+echo "***INFO: $hbase_trx_jar copied correctly! Huzzah."
+
+
+
 #=====================================
 # create new directories for bulkload and lobs if not already there
 rm $LOCAL_WORKDIR/traf_temp_output 2>/dev/null

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/feeb3502/install/installer/traf_config_check
----------------------------------------------------------------------
diff --git a/install/installer/traf_config_check b/install/installer/traf_config_check
index ef8f603..251e7e6 100755
--- a/install/installer/traf_config_check
+++ b/install/installer/traf_config_check
@@ -426,7 +426,7 @@ else
          fi
        done
     fi
-    export PATH="$PATH:$JAVA_HOME/bin"
+    export PATH=$PATH:$JAVA_HOME/bin
     sudo chmod 777 $TRAF_CONFIG
     sed -i '/PATH\=/d' $TRAF_CONFIG
     echo "export PATH=\"$PATH\"" >>$TRAF_CONFIG
@@ -651,11 +651,11 @@ function checkClouderaVersion {
 
 if [[ $CDH_5_3_HDP_2_2_SUPPORT == "N" ]]; then
    #Check that Cloudera 5.2 or 5.3 are not installed.
-   if [[ "$CDH_5_4_SUPPORT" == "Y" ]]; then
-      nameOfVersion=$(ssh -q -n $node grep "Version" $HOME/hbaseVersion.txt | sed 's/,.*//'
| sed 's/.*\-//' | grep cdh5.4.*)
+   if [[ "$CDH_5_4_SUPPORT" == "Y" ]] || [[ "$CDH_5_5_SUPPORT" == "Y" ]]; then
+      nameOfVersion=$(ssh -q -n $node grep "Version" $HOME/hbaseVersion.txt | sed 's/,.*//'
| sed 's/.*\-//' | grep cdh5.[4-5].*)
       #Check that Cloudera 5.[n>4].* is not installed.
       if [[ -z $nameOfVersion ]]; then
-         versionInstalled=$(ssh -q -n $node grep "Version" $HOME/hbaseVersion.txt | sed 's/,.*//'
| sed 's/.*\-//' | grep cdh[5-6].[0-9].* | wc -l)
+         versionInstalled=$(ssh -q -n $node grep "Version" $HOME/hbaseVersion.txt | sed 's/,.*//'
| sed 's/.*\-//' | grep cdh[6-9].[0-9].* | wc -l)
          if [[ $versionInstalled -gt "0" ]]; then
             errorFound=1
             echo "HADOOP VERSION" >> $ERROR_LOG
@@ -690,18 +690,8 @@ else
    fi
 fi
 
-export HADOOP_PATH="/usr/lib/hbase/lib"
-#Check for Cloudera parcels of packages.
-parcelsInstalled=$(ssh -q -n $node sudo ls /opt/cloudera/parcels/ | wc -l)
-if [[ $parcelsInstalled -gt "0" ]]; then
-   export HADOOP_PATH="/opt/cloudera/parcels/CDH/lib/hbase/lib"
-fi
-
 echo "***INFO: nameOfVersion=$nameOfVersion"
-echo "***INFO: HADOOP_PATH=$HADOOP_PATH"
-sudo chmod 777 $TRAF_CONFIG
-sed -i '/HADOOP_PATH\=/d' $TRAF_CONFIG
-echo "export HADOOP_PATH=\"$HADOOP_PATH\"" >> $TRAF_CONFIG
+echo "here"
 sudo chmod 777 $TRAF_CONFIG
 source $TRAF_CONFIG
 
@@ -731,9 +721,8 @@ if [[ $CDH_5_3_HDP_2_2_SUPPORT == "N" ]]; then
             ssh -q -n $node cat hbaseVersion.txt >> $ERROR_LOG
          fi
        fi
-       export HADOOP_PATH="/usr/lib/hbase/lib"
    else
-       nameOfVersion=$(ssh -q -n $node grep "Version" $HOME/hbaseVersion.txt | sed 's/,.*//'
| sed 's/-.*//' | grep 2.3.*)
+       nameOfVersion=$(ssh -q -n $node grep "Version" $HOME/hbaseVersion.txt | sed 's/,.*//'
| sed 's/-.*//' | grep 2.[3-4].*)
        #Check that HDP 2.[n>3].* is not installed.
        if [[ -z $nameOfVersion ]]; then
           versionInstalled=$(ssh -q -n $node grep "Version" $HOME/hbaseVersion.txt | sed
's/,.*//' | sed 's/-.*//' | sed 's/Version [0-9]*.[0-9]*.[0-9].//g' | grep [1-3].[0-9].* |
wc -l)
@@ -745,7 +734,6 @@ if [[ $CDH_5_3_HDP_2_2_SUPPORT == "N" ]]; then
              ssh -q -n $node cat hbaseVersion.txt >> $ERROR_LOG
           fi
        fi
-   export HADOOP_PATH="/usr/hdp/current/hbase-regionserver/lib"
    fi
 else
    nameOfVersion=$(ssh -q -n $node grep "Version" $HOME/hbaseVersion.txt | sed 's/,.*//'
| sed 's/-.*//' | grep 2.2.*)
@@ -762,14 +750,9 @@ if [[ -z $nameOfVersion ]]; then
       ssh -q -n $node cat hbaseVersion.txt >> $ERROR_LOG
    fi
 fi
-export HADOOP_PATH="/usr/hdp/current/hbase-regionserver/lib"
 
 echo "***INFO: nameOfVersion=$nameOfVersion"
 echo "***INFO: HADOOP_PATH=$HADOOP_PATH"
-sudo chmod 777 $TRAF_CONFIG
-sed -i '/HADOOP_PATH\=/d' $TRAF_CONFIG
-echo "export HADOOP_PATH=\"$HADOOP_PATH\"" >> $TRAF_CONFIG
-sudo chmod 777 $TRAF_CONFIG
 source $TRAF_CONFIG
 
 }
@@ -881,6 +864,15 @@ if [[ ! -z $install_features_path ]]; then
    sudo chmod 777 $TRAF_CONFIG
    echo "export CDH_5_3_HDP_2_2_SUPPORT=\"$CDH_5_3_HDP_2_2_SUPPORT\"" >> $TRAF_CONFIG
    sudo chmod 777 $TRAF_CONFIG
+   if [[ -z $CDH_5_5_SUPPORT ]]; then
+      sudo chmod 777 $TRAF_CONFIG
+      echo "export CDH_5_5_SUPPORT=\"N\"" >> $TRAF_CONFIG
+      sudo chmod 777 $TRAF_CONFIG
+   else
+      sudo chmod 777 $TRAF_CONFIG
+      echo "export CDH_5_5_SUPPORT=\"$CDH_5_5_SUPPORT\"" >> $TRAF_CONFIG
+      sudo chmod 777 $TRAF_CONFIG
+   fi 
    if [[ -z $CDH_5_4_SUPPORT ]]; then
       sudo chmod 777 $TRAF_CONFIG
       echo "export CDH_5_4_SUPPORT=\"N\"" >> $TRAF_CONFIG
@@ -902,10 +894,12 @@ if [[ ! -z $install_features_path ]]; then
 else
    CDH_5_3_HDP_2_2_SUPPORT="N"
    CDH_5_4_SUPPORT="N"
+   CDH_5_5_SUPPORT="N"
    HDP_2_3_SUPPORT="N"
    sudo chmod 777 $TRAF_CONFIG
    echo "export CDH_5_3_HDP_2_2_SUPPORT=\"$CDH_5_3_HDP_2_2_SUPPORT\"" >> $TRAF_CONFIG
    echo "export CDH_5_4_SUPPORT=\"$CDH_5_4_SUPPORT\"" >> $TRAF_CONFIG
+   echo "export CDH_5_5_SUPPORT=\"$CDH_5_5_SUPPORT\"" >> $TRAF_CONFIG
    echo "export HDP_2_3_SUPPORT=\"$HDP_2_3_SUPPORT\"" >> $TRAF_CONFIG
    sudo chmod 777 $TRAF_CONFIG
 fi
@@ -916,11 +910,7 @@ fi
 #===========================================
 #Main 
 
-echo
-echo "************************************"
-echo " Trafodion Configuration File Check"
-echo "************************************"
-echo
+echo " ***INFO: Trafodion Configuration File Check"
 
 setUpErrorLog
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/feeb3502/install/installer/traf_config_setup
----------------------------------------------------------------------
diff --git a/install/installer/traf_config_setup b/install/installer/traf_config_setup
index 4837ca1..23f9834 100755
--- a/install/installer/traf_config_setup
+++ b/install/installer/traf_config_setup
@@ -395,6 +395,7 @@ echo "export UTT_INSTALL=\"$UTT_INSTALL\"" >> $LOCAL_TRAF_CONFIG
 
 #==============================================
 #Backup restore user
+export BACKUP_USER="trafodion"
 
 echo -n "Enter Backup/Restore username (can be Trafodion), default is [$BACKUP_USER]: "
 read answer
@@ -567,7 +568,7 @@ echo "export DCS_PRIMARY_MASTER_NODE=\"$DCS_PRIMARY_MASTER_NODE\"" >>
$LOCAL_TRA
 #==============================================
 #Enable HA
 
-echo -n "Enable High Availability (Y/N), default is N: "
+echo -n "Enable High Avalability (Y/N), default is N: "
 read answer
 
 if [[ ! -z $answer ]]; then
@@ -791,8 +792,6 @@ sudo mkdir -p $TRAF_CONFIG_DIR
 sudo chmod 777 $TRAF_CONFIG_DIR
 sudo cp $LOCAL_TRAF_CONFIG $TRAF_CONFIG
 sudo chmod 777 $TRAF_CONFIG
-echo "***INFO: Configuration file: $TRAF_CONFIG"
-
 
 #==============================================
 #Call user defined prompting script

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/feeb3502/install/installer/traf_getHadoopNodes
----------------------------------------------------------------------
diff --git a/install/installer/traf_getHadoopNodes b/install/installer/traf_getHadoopNodes
index 127d0c2..e397d4a 100755
--- a/install/installer/traf_getHadoopNodes
+++ b/install/installer/traf_getHadoopNodes
@@ -25,22 +25,23 @@ source /etc/trafodion/trafodion_config
 TRAF_CONFIG=/etc/trafodion/trafodion_config
 
 
-echo "***INFO: Getting list of all $HADOOP_TYPE nodes"
-
 curlRC=0
-if [[ $HADOOP_TYPE == "cloudera" ]]; then
+if [ $HADOOP_TYPE == "cloudera" ]; then
    curl -k -su $ADMIN:$PASSWORD $URL/api/v10/hosts > tempFile
    curlRC=$?
    numberHadoopNodes=$(grep -r "hostname" tempFile | wc -l)
    grep -r "hostname" tempFile > tempFile2
 
-   if [[ -d /opt/cloudera/parcels/CDH ]]; then
-      HADOOP_PATH="/opt/cloudera/parcels/CDH/lib/hbase/lib"
-      HADOOP_BIN_PATH="/opt/cloudera/parcels/CDH/bin"
+   if [ -d /opt/cloudera/parcels/CDH ]; then
+      export HADOOP_PATH="/opt/cloudera/parcels/CDH/lib/hbase/lib"
+      export HADOOP_BIN_PATH="/opt/cloudera/parcels/CDH/bin"
    else
-      HADOOP_PATH="/usr/lib/hbase/lib"
-      HADOOP_BIN_PATH="/usr/bin"
+      export HADOOP_PATH="/usr/lib/hbase/lib"
+      export HADOOP_BIN_PATH="/usr/bin"
    fi
+  echo "***INFO: HADOOP_PATH=$HADOOP_PATH"
+  echo "***INFO: HADOOP_BIN_PATH=$HADOOP_BIN_PATH"
+
 fi
 
 if [[ $HADOOP_TYPE == "hortonworks" ]]; then
@@ -49,11 +50,13 @@ if [[ $HADOOP_TYPE == "hortonworks" ]]; then
    numberHadoopNodes=$(grep -r "host_name" tempFile | wc -l)
    grep -r "host_name" tempFile > tempFile2
 
-   if [[ -d /usr/lib/hbase/lib ]]; then
+   if [ -d /usr/lib/hbase/lib ]; then
       HADOOP_PATH="/usr/lib/hbase/lib"
    else
       HADOOP_PATH="/usr/hdp/current/hbase-regionserver/lib"
    fi
+   echo "***INFO: HADOOP_PATH=$HADOOP_PATH"
+
 fi
 
 if [ $curlRC != 0 ]; then

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/feeb3502/install/installer/traf_hortonworks_mods98
----------------------------------------------------------------------
diff --git a/install/installer/traf_hortonworks_mods98 b/install/installer/traf_hortonworks_mods98
index 7070e44..cffb3be 100755
--- a/install/installer/traf_hortonworks_mods98
+++ b/install/installer/traf_hortonworks_mods98
@@ -41,29 +41,20 @@ export PDCP_HADOOP_NODES="$PDCP $MY_HADOOP_NODES"
 cd $UNTAR_DIR
 
 PORT=`echo $URL | sed 's/.*://'`
-AMBARI_HOST=$(echo $URL | sed 's@:.*@@')
+AMBARI_HOST=$(echo $URL | sed 's@.*://@@' | sed 's@:.*@@')
 echo "export AMBARI_HOST=\"$AMBARI_HOST\"" >> $TRAF_CONFIG
 sudo chmod 777 $TRAF_CONFIG
 source $TRAF_CONFIG
 
 #determine java version and choose corresponding jar files
-echo "***INFO: Detected JAVA version $JAVA_VERSION"
-if [ "$JAVA_VERSION" == "1.6" ]; then
-   echo "***ERROR: JAVA 1.6 not supported for Trafodion HBase 0.98"
-   exit -1
-elif [ "$JAVA_VERSION" == "1.7" ] || [ "$JAVA_VERSION" == "1.8" ]; then
-     if [[ $CDH_5_3_HDP_2_2_SUPPORT == "N" ]]; then
-        if [[ $HDP_2_3_SUPPORT == "Y" ]]; then
-           hbase_trx_jar="hbase-trx-hdp2_3-${TRAF_VERSION}.jar"
-        else
-	   hbase_trx_jar="hbase-trx-hdp2_1-${TRAF_VERSION}.jar"
-        fi
-     else
-        hbase_trx_jar="hbase-trx-hdp2_2-${TRAF_VERSION}.jar"
-     fi
+if [[ $CDH_5_3_HDP_2_2_SUPPORT == "N" ]]; then
+   if [[ $HDP_2_3_SUPPORT == "Y" ]]; then
+      hbase_trx_jar="hbase-trx-hdp2_3-${TRAF_VERSION}.jar"
+   else
+      hbase_trx_jar="hbase-trx-hdp2_1-${TRAF_VERSION}.jar"
+   fi
 else
-    echo "***ERROR: unable to determine Hadoop's java version"
-    exit -1
+   hbase_trx_jar="hbase-trx-hdp2_2-${TRAF_VERSION}.jar"
 fi
 
 traf_util_jar="trafodion-utility-${TRAF_VERSION}.jar"
@@ -120,6 +111,23 @@ else
     done
 fi
 
+#=======================================
+#Check that HBase-trx copied to all nodes
+
+for node in $HADOOP_NODES
+do
+   copiedOver=$(ssh -q -n $node sudo ls $HADOOP_PATH/hbase-trx* | wc -l)
+   if [[ $copiedOver -ne "1" ]]; then
+      echo "***ERROR: $hbase_trx_jar was not copied on $node"
+      echo "***ERROR: Please investigate why this happened"
+      echo "***ERROR: Trafodion can not start without this. EXITING..."
+      exit -1
+   fi
+done
+
+echo "***INFO: $hbase_trx_jar copied correctly! Huzzah."
+
+
 
 #Copy hbase-site.xml file
 ssh -q -n $AMBARI_HOST sudo cp /etc/hbase/conf/hbase-site.xml $HOME
@@ -557,6 +565,32 @@ if [ $? != 0 ]; then
    exit -1
 fi
 
+ssh -q -n $AMBARI_HOST 'sudo su hdfs --command "hdfs dfs -mkdir -p /apps/hbase/data/archive/data"'
+if [ $? != 0 ]; then
+   echo "***ERROR: (hdfs dfs -mkdir -p /apps/hbase/data/archive/data) command failed"
+   exit -1
+fi
+
+ssh -q -n $AMBARI_HOST 'sudo su hdfs --command "hdfs dfs -chown hbase:hdfs /apps/hbase/data/archive/data"'
+if [ $? != 0 ]; then
+   echo "***ERROR: (hdfs dfs -chown hbase:hdfs /apps/hbase/data/archive/data) command failed"
+   exit -1
+fi
+
+ssh -q -n $AMBARI_HOST 'sudo su hdfs --command "hdfs dfs -mkdir -p /apps/hbase/data/archive/data/default"'
+if [ $? != 0 ]; then
+   echo "***ERROR: (hdfs dfs -mkdir -p /apps/hbase/data/archive/data/default) command failed"
+   exit -1
+fi
+
+ssh -q -n $AMBARI_HOST 'sudo su hdfs --command "hdfs dfs -chown hbase:hdfs /apps/hbase/data/archive/data/default"'
+if [ $? != 0 ]; then
+   echo "***ERROR: (hdfs dfs -chown hbase:hdfs /apps/hbase/data/archive/data/default) command
failed"
+   exit -1
+fi
+
+
+
 
 # clean up files generated by Ambari's config.sh script
 ssh -q -n $AMBARI_HOST 'rm $HOME/doSet_version*'

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/feeb3502/install/installer/traf_package_setup
----------------------------------------------------------------------
diff --git a/install/installer/traf_package_setup b/install/installer/traf_package_setup
index dbf9a4a..d904090 100755
--- a/install/installer/traf_package_setup
+++ b/install/installer/traf_package_setup
@@ -151,7 +151,7 @@ if [[ $SUSE_LINUX == "false" ]]; then
    # it doesn't hurt if it was already enabled and we try to enable it again
    $TRAF_PDSH sudo yum-config-manager --enable RedHat-6-x86_64-Fedora-EPEL 2>> $YUM_LOG
>> $YUM_LOG
 
-   package_list="sqlite expect perl-DBD-SQLite* protobuf xerces-c perl-Params-Validate perl-Time-HiRes
gzip"
+   package_list="apr apr-util sqlite expect perl-DBD-SQLite* protobuf xerces-c perl-Params-Validate
perl-Time-HiRes gzip"
    if [[ $internetAccess == "true" ]]; then
       for package in $package_list
       do

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/feeb3502/install/installer/trafodion_install
----------------------------------------------------------------------
diff --git a/install/installer/trafodion_install b/install/installer/trafodion_install
index 0b4bd5a..7fc13dd 100755
--- a/install/installer/trafodion_install
+++ b/install/installer/trafodion_install
@@ -68,7 +68,7 @@ function removePassword {
 
  $TRAF_PDSH sudo chmod 777 $TRAF_CONFIG
  $TRAF_PDSH sudo sed -i '/TRAF_USER_PASSWORD\=/d' $TRAF_CONFIG
- $TRAF_PDSH sudo sed -i '/PASSWORD\=/d' $TRAF_CONFIG
+ $TRAF_PDSH sudo sed -i '/\<PASSWORD\>/d' $TRAF_CONFIG
  $TRAF_PDSH sudo chmod 777 $TRAF_CONFIG
 
 }
@@ -93,7 +93,6 @@ do
    if [[ $hbaseInstalled -eq "1" ]]; then
 
       version=$(ssh -q -n $node grep "Version" $HOME/hbaseVersion.txt | sed 's/-.*//' | awk
{'print$2'})
-
       if [[ $HADOOP_TYPE == "hortonworks" ]]; then
          if [[ $CDH_5_3_HDP_2_2_SUPPORT == "N" ]]; then
             if [[ "$HDP_2_3_SUPPORT" == "N" ]]; then
@@ -119,12 +118,18 @@ do
       fi
       if [[ $HADOOP_TYPE == "cloudera" ]]; then
          if [[ $CDH_5_3_HDP_2_2_SUPPORT == "N" ]]; then
-            if [[ $CDH_5_4_SUPPORT == "Y" ]]; then
+            if [[ $CDH_5_4_SUPPORT == "Y" ]] || [[ $CDH_5_5_SUPPORT == "Y" ]]; then
                supportedHBase=$(echo $version | grep "1.0.0" | wc -l)
                if [[ $supportedHBase -eq "0" ]]; then
                   echo "***ERROR: HBase installed must be 1.0.0 on node $node"
                   exit -1
                fi
+               cdhVersion=$(ssh -q -n $node grep "Version" $HOME/hbaseVersion.txt | grep
"cdh5.4.*" | wc -l)
+               if [[ "$cdhVersion" -ge "1" ]]; then
+                  CDH_VERSION="5.4"
+               else
+                  CDH_VERSION="5.5"
+               fi
             else
                supportedHBase=$(echo $version | grep "0.98.1" | wc -l)
                if [[ $supportedHBase -eq "0" ]]; then
@@ -139,6 +144,7 @@ do
                exit -1
             fi
          fi
+
       fi
       hbaseVersion=$(ssh -q -n $node grep "Version" $HOME/hbaseVersion.txt | sed 's/-.*//'
| awk {'print$2'})
       break
@@ -154,6 +160,8 @@ sed -i '/hbaseVersion\=/d' $TRAF_CONFIG
 echo "export hbaseVersion=\"$hbaseVersion\"" >> $TRAF_CONFIG
 sed -i '/HBASE\=/d' $TRAF_CONFIG
 echo "export HBASE=\"$HBASE\"" >> $TRAF_CONFIG
+sed -i '/CDH_VERSION\=/d' $TRAF_CONFIG
+echo "export CDH_VERSION=\"$CDH_VERSION\"" >> $TRAF_CONFIG
 sudo chmod 777 $TRAF_CONFIG
 sudo rm -rf hbaseVersion.txt
 
@@ -247,6 +255,14 @@ export TRAF_CONFIG_FILE=$(basename $TRAF_CONFIG)
 export TRAF_USER="trafodion"
 #==============================================
 #Prechecks 
+#Check if HBase is up
+
+#$LOCAL_WORKDIR/checkHBase
+
+#if [[ "$?" -ne "0" ]]; then
+#   exit -1
+#fi
+
 
 #Check not installing as userid Trafodion
 if [[ "$(whoami)" == "$TRAF_USER" ]]; then
@@ -524,7 +540,6 @@ source $TRAF_CONFIG
 #Check to make sure HBase Version is the correct version
 
 checkHBaseVersion
-
 #==============================================
 # Determine Trafodion version by parsing it
 # from the trafodion_server tar file.
@@ -550,60 +565,9 @@ TRAF_VERSION=$(echo $traf_version | sed -e 's@\([0-9*].*\)-debug@\1@')
 
 # Detect java version
 
-for node in $HADOOP_NODES
-do
-   java_exec=$(ssh -q -n $node ps -C java --noheader -o pid,user,cmd \
-      | grep --max-count=1 " hbase" \
-      | awk '{print $3}' )
-   echo "***DEBUG: HBase's java_exec=$java_exec"
-   if [ ! -z $java_exec ]; then
-      JAVA_VERSION=$(ssh -q -n $node $java_exec -version 2>&1)
-      break;
-      echo "***ERROR: Unable to determine HBase's Java version"
-      echo "***ERROR: Check that HBase is up on node $HOSTNAME"
-      exit -1
-   fi
-done 
-
-if [[ -z $JAVA_VERSION ]]; then
-   echo "***ERROR: Unable to determine HBase's Java version"
-   echo "***ERROR: Check that HBase is up on $CLUSTER_NAME"
-   exit -1
-else
-   JAVA_VERSION=$(echo $JAVA_VERSION \
-      | grep version \
-      | awk '{print $3}' \
-      | sed -e 's@"@@g')
-fi
-
-# test for java 1.7
-java_17=$(echo $JAVA_VERSION | grep "1.7." | wc -l)
-java_18=$(echo $JAVA_VERSION | grep "1.8." | wc -l)
-
-# if not java 1.7 then test for java 1.6
-if [ "$java_17" == "0" ] && [ "$java_18" == "0" ]; then
-   java_16=$(echo $JAVA_VERSION | grep "1.6." | wc -l)
-
-   # if not 1.7 nor 1.6 then we have a problem
-   if [ "$java_16" == "0" ]; then
-      echo "***ERROR: Unsupported HBase java version.  HBase java version must be 1.6 or
1.7"
-      exit -1
-   else
-      JAVA_VERSION="1.6"
-   fi
-else
-   if [[ $java_17 == "0" ]]; then
-      JAVA_VERSION="1.8"
-   else
-      JAVA_VERSION="1.7"
-   fi
-fi
-
 sudo chmod 777 $TRAF_CONFIG
 sed -i '/TRAF_VERSION\=/d' $TRAF_CONFIG
 echo "export TRAF_VERSION=\"$TRAF_VERSION\"" >> $TRAF_CONFIG
-sed -i '/JAVA_VERSION\=/d' $TRAF_CONFIG
-echo "export JAVA_VERSION=\"$JAVA_VERSION\"" >> $TRAF_CONFIG
 sudo chmod 777 $TRAF_CONFIG
 #==============================================
 # Run trafodion_setup
@@ -664,7 +628,6 @@ $TRAF_PDSH sudo chmod 777 $LOCAL_WORKDIR
 copyConfig
 fixPermissions
 
-
 $LOCAL_WORKDIR/traf_sqconfig
 if [ $? != 0 ]; then
    echo "***ERROR: traf_sqconfig script failed."
@@ -766,6 +729,7 @@ if [[ "$LDAP_SECURITY" == "Y" ]]; then
       fi
    fi
 fi
+
 #=============================================
 #Run trafodion_mods
 
@@ -805,17 +769,6 @@ echo "***INFO: Trafodion Mods ran successfully."
 
 #Get HBaseSite.xml information 
 $LOCAL_WORKDIR/parseHBaseSite.py
-
-if [[ $HADOOP_TYPE == "cloudera" ]]; then
-   sudo chmod 777 $TRAF_CONFIG
-   sed -i '/HBASE_MASTER_INFO_PORT\=/d' $TRAF_CONFIG
-   echo "export HBASE_MASTER_INFO_PORT=\"60010\"" >> $TRAF_CONFIG
-   sed -i '/REGIONSERVER_INFO_PORT\=/d' $TRAF_CONFIG
-   echo "export REGIONSERVER_INFO_PORT=\"60030\"" >> $TRAF_CONFIG 
-   sudo chmod 777 $TRAF_CONFIG
-
-fi
-
 #==============================================
 #Install Trafodion
 echo
@@ -853,7 +806,6 @@ if [[ $START_ALL == "Y" ]]; then
      exit -1
   fi
 fi
-
 #==============================================
 MODS_COMPLETE="N"
 sudo chmod 777 $TRAF_CONFIG


Mime
View raw message