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 2016/05/25 20:34:42 UTC
[20/39] incubator-trafodion git commit: Fixes for TRAFODION-1985
Fixes for TRAFODION-1985
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/10adf4b5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/10adf4b5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/10adf4b5
Branch: refs/heads/master
Commit: 10adf4b56251543ac73705e3ecc61e1646e37ead
Parents: 7b5e5ea
Author: Amanda Moran <am...@apache.com>
Authored: Tue May 10 22:49:36 2016 +0000
Committer: Amanda Moran <am...@apache.com>
Committed: Tue May 10 22:49:36 2016 +0000
----------------------------------------------------------------------
install/installer/dcs_installer | 17 +--
install/installer/rest_installer | 18 +--
install/installer/traf_apache_mods | 2 +-
install/installer/traf_cloudera_mods | 2 +-
install/installer/traf_config | 62 +++++-----
install/installer/traf_config_check | 38 ++++--
install/installer/traf_config_setup | 69 ++---------
install/installer/traf_hortonworks_mods | 4 +-
install/installer/traf_package_setup | 2 +
install/installer/trafodion_config_default | 14 +--
install/installer/trafodion_install | 148 +++++++-----------------
11 files changed, 139 insertions(+), 237 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/10adf4b5/install/installer/dcs_installer
----------------------------------------------------------------------
diff --git a/install/installer/dcs_installer b/install/installer/dcs_installer
index b07a748..cf5e744 100755
--- a/install/installer/dcs_installer
+++ b/install/installer/dcs_installer
@@ -67,7 +67,6 @@ function checkOpts {
typeset DCS_BUILD_FILE=""
typeset DCS_INSTALL_PATH="$MY_SQROOT"
typeset DCS_SERVER_COUNT=""
-typeset REQUIRED_OPTIONS="DCS_BUILD_FILE"
# Parse input parameters
while [[ $# -gt 0 ]]; do
@@ -131,14 +130,18 @@ fi
mkdir -p $DCS_INSTALL_PATH
cd $DCS_INSTALL_PATH
-# untar DCS build into install directory
-echo "***INFO: untarring build file $DCS_BUILD_FILE"
-tar -xzf $DCS_BUILD_FILE
+if [[ "$ONE_TAR_INSTALL" == "Y" ]]; then
+ DCS_DIR="$SQ_ROOT/dcs*"
+else
+ # untar DCS build into install directory
+ echo "***INFO: untarring build file $DCS_BUILD_FILE"
+ tar -xzf $DCS_BUILD_FILE
-# get the dcs install directory name which is imbedded in the tar file
-DCS_DIR=$(tar -tf $DCS_BUILD_FILE | grep --max-count=1 bin | sed -e "s@\(^.*\)/bin/@\1@")
+ # get the dcs install directory name which is imbedded in the tar file
+ DCS_DIR=$(tar -tf $DCS_BUILD_FILE | grep --max-count=1 bin | sed -e "s@\(^.*\)/bin/@\1@")
-DCS_DIR=$DCS_INSTALL_PATH/$DCS_DIR
+ DCS_DIR=$DCS_INSTALL_PATH/$DCS_DIR
+fi
# set env var in sqenvcom.sh for DCS install directory
grep --invert-match "DCS_INSTALL_DIR=" $MY_SQROOT/sqenvcom.sh > $MY_SQROOT/sqenvcom.temp
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/10adf4b5/install/installer/rest_installer
----------------------------------------------------------------------
diff --git a/install/installer/rest_installer b/install/installer/rest_installer
index 5ecf6f5..e3cde2e 100755
--- a/install/installer/rest_installer
+++ b/install/installer/rest_installer
@@ -93,13 +93,17 @@ fi
mkdir -p $REST_INSTALL_PATH
cd $REST_INSTALL_PATH
-# untar REST build into install directory
-echo "***INFO: untarring build file $REST_BUILD_FILE"
-tar -xzf $REST_BUILD_FILE
-
-# get the REST install directory name which is imbedded in the tar file
-REST_DIR=$(tar -tf $REST_BUILD_FILE | grep --max-count=1 bin | sed -e "s@\(^.*\)/bin/@\1@")
-REST_DIR=$REST_INSTALL_PATH/$REST_DIR
+if [[ "$ONE_TAR_INSTALL" == "Y" ]]; then
+ REST_DIR="$SQ_ROOT/rest*"
+else
+ # untar REST build into install directory
+ echo "***INFO: untarring build file $REST_BUILD_FILE"
+ tar -xzf $REST_BUILD_FILE
+
+ # get the REST install directory name which is imbedded in the tar file
+ REST_DIR=$(tar -tf $REST_BUILD_FILE | grep --max-count=1 bin | sed -e "s@\(^.*\)/bin/@\1@")
+ REST_DIR=$REST_INSTALL_PATH/$REST_DIR
+fi
# set env var in sqenvcom.sh for DCS install directory
grep --invert-match "REST_INSTALL_DIR=" $MY_SQROOT/sqenvcom.sh > $MY_SQROOT/sqenvcom.temp
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/10adf4b5/install/installer/traf_apache_mods
----------------------------------------------------------------------
diff --git a/install/installer/traf_apache_mods b/install/installer/traf_apache_mods
index 35bbfcc..cf16918 100755
--- a/install/installer/traf_apache_mods
+++ b/install/installer/traf_apache_mods
@@ -48,7 +48,7 @@ sudo chmod 777 $TRAF_CONFIG
source $TRAF_CONFIG
-hbase_trx_jar="hbase-trx-apache1_0_2-2.0.0.jar"
+hbase_trx_jar="hbase-trx-apache*.jar"
traf_util_jar="trafodion-utility-*.jar"
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/10adf4b5/install/installer/traf_cloudera_mods
----------------------------------------------------------------------
diff --git a/install/installer/traf_cloudera_mods b/install/installer/traf_cloudera_mods
index 2f98efa..f949cb6 100755
--- a/install/installer/traf_cloudera_mods
+++ b/install/installer/traf_cloudera_mods
@@ -235,7 +235,7 @@ curl -k -X PUT -H 'Content-Type:application/json' -u $ADMIN:$PASSWORD --data \
"roleType" : "MASTER",
"items" : [ {
"name" : "hbase_master_config_safety_valve",
- "value" : "<property>\r\n <name>hbase.master.distributed.log.splitting</name>\r\n <value>false</value>\r\n</property>\r\n <property>\r\n <name>hbase.snapshot.master.timeoutMillis</name>\r\n <value>600000</value>\r\n</property>\r\n"
+ "value" : "<property>\r\n <name>hbase.master.distributed.log.splitting</name>\r\n <value>true</value>\r\n</property>\r\n <property>\r\n <name>hbase.snapshot.master.timeoutMillis</name>\r\n <value>600000</value>\r\n</property>\r\n"
} ]
}, {
"roleType" : "REGIONSERVER",
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/10adf4b5/install/installer/traf_config
----------------------------------------------------------------------
diff --git a/install/installer/traf_config b/install/installer/traf_config
index 7bffc03..a765e53 100755
--- a/install/installer/traf_config
+++ b/install/installer/traf_config
@@ -39,27 +39,10 @@ export PDCP="pdcp -R ssh"
TRAF_CONFIG=/etc/trafodion/trafodion_config
source $TRAF_CONFIG
-#============================================
-
-#Info for log file
-
-echo "***INFO: Log file location $INSTALL_LOG"
-
-echo "***INFO: ***Log File: traf_config script***" >> $INSTALL_LOG
-echo >> $INSTALL_LOG
-echo "***INFO: Working directory: $TRAF_WORKDIR" >> $INSTALL_LOG
-echo "***INFO: Build: $BUILD_FILE" >> $INSTALL_LOG
-echo "***INFO: Install Path: $SQ_ROOT" >> $INSTALL_LOG
-echo "***INFO: DCS Build: $DCS_BUILD" >> $INSTALL_LOG
-echo "***INFO: Path to SQCONFIG: $SQCONFIG" >> $INSTALL_LOG
-echo "***INFO: Number of DCS Servers: $DCS_SERVERS_PARM" >> $INSTALL_LOG
-echo "***INFO: Run init_trafodion: $INIT_TRAFODION" >> $INSTALL_LOG
-echo "***INFO: Start Trafodion: $START" >> $INSTALL_LOG
-echo "***INFO: User Id: $USER_NAME" >> $INSTALL_LOG
-echo "***INFO: Hadoop UI URL: $URL_PORT" >> $INSTALL_LOG
-echo >> $INSTALL_LOG
+export traf_filename=$(basename "$TRAF_PACKAGE")
#============================================
+
# Check if logged in as trafodion
userId=$(whoami)
@@ -72,12 +55,6 @@ if [[ "$userId" != "$TRAF_USER" ]]; then
fi
#============================================
-echo "*************************"
-echo "*************************"
-echo " Trafodion Configuration"
-echo "*************************"
-echo "*************************"
-#============================================
# Check if an existing instance is up
process_count=$(cstat -noheader 2>/dev/null | wc -l)
if [ "$process_count" -ne 0 ]; then
@@ -101,10 +78,15 @@ fi
cd $SQ_ROOT
# untar Trafodion build into install directory
-echo "***INFO: untarring build file $TRAF_BUILD to $SQ_ROOT" | tee -a $INSTALL_LOG
-tar -xzf $TRAF_BUILD 2>&1 | tee -a $INSTALL_LOG
+if [[ "$ONE_TAR_INSTALL" == "N" ]]; then
+ echo "***INFO: untarring file $TRAF_BUILD to $SQ_ROOT" | tee -a $INSTALL_LOG
+ tar -xzf $TRAF_BUILD 2>&1 | tee -a $INSTALL_LOG
+else
+ echo "***INFO: untarring file $TRAF_BUILD to $SQ_ROOT" | tee -a $INSTALL_LOG
+ tar -xzf $UNTAR_DIR/$traf_filename 2>&1 | tee -a $INSTALL_LOG
+fi
if [ "$?" != "0" ]; then
- echo "***ERROR: There was a problem untarring the Trafodion build file. Check install log files for details." | tee -a $INSTALL_LOG
+ echo "***ERROR: There was a problem untarring Trafodion tar file. Check install log files for details." | tee -a $INSTALL_LOG
exit -1;
fi
@@ -197,7 +179,12 @@ fi
#==========================================
# install dcs
-$TRAF_WORKDIR/installer/dcs_installer --dcs_build $DCS_BUILD --dcs_servers $DCS_SERVERS_PARM
+if [[ "$ONE_TAR_INSTALL" == "N" ]]; then
+ $TRAF_WORKDIR/installer/dcs_installer --dcs_build $DCS_BUILD --dcs_servers $DCS_SERVERS_PARM
+else
+ $TRAF_WORKDIR/installer/dcs_installer --dcs_servers $DCS_SERVERS_PARM
+fi
+
if [ "$?" != "0" ]; then
echo "***ERROR: DCS install failed. Check install log files for details." | tee -a $INSTALL_LOG
exit -1;
@@ -206,12 +193,21 @@ fi
#==========================================
# install REST Server
-if [ ! -z $REST_BUILD ]; then
- $TRAF_WORKDIR/installer/rest_installer --rest_build $REST_BUILD
+if [[ "$ONE_TAR_INSTALL" == "N" ]]; then
+ if [ ! -z $REST_BUILD ]; then
+ $TRAF_WORKDIR/installer/rest_installer --rest_build $REST_BUILD
+ if [ "$?" != "0" ]; then
+ echo "***ERROR: REST Server install failed. Check install log files for details." | tee -a $INSTALL_LOG
+ exit -1;
+ fi
+ fi
+else
+ $TRAF_WORKDIR/installer/rest_installer
if [ "$?" != "0" ]; then
- echo "***ERROR: REST Server install failed. Check install log files for details." | tee -a $INSTALL_LOG
- exit -1;
+ echo "***ERROR: REST Server install failed. Check install log files for details." | tee -a $INSTALL_LOG
+ exit -1;
fi
fi
+
#==========================================
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/10adf4b5/install/installer/traf_config_check
----------------------------------------------------------------------
diff --git a/install/installer/traf_config_check b/install/installer/traf_config_check
index 6bf3760..dd883f0 100755
--- a/install/installer/traf_config_check
+++ b/install/installer/traf_config_check
@@ -413,13 +413,7 @@ else
#Checking if using 1.7.0_n
if [[ "${THIS_JVM_VER:18:1}" -eq "0" ]] && [[ "$temp_JAVA" -eq "$JAVA7" ]]; then
if [[ "${THIS_JVM_VER:20:1}" -eq "0" ]] || [[ "${THIS_JVM_VER:20:2}" -lt $JAVA65 ]]; then
- #If Java is **less** than than 1.7.0_65 the next command will fail.
- #Install will fail anyways if less than 1.7.0_65
- #Will not fail if Java is 1.7.0_100 or greater
- #Temporary fix to support Java 7 upgrades greater than 100
- if [[ "${THIS_JVM_VER:20:3}" -lt $JAVA_65 ]]; then
- error="true"
- fi
+ error="true"
fi
fi
@@ -435,7 +429,7 @@ else
hadoopPath="$HADOOP_PATH"
hadoopBinPath="$HADOOP_BIN_PATH"
- export PATH="$PATH:$JAVA_HOME/bin"
+ export PATH="$JAVA_HOME/bin:$PATH"
sudo chmod 777 $TRAF_CONFIG
sed -i '/PATH\=/d' $TRAF_CONFIG
echo "export PATH=\"$PATH\"" >>$TRAF_CONFIG
@@ -608,6 +602,10 @@ function setPath {
export PATH=$PATH:$HADOOP_PREFIX/bin:$HADOOP_PREFIX/sbin:$HBASE_HOME/bin
+if [ ! -z $HIVE_HOME ]; then
+ export PATH=$PATH:$HIVE_HOME/bin
+fi
+
sudo chmod 777 $TRAF_CONFIG
sed -i '/PATH\=/d' $TRAF_CONFIG
echo "export PATH=\"$PATH\"" >> $TRAF_CONFIG
@@ -911,19 +909,35 @@ fi
function checkHadoopSupport {
-if [[ -z $TRAF_BUILD ]] || [[ ! -e $TRAF_BUILD ]] ; then
+if [[ "$ONE_TAR_INSTALL" == "N" ]] || [[ -z "$ONE_TAR_INSTALL" ]] ; then
TRAF_BUILD=$(tar -tf $TRAF_PACKAGE | grep "trafodion_.*server")
tar -xzf $TRAF_PACKAGE --directory $LOCAL_WORKDIR
TRAF_BUILD_PATH=$LOCAL_WORKDIR/$TRAF_BUILD
+ install_features_path=$(tar -tf $TRAF_BUILD_PATH | grep "install_features")
+
else
- TRAF_BUILD_PATH=$TRAF_BUILD
+ TRAF_BUILD_PATH=$TRAF_PACKAGE
+ install_features_path=$(tar -tf $TRAF_PACKAGE | grep "install_features")
+
fi
-install_features_path=$(tar -tf $TRAF_BUILD_PATH | grep "install_features")
if [[ ! -z $install_features_path ]]; then
- tar -xzf $TRAF_BUILD_PATH $install_features_path
+ if [[ "$ONE_TAR_INSTALL" == "N" ]]; then
+ tar -xzf $TRAF_BUILD_PATH $install_features_path
+ if [[ $? -ne "0" ]]; then
+ echo "***ERROR: Error with untar of $TRAF_BUILD_PATH"
+ exit -1
+ fi
+ else
+ tar -xzf $TRAF_PACKAGE $install_features_path
+ if [[ $? -ne "0" ]]; then
+ echo "***ERROR: Error with untar of $TRAF_BUILD_PATH"
+ exit -1
+ fi
+ fi
source $install_features_path
+
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
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/10adf4b5/install/installer/traf_config_setup
----------------------------------------------------------------------
diff --git a/install/installer/traf_config_setup b/install/installer/traf_config_setup
index 7256969..e83f19c 100755
--- a/install/installer/traf_config_setup
+++ b/install/installer/traf_config_setup
@@ -301,7 +301,7 @@ echo "export JAVA_HOME=\"$JAVA_HOME\"" >> $LOCAL_TRAF_CONFIG
# TRAF_PACKAGE = the trafodion package tar file which contains trafodion core & dcs
# TRAF_BUILD = the trafodion core tar file extracted from the trafodion package
# DCS_BUILD = the dcs tar file extracted from the trafodion package
-
+# 05/10/2016
if [ -z "$TRAF_PACKAGE" ]; then
TRAF_DEFAULT="$TRAF_BUILD"
else
@@ -328,67 +328,20 @@ if [ ! -f $TRAF_PACKAGE ]; then
exit -1
fi
-# Determine if we have a package or just the trafodion_server tar file
-# Normally, the package file is what should be specified but because
-# we used to not support the package file and required the trafodion core
-# tar file previous users might still specify the trafodion core tar file instead
-# Also, developers might only have trafodion core tar file and not a package
-# tar file.
+# Determine if we have a package that was created before 05/10/2016.
+# Tar files created after 05/10/2016 are no longer a tar of tar packages
+# but just one tar file.
+
package=$(tar -tzf $TRAF_PACKAGE | grep build-version.txt | wc -l )
if [ $package -eq 0 ]; then
- # assume user specified a trafodion core tar file
- UTT_INSTALL="Y"
- TRAF_BUILD=$TRAF_PACKAGE
- TRAF_PACKAGE=""
-
- #TODO: do a quick sanity check on the file to make sure it is a traf build tar file
-
- echo "***INFO: tar file is not a package tar file which includes Trafodion & DCS"
- echo "***INFO: assuming it is a Trafodion build only tar file"
-
- # since it is not a package tar file, we'll need to prompt for the DCS build file
- echo -n "Enter location of DCS tar file [$DCS_BUILD]: "
- read answer
- if [ -z $answer ]; then
- if [ -z $DCS_BUILD ]; then
- echo "***ERROR: Must specify DCS tar file location."
- exit -1
- fi
- else
- DCS_BUILD=$answer
- fi
-
- # make sure file exists
- if [ ! -f $DCS_BUILD ]; then
- echo "***ERROR: $DCS_BUILD does not exist"
- exit -1
- fi
- #TODO: do a quick sanity check on the file to make sure it is a DCS build tar file
-
- # since it is not a package tar file, we'll need to prompt for the rest build file
- echo -n "Enter location of REST tar file [$REST_BUILD]: "
- read answer
- if [ -z $answer ]; then
- if [ -z $REST_BUILD ]; then
- echo "***ERROR: Must specify REST tar file location."
- exit -1
- fi
- else
- REST_BUILD=$answer
- fi
-
- # make sure file exists
- if [ ! -f $REST_BUILD ]; then
- echo "***ERROR: $REST_BUILD does not exist"
- exit -1
- fi
-
- #TODO: do a quick sanity check on the file to make sure it is a rest build tar file
-
+ ONE_TAR_INSTALL="Y"
+ TRAF_BUILD=""
+ DCS_BUILD=""
+ REST_BUILD=""
else
# user specifed a package file
- UTT_INSTALL="N"
+ ONE_TAR_INSTALL="N"
TRAF_BUILD=""
DCS_BUILD=""
REST_BUILD=""
@@ -399,7 +352,7 @@ echo "export TRAF_PACKAGE=\"$TRAF_PACKAGE\"" >> $LOCAL_TRAF_CONFIG
echo "export TRAF_BUILD=\"$TRAF_BUILD\"" >> $LOCAL_TRAF_CONFIG
echo "export DCS_BUILD=\"$DCS_BUILD\"" >> $LOCAL_TRAF_CONFIG
echo "export REST_BUILD=\"$REST_BUILD\"" >> $LOCAL_TRAF_CONFIG
-echo "export UTT_INSTALL=\"$UTT_INSTALL\"" >> $LOCAL_TRAF_CONFIG
+echo "export ONE_TAR_INSTALL=\"$ONE_TAR_INSTALL\"" >> $LOCAL_TRAF_CONFIG
#==============================================
#Backup restore user
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/10adf4b5/install/installer/traf_hortonworks_mods
----------------------------------------------------------------------
diff --git a/install/installer/traf_hortonworks_mods b/install/installer/traf_hortonworks_mods
index b1b49d1..67d1ed3 100755
--- a/install/installer/traf_hortonworks_mods
+++ b/install/installer/traf_hortonworks_mods
@@ -186,7 +186,7 @@ ssh -q -n $HDFS_NODE 'rm -rf $HOME/traf_temp_output'
AMBARI_DIR=/var/lib/ambari-server/resources/scripts
cd $LOCAL_WORKDIR
-ssh -q -n $AMBARI_HOST "$AMBARI_DIR"'/configs.sh -u' "$ADMIN" '-p' "$PASSWORD" '-port' "$PORT" 'set' "$AMBARI_HOST" "$CLUSTER_NAME" 'hbase-site hbase.master.distributed.log.splitting false'
+ssh -q -n $AMBARI_HOST "$AMBARI_DIR"'/configs.sh -u' "$ADMIN" '-p' "$PASSWORD" '-port' "$PORT" 'set' "$AMBARI_HOST" "$CLUSTER_NAME" 'hbase-site hbase.master.distributed.log.splitting true'
if [ $? != 0 ]; then
echo "***ERROR: unable to modify hbase.master.distributed.log.splitting through Ambari's configs.sh script."
echo "***ERROR: Check if Ambari URL is correct, may need to enter external IP address."
@@ -566,7 +566,7 @@ if [ $node_count -ne 1 ]; then
cp $TRAF_CONFIG $LOCAL_WORKDIR
$TRAF_PDCP $LOCAL_WORKDIR/$TRAF_CONFIG_FILE $HOME
$TRAF_PDSH sudo mkdir -p $TRAF_CONFIG_DIR
- $TRAF_PDSH sudo cp $HOME/$TRAF_CONFIG_FILE $TRAF_CONFIG_DIR
+ $TRAF_PDSH sudo cp -rf $HOME/$TRAF_CONFIG_FILE $TRAF_CONFIG_DIR
$TRAF_PDSH sudo chmod 777 $TRAF_CONFIG
fi
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/10adf4b5/install/installer/traf_package_setup
----------------------------------------------------------------------
diff --git a/install/installer/traf_package_setup b/install/installer/traf_package_setup
index e9cf949..f0e9209 100755
--- a/install/installer/traf_package_setup
+++ b/install/installer/traf_package_setup
@@ -64,6 +64,8 @@ if [[ $SUSE_LINUX == "false" ]]; then
epel_rpm="epel-release-6-8.noarch.rpm"
echo "***INFO: Downloading EPEL repo, since not installed."
+ sudo yum --assumeyes install wget 2>> $YUM_LOG >> $YUM_LOG
+
wget http://download.fedoraproject.org/pub/epel/6/x86_64/$epel_rpm
if [ $? != 0 ]; then
echo "***ERROR: Can't download EPEL rpm $epel_rpm"
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/10adf4b5/install/installer/trafodion_config_default
----------------------------------------------------------------------
diff --git a/install/installer/trafodion_config_default b/install/installer/trafodion_config_default
index c807752..34b1b62 100755
--- a/install/installer/trafodion_config_default
+++ b/install/installer/trafodion_config_default
@@ -86,13 +86,9 @@ export EPEL_RPM=""
# full path of the Trafodion package tar file
export TRAF_PACKAGE=""
-# if TRAF_PACKAGE wasn't specified then these two values must be specified
-# TRAF_BUILD is the trafodion_server tar file
-# DCS_BUILD is the DCS tar file
-# REST_BUILD is the REST tar file
-export TRAF_BUILD=""
-export DCS_BUILD=""
-export REST_BUILD=""
+#Default value set to "Y" if using a build BEFORE 05/11/2016 set this to "N"
+export ONE_TAR_INSTALL="Y"
+
# Either "cloudera" or "hortonworks" (all lowercase)
export HADOOP_TYPE=""
@@ -118,13 +114,11 @@ export HBASE_GROUP="hbase"
export HBASE="hbase"
# full path of where to install Trafodion to
-# Example is used below. If $HOME_DIR or $TRAF_USER have been changed
-# then this will need to be changed.
# On an upgrade, it is recommend to choose a different directory.
# First time install : /home/trafodion/traf
# On Upgrade: /home/trafodion/traf_<date>
# By doing this the previous version will remain and allow for an easier rollback.
-export SQ_ROOT="home/trafodion/traf"
+export SQ_ROOT=""
# Start Trafodion after install completes
export START="N"
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/10adf4b5/install/installer/trafodion_install
----------------------------------------------------------------------
diff --git a/install/installer/trafodion_install b/install/installer/trafodion_install
index 2c30af3..3e4eced 100755
--- a/install/installer/trafodion_install
+++ b/install/installer/trafodion_install
@@ -152,9 +152,9 @@ do
done
-HBASE=$(curl -k -su $ADMIN:$PASSWORD $URL/api/v1/clusters/$CLUSTER_NAME/services | grep name | grep hbase | sed -e 's@[,]@@'g | awk '{print $3}' | sed "s/\"//g")
-HDFS=$(curl -k -su $ADMIN:$PASSWORD $URL/api/v1/clusters/$CLUSTER_NAME/services | grep name | grep hdfs | sed -e 's@[,]@@'g | awk '{print $3}' | sed "s/\"//g")
-ZOOKEEPER=$(curl -k -su $ADMIN:$PASSWORD $URL/api/v1/clusters/$CLUSTER_NAME/services | grep name | grep zookeeper | sed -e 's@[,]@@'g | awk '{print $3}' | sed "s/\"//g")
+HBASE=$(curl -k -su $ADMIN:$PASSWORD $URL/api/v1/clusters/$CLUSTER_NAME/services | grep \"name\" | grep hbase | sed -e 's@[,]@@'g | awk '{print $3}' | sed "s/\"//g")
+HDFS=$(curl -k -su $ADMIN:$PASSWORD $URL/api/v1/clusters/$CLUSTER_NAME/services | grep \"name\" | grep hdfs | sed -e 's@[,]@@'g | awk '{print $3}' | sed "s/\"//g")
+ZOOKEEPER=$(curl -k -su $ADMIN:$PASSWORD $URL/api/v1/clusters/$CLUSTER_NAME/services | grep \"name\" | grep zookeeper | sed -e 's@[,]@@'g | awk '{print $3}' | sed "s/\"//g")
sudo chmod 777 $TRAF_CONFIG
sed -i '/hbaseVersion\=/d' $TRAF_CONFIG
@@ -170,13 +170,6 @@ echo "export CDH_VERSION=\"$CDH_VERSION\"" >> $TRAF_CONFIG
sudo chmod 777 $TRAF_CONFIG
sudo rm -rf hbaseVersion.txt
-trafodionFullName=$(basename $TRAF_BUILD)
-echo "***DEBUG: trafodionFullName=$trafodionFullName"
-#Debug version
-trafodionVersion=$(echo $trafodionFullName | sed 's/trafodion_.*server-//' | sed 's/-debug//' | sed 's/.tgz//')
-
-echo "***INFO: Trafodion version = $trafodionVersion"
-
}
#==============================================
@@ -417,57 +410,28 @@ if [[ $CONFIG_COMPLETE ]]; then
fi
#==============================================
-#Run Trafodion scanner
-
-if [[ $UPGRADE_TRAF == "true" ]]; then
- echo
-else
- if [[ "$RUN_SCANNER" == "Y" ]]; then
- echo "***INFO: Running Trafodion Scanner"
- $LOCAL_WORKDIR/tools/trafodion_scanner -l $SCANNER_LOG -t $TRAF_CONFIG \
- -c $LOCAL_WORKDIR/tools/trafodion_scanner.cfg | tee -a $INSTALL_LOG
-
- returnCode=${PIPESTATUS[0]}
-
- case $returnCode in
-
- 2|1)
- echo "***ERROR: Error while running trafodion_scanner."
- echo "***ERROR: Please review logs and fix listed issue(s)."
- exit -1
- ;;
- 3|0)
- echo "***INFO: Trafodion scanner ran without error. Install will continue..."
- ;;
- *)
- echo "***ERROR: Error while running trafodion_scanner."
- exit -1
- ;;
- esac
- fi
-fi
-
-#=============================================
sed -i '/ACCEPT_LICENSE\=/d' $TRAF_CONFIG
echo "export ACCEPT_LICENSE=\"$ACCEPT_LICENSE\"" >> $TRAF_CONFIG
#==============================================
# untar package and files into /usr/lib/trafodion (the new TRAF_WORKDIR)
-# This will be a global location that all tar files are untarred into
-# if we have the package tar file we need to extract
+# if we have the package tar of tar files we need to extract
# trafodion core and dcs and rest-server builds from it
-if [ ! -z $TRAF_PACKAGE ]; then
+# if not then we need to copy to $TRAF_WORKDIR
+
- # create directory to contain build tar files using the
- # timestamp from the package filename
- traf_filename=$(basename "$TRAF_PACKAGE")
- UNTAR_DIR="$TRAF_WORKDIR/${traf_filename%.tar.gz}"
- sudo mkdir -p $UNTAR_DIR
- sudo chmod 755 $UNTAR_DIR
+# create directory to contain build tar files using the
+# timestamp from the package filename
- # untar the package
+traf_filename=$(basename "$TRAF_PACKAGE")
+UNTAR_DIR="$TRAF_WORKDIR/${traf_filename%.tar.gz}"
+sudo mkdir -p $UNTAR_DIR
+sudo chmod 755 $UNTAR_DIR
+
+if [[ "$ONE_TAR_INSTALL" == "N" ]]; then
+
sudo tar -xzf $TRAF_PACKAGE --directory=$UNTAR_DIR
build_file=$(ls $UNTAR_DIR | grep "trafodion_.*server")
@@ -487,53 +451,38 @@ if [ ! -z $TRAF_PACKAGE ]; then
REST_BUILD=$UNTAR_DIR/$build_file
fi
-else
- # we don't have a package and only have the trafodion and dcs build tar files
- # we can't use the package filename timestamp since we don't have a package tar
- # file so we'll just create a directory using the current time
- UNTAR_DIR="$TRAF_WORKDIR/traf_$(date +%F_%H%M)"
- sudo mkdir -p $UNTAR_DIR
- sudo chmod 777 $UNTAR_DIR
-
- sudo cp $TRAF_BUILD $UNTAR_DIR
- if [ $? -ne 0 ]; then
- echo "***ERROR: unable to copy trafodion build ($TRAF_BUILD) to $UNTAR_DIR"
- exit -1
- fi
+ sed -i '/TRAF_BUILD\=/d' $TRAF_CONFIG
+ echo "export TRAF_BUILD=\"$TRAF_BUILD\"" >> $TRAF_CONFIG
+ sed -i '/DCS_BUILD\=/d' $TRAF_CONFIG
+ echo "export DCS_BUILD=\"$DCS_BUILD\"" >> $TRAF_CONFIG
+ sed -i '/REST_BUILD\=/d' $TRAF_CONFIG
+ echo "export REST_BUILD=\"$REST_BUILD\"" >> $TRAF_CONFIG
- sudo cp $DCS_BUILD $UNTAR_DIR
+else
+ sudo cp $TRAF_PACKAGE $UNTAR_DIR
if [ $? -ne 0 ]; then
- echo "***ERROR: unable to copy DCS build ($DCS_BUILD) to $UNTAR_DIR"
+ echo "***ERROR: unable to copy trafodion package ($TRAF_PACKAGE) to $UNTAR_DIR"
exit -1
fi
+
+fi
- if [ ! -z $REST_BUILD ]; then
- sudo cp $REST_BUILD $UNTAR_DIR
- if [ $? -ne 0 ]; then
- echo "***ERROR: unable to copy REST build ($REST_BUILD) to $UNTAR_DIR"
- exit -1
- fi
- fi
-
- build_file=$(basename $TRAF_BUILD)
- TRAF_BUILD=$UNTAR_DIR/$build_file
-
- sudo tar -xzf $TRAF_BUILD --directory=$UNTAR_DIR
-
- build_file=$(basename $DCS_BUILD)
- DCS_BUILD=$UNTAR_DIR/$build_file
+cd $UNTAR_DIR
- build_file=$(basename $REST_BUILD)
- REST_BUILD=$UNTAR_DIR/$build_file
+# clean up any old files left lying around
+sudo rm -rf $UNTAR_DIR/export/lib 2>/dev/null
+# extract the hbase-trx jar file (and others) from the tar file
+if [[ "$ONE_TAR_INSTALL" == "Y" ]]; then
+ sudo tar -xzf $TRAF_PACKAGE export/lib 2>&1 | tee -a $INSTALL_LOG
+else
+ sudo tar -xzf $TRAF_BUILD export/lib 2>&1 | tee -a $INSTALL_LOG
+fi
+if [ ${PIPESTATUS[0]} != 0 ]; then
+ echo "***ERROR: unable to find export/lib/ directory in $TRAF_BUILD" 2>&1 | tee -a $INSTALL_LOG
+ exit -1
fi
-sed -i '/TRAF_BUILD\=/d' $TRAF_CONFIG
-echo "export TRAF_BUILD=\"$TRAF_BUILD\"" >> $TRAF_CONFIG
-sed -i '/DCS_BUILD\=/d' $TRAF_CONFIG
-echo "export DCS_BUILD=\"$DCS_BUILD\"" >> $TRAF_CONFIG
-sed -i '/REST_BUILD\=/d' $TRAF_CONFIG
-echo "export REST_BUILD=\"$REST_BUILD\"" >> $TRAF_CONFIG
# add the untar directory to the config file
sed -i '/UNTAR_DIR\=/d' $TRAF_CONFIG
@@ -547,23 +496,6 @@ if [[ $HADOOP_TYPE != "apache" ]]; then
checkHBaseVersion
fi
#==============================================
-# Determine Trafodion version by parsing it
-# from the trafodion_server tar file.
-# Determine Java version
-
-cd $UNTAR_DIR
-
-# clean up any old files left lying around
-sudo rm -rf $UNTAR_DIR/export/lib 2>/dev/null
-
-# extract the hbase-trx jar file (and others) from the build tar file
-sudo tar -xzf $TRAF_BUILD export/lib 2>&1 | tee -a $INSTALL_LOG
-if [ ${PIPESTATUS[0]} != 0 ]; then
- echo "***ERROR: unable to find export/lib/ directory in $TRAF_BUILD" 2>&1 | tee -a $INSTALL_LOG
- exit -1
-fi
-
-#==============================================
# Run trafodion_setup
echo
echo "******************************"
@@ -821,4 +753,8 @@ source $TRAF_CONFIG
copyConfig
removePassword
echo
+echo "******************************"
+echo " TRAFODION INSTALLATION END"
+echo "******************************"
echo
+