You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by ar...@apache.org on 2016/02/01 22:08:56 UTC

[3/6] incubator-trafodion git commit: Improvements to install_traf_components Fixed copyright issues

Improvements to install_traf_components
Fixed copyright issues


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

Branch: refs/heads/master
Commit: adaa5c739994336cc1a51bd5496e840388d1fadb
Parents: 42fbda1
Author: Anuradha Hegde <an...@esgyn.com>
Authored: Mon Jan 25 21:17:22 2016 +0000
Committer: Anuradha Hegde <an...@esgyn.com>
Committed: Mon Jan 25 21:17:22 2016 +0000

----------------------------------------------------------------------
 .../odbc/odbcclient/unixcli/cli/drvrglobal.h    |  21 +-
 .../unixcli/package/linux64_install.sh          | 397 -------------------
 core/sqf/sql/scripts/install_traf_components    |  68 +++-
 core/sqf/sql/scripts/restcheck                  |  70 ++++
 core/sqf/sql/scripts/uninstall_traf_components  | 141 +++++++
 wms/bin/local-servers.sh                        |   4 +-
 wms/bin/servers.sh                              |   4 +-
 wms/bin/start-wms.sh                            |   6 +-
 wms/bin/stop-wms.sh                             |   8 +-
 wms/bin/wms                                     |   7 +-
 wms/bin/wms-config.sh                           |   7 +-
 wms/bin/wms-daemon.sh                           |   7 +-
 wms/bin/wms-daemons.sh                          |   7 +-
 wms/bin/zookeepers.sh                           |   7 +-
 wms/conf/wms-env.sh                             |  31 +-
 .../trafodion/wms/rest/ServerListResource.java  |   2 +-
 .../org/trafodion/wms/server/ServerManager.java |   2 +-
 .../org/trafodion/wms/server/stats/PStats.java  |   1 +
 wms/src/saveVersion.sh                          |   2 +-
 19 files changed, 322 insertions(+), 470 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/adaa5c73/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/drvrglobal.h
----------------------------------------------------------------------
diff --git a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/drvrglobal.h b/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/drvrglobal.h
index 38d6a6a..a3c9dd0 100644
--- a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/drvrglobal.h
+++ b/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/drvrglobal.h
@@ -237,25 +237,8 @@ typedef enum ERROR_COMPONENT
 #define NO_STRING								"N"
 #define MAX_CAPSULE_NAME_LENGTH					20
 
-#if defined(__LP64__)
-	#if defined(MXLINUX) || defined(MXIA64LINUX) || defined(MXSUNSPARC)
-	#define	DRIVER_DLL_NAME							"libhpodbc64.so"
-	#elif defined(MXHPUX)
-	#define	DRIVER_DLL_NAME							"libhpodbc64.sl"
-	#elif defined(MXAIX)
-	#define	DRIVER_DLL_NAME							"libhpodbc64.a"
-	#endif
-#else
-	#if defined(MXLINUX) || defined(MXIA64LINUX) || defined(MXSUNSPARC) || defined(MXOSS)
-	#define	DRIVER_DLL_NAME							"libhpodbc.so"
-	#elif defined(MXHPUX)
-	#define	DRIVER_DLL_NAME							"libhpodbc.sl"
-	#elif defined(MXAIX)
-	#define	DRIVER_DLL_NAME							"libhpodbc.a"
-	#endif
-#endif /* defined(__LP64__) */
-
-#define TRACE_DLL_NAME							"traf_odbctrace.dll"
+#define	DRIVER_DLL_NAME			        "libtrafodbc64.so"
+#define TRACE_DLL_NAME			        "traf_odbctrace.dll"
 #define TCPIPV4_DLL_NAME                        "traf_tcpipv4.dll"
 #define TCPIPV6_DLL_NAME                        "traf_tcpipv6.dll"
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/adaa5c73/core/conn/unixodbc/odbc/odbcclient/unixcli/package/linux64_install.sh
----------------------------------------------------------------------
diff --git a/core/conn/unixodbc/odbc/odbcclient/unixcli/package/linux64_install.sh b/core/conn/unixodbc/odbc/odbcclient/unixcli/package/linux64_install.sh
deleted file mode 100644
index 92ed24c..0000000
--- a/core/conn/unixodbc/odbc/odbcclient/unixcli/package/linux64_install.sh
+++ /dev/null
@@ -1,397 +0,0 @@
-#!/bin/sh
-
-# @@@ 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 @@@
-
-#set -vx
-
-# This script installs Linux64 HP hpodbc library: libhpodbc_l64.so.?.*.? (where
-# ?.*.? represents the version information: major.minor.bug-fix.)
-# By default driver files are installed in /usr/include/hpodbc (include
-# files), /usr/lib (library file), and in /etc/hpodbc. A user can, if 
-# needed, specify any specific directory for these set of files. 
-# If the non-default directories do not exist, the script will create them.
-# Before installing files, it backs up the old library to a SAV file if it
-# is of the same major version. Different versions will be left alone.
-
-PKG_DIR=
-DIR_VALUE=
-LIB_DIR=
-LIB_NAME=
-ETC_DIR=
-INCLUDE_DIR=
-SAMPLE_DIR=
-#package files, excluding this file
-pkgfiles=(libhpodbc_l64.so.?.*.? MXODSN MD5SUM LICENSE hpsqlext.h connect_test.cpp license.txt libicuucNv44.so.44 libicudataNv44.so.44)
-
-#check whether the package directory has all files (or this script is invoked form "PkgTmp" dir)
-function check_package {
-  let len=${#pkgfiles[*]}
-  let i=0
-  while [ $i -lt $len ]; do
-	  if [ ! -f ${pkgfiles[$i]} ]; then
-		  echo " error! missing the file "" ${pkgfiles[$i]} ""in package!"
-	     echo " exiting ..."
-	     exit -2
-	  fi
-	  (( i++))
-  done
-  PKG_DIR=`pwd`
-}
-
-function license_check {
-
-cat ./license.txt
-
-echo -n "Do you accept the terms of the license (YES/NO): "
-read OPTION
-if [[ $OPTION = YES ]] || [[ $OPTION = yes ]]
-then
-	echo "Thank You...."
-else
-	echo "Please try again when you are ready to accept."
-	echo "Exiting....."
-	exit -4
-fi
-
-echo "Proceeding with install"
-}
-
-function do_prompt {
-    default_value=$1
-    prompt=$2
-    echo -e $prompt
-    while read in
-    do
-        # in case someone types *
-	count=`echo $in | wc -w`
-	if [ $count -gt "1" ]; then
-               echo -e "error! only one value is allowed\n"
-	       echo -e "retrying..."
-	       in=
-               echo -e $prompt
-	       continue
-	fi
-        if [ "$in" ]; then
-            DIR_VALUE=`echo $in|tr -d [:cntrl:] `
-	else
-            export DIR_VALUE=$default_value
-        fi
-        if [ $count = "0" ] || [ $count = "1" ]; then
-            verify_dir "$DIR_VALUE"
-            if [ $? -eq 0 ]; then
-                break
-            else
-		echo -e "\nretrying..."
-		in=
-                echo -e $prompt
-            fi
-        fi
-    done
-}
-
-function verify_dir {
-    echo $1 | /bin/grep "^/.*" > /dev/null 2>&1
-    if [ $? -ne 0 ]; then
-        echo -e "\n** error!  path name must begin with a '/'."
-        return 1
-    fi
-    if ! [ -d $1 ]; then 
-	mkdir -p $1
-	if [[ $? != 0 ]]; then
-		echo -e "\nFailed to create directory $1"
-		echo -e "\nCheck the permissions!"
-		return 1
-	fi
-    fi
-}
-
-function install_lib {
-   #find the version of library in the package
-   ver=`ls libhpodbc_l64.so.?.*.? | cut -d . -f3`
-   cd $DIR_VALUE
-   if (( $? != 0 )); then
-	echo -e "\nCan not cd to $DIR_VALUE"
-        echo -e "exiting....\n"
-	exit -2
-   fi
-   #make sure that only ONE libhpodbc_l64.so.$ver.*.? extsts!
-   let lib_count=`echo libhpodbc_l64.so.$ver.*.? | wc -w`  >/dev/null 2>&1
-   if [ $lib_count -gt "1" ]; then
-       echo -e "\nMore than one library of MAJOR version: $ver exist in $DIR_VALUE!!"
-       echo -e "The files are: \c" 
-       ls libhpodbc_l64.so.$ver.*.?
-       echo -e "\nBack them up and attempt install again "
-       echo -e "Exiting...\n"
-       exit -2
-   fi
-   if [ -f libhpodbc_l64.so.$ver.*.? ]; then 
-      #find the complete name of existing library
-      lib=`ls libhpodbc_l64.so.$ver.*.?`
-      echo -e "\nWarning: major version:" $ver " of hpodbc library "
-      echo -e "already exists! -> $DIR_VALUE/$lib \nsaving it to $DIR_VALUE/$lib.SAV"
-      err=0
-      mv -f $lib $lib.SAV
-      (( err += $? ))
-	  mv -f libicuucNv44.so.44 libicuucNv44.so.44.SAV     
-      (( err += $? ))   
-	  mv -f libicudataNv44.so.44 libicudataNv44.so.44.SAV     
-      (( err += $? ))    
-      #remove link
-      rm -f libhpodbc_l64.so.$ver
-      (( err += $? ))
-      if (( $err !=0 )); then
-	  echo -e "\nError! can not clear previous installation"
-	  echo -e "Check the permissions on $DIR_VALUE/$lib,"
-	  echo "$DIR_VALUE/$lib.SAV, and $DIR_VALUE/libhpodbc_l64.so.$ver"
-          echo -e "Exiting...\n"
-	  exit -2
-      fi
-   fi
-   #copy library
-   err=0
-   cp -f $PKG_DIR/libicuucNv44.so.44  .
-   (( err += $? ))
-   chmod 555 libicuucNv44.so.44
-   (( err += $? ))
-   rm -f libicuucNv44.so
-   (( err += $? ))
-   ln -s libicuucNv44.so.44 libicuucNv44.so
-   (( err += $? ))
-   cp -f $PKG_DIR/libicudataNv44.so.44  .
-   (( err += $? ))
-   chmod 555 libicudataNv44.so.44
-   (( err += $? ))       
-   rm -f libicudataNv44.so
-   (( err += $? ))       
-   ln -s libicudataNv44.so.44 libicudataNv44.so
-   (( err += $? ))       
-   cp -f $PKG_DIR/libhpodbc_l64.so.?.*.? .
-   (( err += $? ))
-   ln -s libhpodbc_l64.so.$ver.*.? libhpodbc_l64.so.$ver
-   (( err += $? ))
-   rm -f libhpodbc64.so
-   (( err += $? ))
-   ln -s libhpodbc_l64.so.$ver libhpodbc64.so 
-   (( err += $? ))
-   chmod 555 libhpodbc64.so 
-   (( err += $? ))
-   cd $PKG_DIR
-   (( err += $? ))
-   LIB_NAME=`ls libhpodbc_l64.so.$ver.*.? `
-   (( err += $? ))
-   if (( $err != 0 )); then
-     echo "driver installation failed.."
-     echo "check the permission settings for $DIR_VALUE"
-     echo "exiting.."
-     exit -2
-   fi
-}
-
-function install_drvr_lib {
-   #find the version of library in the package
-   ver=`ls libhpodbc_l64_drvr.so.?.*.? | cut -d . -f3`
-   cd $DIR_VALUE
-   if (( $? != 0 )); then
-        echo -e "\nCan not cd to $DIR_VALUE"
-        echo -e "exiting....\n"
-        exit -2
-   fi
-   #make sure that only ONE libhpodbc_l64.so.$ver.*.? extsts!
-   let lib_count=`echo libhpodbc_l64_drvr.so.$ver.*.? | wc -w`  >/dev/null 2>&1
-   if [ $lib_count -gt "1" ]; then
-       echo -e "\nMore than one library of MAJOR version: $ver exist in $DIR_VALUE!!"
-       echo -e "The files are: \c"
-       ls libhpodbc_l64_drvr.so.$ver.*.?
-       echo -e "\nBack them up and attempt install again "
-       echo -e "Exiting...\n"
-       exit -2
-   fi
-   if [ -f libhpodbc_l64_drvr.so.$ver.*.? ]; then
-      #find the complete name of existing library
-      lib=`ls libhpodbc_l64_drvr.so.$ver.*.?`
-      echo -e "\nWarning: major version:" $ver " of hpodbc library "
-      echo -e "already exists! -> $DIR_VALUE/$lib \nsaving it to $DIR_VALUE/$lib.SAV"
-      err=0
-      mv -f $lib $lib.SAV
-      (( err += $? ))
-      #remove link
-      rm -f libhpodbc_l64_drvr.so.$ver
-      (( err += $? ))
-      if (( $err !=0 )); then
-          echo -e "\nError! can not clear previous installation"
-          echo -e "Check the permissions on $DIR_VALUE/$lib,"
-          echo "$DIR_VALUE/$lib.SAV, and $DIR_VALUE/libhpodbc_l64_drvr.so.$ver"
-          echo -e "Exiting...\n"
-          exit -2
-      fi
-   fi
-   #copy library
-   err=0
-   cp -f $PKG_DIR/libhpodbc_l64_drvr.so.?.*.? .
-   (( err += $? ))
-   ln -s libhpodbc_l64_drvr.so.$ver.*.? libhpodbc_l64_drvr.so.$ver
-   (( err += $? ))
-   rm -f libhpodbc_drvr64.so
-   (( err += $? ))
-   ln -s libhpodbc_l64_drvr.so.$ver libhpodbc_drvr64.so
-   (( err += $? ))
-   chmod 555 libhpodbc_drvr64.so
-   (( err += $? ))
-   cd $PKG_DIR
-   (( err += $? ))
-   LIB_NAME=`ls libhpodbc_l64_drvr.so.$ver.*.? `
-   (( err += $? ))
-   if (( $err != 0 )); then
-     echo "driver installation failed.."
-     echo "check the permission settings for $DIR_VALUE"
-     echo "exiting.."
-     exit -2
-   fi
-}
-
-# copy etc files and include files
-function install_files {
-   err=0
-   let start_index=$1
-   let end_index=$2
-   let index=start_index
-   #MXODSN special case
-   if (( index == 1 )); then 
-     cp -f ${pkgfiles[index]} $DIR_VALUE/${pkgfiles[index]}.template
-     (( err += $? ))
-     (( index += 1 ))
-   fi
-   
-   while (( index <= end_index ))
-   do
-     if [ -f $DIR_VALUE/${pkgfiles[index]} ] ; then
-        cp -f $DIR_VALUE/${pkgfiles[index]} $DIR_VALUE/${pkgfiles[index]}.SAV
-        (( err += $? ))
-     fi
-     cp -f ${pkgfiles[index]} $DIR_VALUE
-     (( err += $? ))
-     (( index += 1 ))
-   done
-   if (( $err != 0 )); then
-	echo "error while copying files to $DIR_VALUE"
-	echo "exiting..."
-	exit -3
-   fi
-}
-
-function copy_sample {
-cp -f connect_test.cpp $DIR_VALUE/connect_test.cpp
-if (( $? != 0 )); then
-   echo "Error copying sample file to $DIR_VALUE"
-   echo "Check the permission on $DIR_VALUE"
-   exit -3
-fi
-}
-
-function display_settings {
-  echo -e "\nHPODBC driver has successfully been installed."
-  echo -e "  * Library $LIB_NAME is installed on $LIB_DIR "
-  echo -e "  * data source template file MXODSN has been copied onto $ETC_DIR"
-  echo -e "  * include files have been copied onto $INCLUDE_DIR"
-  echo -e "  * sample file has been copied onto $SAMPLE_DIR\n"
-}
-
-function check_architecture {
-
-echo "Verifying OS version"
-ARCH=`uname -a`
-
-case "$ARCH" in
-	Linux*x86_64*)
-		echo -e "Architecture verified";;	
-	Linux*i686*)
-		echo -e "You are installing a 64bit library on a 32bit linux"
-		echo -n "installation. Do you want to proceed(yes/no)?"
-		read OPTION
-		if [[ $OPTION = YES ]] || [[ $OPTION = yes ]]
-		then
-			echo "Proceeding with install..."
-		else
-			echo "Exiting...."
-			exit -4
-		fi;;
-	*)
-		echo -e "We are unable to determine the architecture.  This"
-		echo -e "means we could not determine what version of hardware"
-		echo -e "you are using.  This could be problem."
-		echo -n "Do you want to proceed(yes/no)?"
-		read OPTION
-		if [[ $OPTION = YES ]] || [[ $OPTION = yes ]]
-		then
-			echo "Proceeding with install..."
-		else
-			echo "Exiting...."
-			exit -4
-		fi;;
-esac
-}
-
-#Beginning of Install
-echo "\nBeginning Install of HPODBC Libraries\n"
-
-#check_architecture
-check_architecture
-
-#check the package contents
-check_package
-
-# prompt user to accept license
-license_check
-
-#prompt for library
-PROMPT="\nENTER a directory for library files\nOR hit Enter to use the default [/usr/lib64] : \c"
-do_prompt /usr/lib64 "$PROMPT"
-install_lib 
-install_drvr_lib
-#store for display_settings
-LIB_DIR=$DIR_VALUE
-
-#prompt for etc dir
-PROMPT="\nENTER a directory for datasource template file\nOR hit Enter to use the default [/etc/hpodbc] : \c"
-do_prompt /etc/hpodbc "$PROMPT"
-# arg1 is start index into pkgFiles and arg2, the end_index 
-install_files 1 3
-#store for display_settings
-ETC_DIR=$DIR_VALUE
-
-#prompt for include dir
-PROMPT="\nENTER a directory for include files\nOR hit Enter to use the default [/usr/include/hpodbc] : \c"
-do_prompt /usr/include/hpodbc "$PROMPT"
-# arg1 is start index into pkgFiles and arg2, the end_index 
-install_files 4 4
-#store for display_settings
-INCLUDE_DIR=$DIR_VALUE
-
-#prompt for sample dir
-PROMPT="\nENTER a directory for sample\nOR hit Enter to use the default [/etc/hpodbc/sample] : \c"
-do_prompt /etc/hpodbc/sample "$PROMPT"
-#for now just copy this single file
-copy_sample
-#store for display_settings
-SAMPLE_DIR=$DIR_VALUE
-
-display_settings

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/adaa5c73/core/sqf/sql/scripts/install_traf_components
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/install_traf_components b/core/sqf/sql/scripts/install_traf_components
index 33688d5..a84f026 100755
--- a/core/sqf/sql/scripts/install_traf_components
+++ b/core/sqf/sql/scripts/install_traf_components
@@ -369,10 +369,57 @@ YES
 ../
 ../
 EOF
-    cd .. | tee -a ${MY_LOG_FILE}
-    mv TRAFDSN TRAFDSN.orig | tee -a ${MY_LOG_FILE}
-    sed -e "s@TCP:1.2.3.4:23400@TCP:localhost:$MY_DCS_MASTER_PORT@" TRAFDSN.orig >> TRAFDSN | tee -a ${MY_LOG_FILE}
+    cd .. 
+    mv TRAFDSN TRAFDSN.orig 
+    sed -e "s@TCP:1.2.3.4:23400@TCP:localhost:$MY_DCS_MASTER_PORT@" TRAFDSN.orig >> TRAFDSN 
     echo "Successfully installed linux driver in $LNXDRVR"| tee -a ${MY_LOG_FILE}
+    echo "Creating odbcinst.ini file..." |tee -a ${MY_LOG_FILE}
+    cat <<EOF >$LNXDRVR/odbcinst.ini
+[Trafodion]
+Description = Trafodion ODBC Stand Alone Driver
+Driver = $LNXDRVR/libtrafodbc_drvr64.so
+FileUsage = 1
+UsageCount = 1
+AppUnicodeType = utf16
+
+[ODBC]
+Threading = 1
+Trace = Off
+Tracefile = uodbc.trc
+EOF
+    echo "Creating odbc.ini file..." |tee -a ${MY_LOG_FILE}
+    cat <<EOF >$LNXDRVR/odbc.ini
+[ODBC]
+traceFlags              = ERROR
+TraceStart              = 0
+TraceFile               = tracefile.log
+MaxTraceFileSize        = 1024
+
+[ODBC Data Sources]
+traf                        = Trafodion Database
+
+[traf]
+Description                 = Trafodion DSN
+Driver                      = Trafodion
+Catalog                     = TRAFODION
+Schema                      = SEABASE
+DataLang                    = 0
+FetchBufferSize             = SYSTEM_DEFAULT
+Server                      = TCP:localhost:$MY_DCS_MASTER_PORT
+SQL_ATTR_CONNECTION_TIMEOUT = SYSTEM_DEFAULT
+SQL_LOGIN_TIMEOUT           = SYSTEM_DEFAULT
+SQL_QUERY_TIMEOUT           = NO_TIMEOUT
+
+EOF
+    echo "Adding swlnx script..." | tee -a ${MY_LOG_FILE}
+  cat <<EOF >$MY_SQROOT/sql/scripts/swlnx
+#!/bin/sh
+# command to run lnx sample
+  cd $LNXDRVR
+  g++ -g connect_test.cpp -L$LNXDRVR -I/usr/include/odbc -ltrafodbc64 -o connect_test
+  ./connect_test -d Default_DataSource -u ss -p ss
+EOF
+  chmod +x $MY_SQROOT/sql/scripts/swlnx
   fi
 fi
 
@@ -394,6 +441,21 @@ else
     cd $ODBLOC 
     tar -xzf $ODB_TAR | tee -a ${MY_LOG_FILE}
     echo "Successfully installed ODB tool in $ODBLOC"| tee -a ${MY_LOG_FILE}
+    echo "Adding swodb script..." | tee -a ${MY_LOG_FILE}
+  cat <<EOF >$MY_SQROOT/sql/scripts/swodb
+#!/bin/sh
+# command to run odb sample
+cd $ODBLOC/bin
+export ODBCHOME=$LNXDRVR
+export ODBCSYSINI=\$ODBCHOME
+export ODBCINI=\$ODBCHOME/odbc.ini
+export AppUnicodeType=utf16
+
+export LD_LIBRARY_PATH=\$ODBCHOME:$LD_LIBRARY_PATH
+
+./odb64luo -d traf -u ss -p ss -i
+EOF
+  chmod +x $MY_SQROOT/sql/scripts/swodb
   fi
 fi
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/adaa5c73/core/sqf/sql/scripts/restcheck
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/restcheck b/core/sqf/sql/scripts/restcheck
new file mode 100755
index 0000000..a49c730
--- /dev/null
+++ b/core/sqf/sql/scripts/restcheck
@@ -0,0 +1,70 @@
+#!/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 @@@
+
+jpscmd=$JAVA_HOME/bin/jps
+restserver_node=`hostname -f`
+
+if [ -e $SQ_PDSH ]; then
+   L_PDSH="$SQ_PDSH $MY_NODES "
+else
+   L_PDSH=
+fi
+
+restserver_port=`python << EOF
+import os
+from xml.dom import minidom
+
+dcsconfig_dir = os.environ.get('REST_CONF_DIR')
+if not dcsconfig_dir:
+   name = os.environ.get('REST_INSTALL_DIR')
+   restconfig_dir=name+"/conf"
+doc = minidom.parse(restconfig_dir+"/rest-site.xml")
+props = doc.getElementsByTagName("property")
+for prop in props:
+        pname = prop.getElementsByTagName("name")[0]
+        if (pname.firstChild.data == "rest.port"):
+           pvalue = prop.getElementsByTagName("value")[0]
+           restPort=pvalue.firstChild.data
+           print("%s" % (restPort))
+EOF`
+
+actual_restserver_cnt=`$L_PDSH $jpscmd |grep TrafodionRest |wc -l` 
+if [[ ! -z $CLUSTERNAME ]]; then
+   restserver_node=`$L_PDSH $jpscmd |grep TrafodionRest |cut -d":" -f1 |paste -sd ' ' -`
+   restserver_pid=`$L_PDSH $jpscmd |grep TrafodionRest |cut -d" " -f2 |paste -sd ' ' -`
+else
+   restserver_pid=`$L_PDSH $jpscmd |grep TrafodionRest |cut -d" " -f1`
+fi
+
+echo
+if [[ $actual_restserver_cnt > 0 ]]; then
+   if [[ -z $restserver_port ]]; then
+       restserver_port=4200
+   fi
+   echo "TrafodionRest listen port  : "$restserver_port
+   echo "TrafodionRest is up on node: "$restserver_node",pid: "$restserver_pid
+fi
+
+echo
+echo -e "Process\t\tActual\t"
+echo -e "---------\t------\t"
+echo -e "TrafodionRest\t$actual_restserver_cnt\t"
+echo
+

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/adaa5c73/core/sqf/sql/scripts/uninstall_traf_components
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/uninstall_traf_components b/core/sqf/sql/scripts/uninstall_traf_components
new file mode 100755
index 0000000..fc2fc58
--- /dev/null
+++ b/core/sqf/sql/scripts/uninstall_traf_components
@@ -0,0 +1,141 @@
+#!/bin/bash
+
+# This script uninstalls all the traf-components that was installed using install_traf_component script
+
+RM='/bin/rm -rf'
+
+function usage() {
+   LOCAL_HADOOP_DIR=\$MY_SQROOT/sql/local_hadoop
+   prog=`basename $0`
+   echo "$prog { all | dcs | rest | clients | tests }"
+   echo "  all     --- Removes all the installed components (dcs, rest and clients) from $LOCAL_HADOOP_DIR"
+   echo "  dcs     --- Removes DCS from  \$DCS_INSTALL_DIR"
+   echo "  rest    --- Removes REST from \$REST_INSTALL_DIR"
+   echo "  clients --- Removes all the client components (odb, lnxdrvr) from $LOCAL_HADOOP_DIR"
+   echo "  tests   --- Removes various test directories from $LOCAL_HADOOP_DIR"
+}
+
+function uninstall_dcs() {
+  if [[ -d $DCS_INSTALL_DIR ]]; then
+     echo "**** Uninstalling DCS from $DCS_INSTALL_DIR"
+     $RM $DCS_INSTALL_DIR  
+     status_code=$?
+     if [[ $status_code != 0 ]]; then
+        echo "**** Failed to uninstall DCS from $DCS_INSTALL_DIR :"  $status_code
+        echo
+        exit 1
+     else
+        echo "**** Successfully uninstalled DCS from $DCS_INSTALL_DIR"
+     fi
+  else
+     echo "**** Nothing to uninstall for DCS ($DCS_INSTALL_DIR does not exist)"
+  fi
+}
+
+function uninstall_rest() {
+
+  if [[ -d $REST_INSTALL_DIR ]]; then
+     echo "**** Uninstalling REST Server from $REST_INSTALL_DIR"
+     $RM $REST_INSTALL_DIR $MY_SQROOT/sql/scripts/swrest
+     status_code=$?
+     if [[ $status_code != 0 ]]; then
+        echo "**** Failed to uninstall REST from $REST_INSTALL_DIR :"  $status_code
+        echo
+        exit 1
+     else
+        echo "**** Successfully uninstalled REST from $REST_INSTALL_DIR"
+     fi
+  else
+     echo "**** Nothing to uninstall for REST ($REST_INSTALL_DIR does not exist)"
+  fi
+}
+
+function uninstall_clients_dir() {
+
+  CLIENTS_DIR=$MY_SQROOT/sql/local_hadoop/clients
+  LNXDRVR_DIR=$MY_SQROOT/sql/local_hadoop/lnxdrvr
+  ODB_DIR=$MY_SQROOT/sql/local_hadoop/odb
+  if [[ -d $CLIENTS_DIR ]]; then
+     echo "**** Uninstalling clients (lnxdrvr and odb) from $CLIENTS_DIR"
+     $RM $CLIENTS_DIR $LNXDRVR_DIR $ODB_DIR $MY_SQROOT/sql/scripts/swodb $MY_SQROOT/sql/scripts/swlnx
+     status_code=$?
+     if [[ $status_code != 0 ]]; then
+        echo "**** Failed to uninstall clients (lnxdrvr and odb) from $CLIENTS_DIR :"  $status_code
+        echo
+        exit 1
+     else
+        echo "**** Successfully uninstalled clients (lnxdrvr and odb) from $CLIENTS_DIR"
+     fi
+  else
+     echo "**** Nothing to uninstall for clients ($CLIENTS_DIR does not exist)"
+  fi
+}
+
+function uninstall_tests_dir() {
+
+  DCSTEST_DIR=$MY_SQROOT/sql/local_hadoop/dcstests
+  TESTS_DIR=$MY_SQROOT/sql/local_hadoop/tests
+  if [[ -d $DCSTEST_DIR ]]; then
+     echo "**** Uninstalling dcs(jdbc/odbc) tests from $DCSTEST_DIR"
+     $RM $DCSTEST_DIR $MY_SQROOT/sql/scripts/swjdbc $MY_SQROOT/sql/scripts/swpyodbc
+     status_code=$?
+     if [[ $status_code != 0 ]]; then
+        echo "**** Failed to uninstall odbc/jdbc tests directory from $DCSTEST_DIR :"  $status_code
+        echo
+        exit 1
+     else
+        echo "**** Successfully uninstalled dcs(odbc/jdbc) tests directory from $DCSTEST_DIR"
+     fi
+  else
+     echo "**** Nothing to uninstall for dcs(odbc/jdbc) tests ($DCSTEST_DIR does not exist)"
+  fi
+
+  if [[ -d $TESTS_DIR ]]; then
+     echo "**** Uninstalling phoenix tests from $TESTS_DIR"
+     $RM $TESTS_DIR $MY_SQROOT/sql/scripts/swphoenix
+     status_code=$?
+     if [[ $status_code != 0 ]]; then
+        echo "**** Failed to uninstall phoenix tests directory from $TESTS_DIR :"  $status_code
+        echo
+        exit 1
+     else
+        echo "**** Successfully uninstalled phoenix tests from $TESTS_DIR"
+     fi
+  else
+     echo "**** Nothing to uninstall for phoenix tests ($TESTS_DIR does not exist)"
+  fi
+}
+
+#Main
+echo
+if [ ! -z ${MY_SQROOT} ]; then
+   case "$1" in
+      dcs)
+        uninstall_dcs
+        ;;
+      rest)
+        uninstall_rest
+        ;;
+      clients)
+        uninstall_clients_dir
+        ;;
+      tests)
+        uninstall_tests_dir
+        ;;
+      all)
+        uninstall_dcs
+        echo
+        uninstall_rest
+        echo
+        uninstall_clients_dir
+        echo
+        uninstall_tests_dir
+        ;;
+      *)
+        usage
+        echo
+        exit 1
+   esac
+fi
+echo
+exit 0

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/adaa5c73/wms/bin/local-servers.sh
----------------------------------------------------------------------
diff --git a/wms/bin/local-servers.sh b/wms/bin/local-servers.sh
index 8b4c50f..88149ae 100755
--- a/wms/bin/local-servers.sh
+++ b/wms/bin/local-servers.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 #/**
-* @@@ START COPYRIGHT @@@
+# @@@ START COPYRIGHT @@@
 #
 #Licensed to the Apache Software Foundation (ASF) under one
 #or more contributor license agreements.  See the NOTICE file
@@ -19,7 +19,7 @@
 #specific language governing permissions and limitations
 #under the License.
 #
-* @@@ END COPYRIGHT @@@
+# @@@ END COPYRIGHT @@@
 # */
 # This is used for starting multiple servers on the same machine.
 # run it from 'bin/wms'

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/adaa5c73/wms/bin/servers.sh
----------------------------------------------------------------------
diff --git a/wms/bin/servers.sh b/wms/bin/servers.sh
index f74ded0..d792a99 100755
--- a/wms/bin/servers.sh
+++ b/wms/bin/servers.sh
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 #/**
-* @@@ START COPYRIGHT @@@
+# @@@ START COPYRIGHT @@@
 #
 #Licensed to the Apache Software Foundation (ASF) under one
 #or more contributor license agreements.  See the NOTICE file
@@ -19,7 +19,7 @@
 #specific language governing permissions and limitations
 #under the License.
 #
-* @@@ END COPYRIGHT @@@
+# @@@ END COPYRIGHT @@@
 # */
 # 
 # Run a shell command on all server hosts.

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/adaa5c73/wms/bin/start-wms.sh
----------------------------------------------------------------------
diff --git a/wms/bin/start-wms.sh b/wms/bin/start-wms.sh
index 0ac0570..8a05512 100755
--- a/wms/bin/start-wms.sh
+++ b/wms/bin/start-wms.sh
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 #/**
-* @@@ START COPYRIGHT @@@
+# @@@ START COPYRIGHT @@@
 #
 #Licensed to the Apache Software Foundation (ASF) under one
 #or more contributor license agreements.  See the NOTICE file
@@ -19,7 +19,7 @@
 #specific language governing permissions and limitations
 #under the License.
 #
-* @@@ END COPYRIGHT @@@
+# @@@ END COPYRIGHT @@@
 # */
 #
 #/**
@@ -42,4 +42,4 @@ fi
 
 "$bin"/wms-daemons.sh --config "${WMS_CONF_DIR}" start zookeeper
 "$bin"/wms-daemon.sh --config "${WMS_CONF_DIR}" start master
-"$bin"/wms-daemons.sh --config "${WMS_CONF_DIR}" --hosts "${WMS_SERVERS}" start server
\ No newline at end of file
+"$bin"/wms-daemons.sh --config "${WMS_CONF_DIR}" --hosts "${WMS_SERVERS}" start server

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/adaa5c73/wms/bin/stop-wms.sh
----------------------------------------------------------------------
diff --git a/wms/bin/stop-wms.sh b/wms/bin/stop-wms.sh
index aa64f45..49f6e10 100755
--- a/wms/bin/stop-wms.sh
+++ b/wms/bin/stop-wms.sh
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 #/**
-* @@@ START COPYRIGHT @@@
+# @@@ START COPYRIGHT @@@
 #
 #Licensed to the Apache Software Foundation (ASF) under one
 #or more contributor license agreements.  See the NOTICE file
@@ -19,11 +19,9 @@
 #specific language governing permissions and limitations
 #under the License.
 #
-* @@@ END COPYRIGHT @@@
+# @@@ END COPYRIGHT @@@
 # */
 #
-#/**
-# */
 
 # Stop wms daemons.
 
@@ -41,4 +39,4 @@ fi
 
 "$bin"/wms-daemons.sh --config "${WMS_CONF_DIR}" --hosts "${WMS_SERVERS}" stop server 
 "$bin"/wms-daemon.sh --config "${WMS_CONF_DIR}" stop master 
-"$bin"/wms-daemons.sh --config "${WMS_CONF_DIR}" stop zookeeper
\ No newline at end of file
+"$bin"/wms-daemons.sh --config "${WMS_CONF_DIR}" stop zookeeper

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/adaa5c73/wms/bin/wms
----------------------------------------------------------------------
diff --git a/wms/bin/wms b/wms/bin/wms
index cb3edab..eecc74a 100755
--- a/wms/bin/wms
+++ b/wms/bin/wms
@@ -1,6 +1,6 @@
 #! /usr/bin/env bash
 #/**
-* @@@ START COPYRIGHT @@@
+# @@@ START COPYRIGHT @@@
 #
 #Licensed to the Apache Software Foundation (ASF) under one
 #or more contributor license agreements.  See the NOTICE file
@@ -19,10 +19,7 @@
 #specific language governing permissions and limitations
 #under the License.
 #
-* @@@ END COPYRIGHT @@@
-# */
-#/**
-# * Copyright 2007 The Apache Software Foundation
+# @@@ END COPYRIGHT @@@
 # */
 # 
 # The wms command script.  

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/adaa5c73/wms/bin/wms-config.sh
----------------------------------------------------------------------
diff --git a/wms/bin/wms-config.sh b/wms/bin/wms-config.sh
index 8bb02ac..090cb06 100755
--- a/wms/bin/wms-config.sh
+++ b/wms/bin/wms-config.sh
@@ -1,5 +1,5 @@
 #/**
-* @@@ START COPYRIGHT @@@
+# @@@ START COPYRIGHT @@@
 #
 #Licensed to the Apache Software Foundation (ASF) under one
 #or more contributor license agreements.  See the NOTICE file
@@ -18,10 +18,7 @@
 #specific language governing permissions and limitations
 #under the License.
 #
-* @@@ END COPYRIGHT @@@
-# */
-#
-#/**
+# @@@ END COPYRIGHT @@@
 # */
 
 #

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/adaa5c73/wms/bin/wms-daemon.sh
----------------------------------------------------------------------
diff --git a/wms/bin/wms-daemon.sh b/wms/bin/wms-daemon.sh
index 54cc7bc..4dc1c39 100755
--- a/wms/bin/wms-daemon.sh
+++ b/wms/bin/wms-daemon.sh
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 #/**
-* @@@ START COPYRIGHT @@@
+# @@@ START COPYRIGHT @@@
 #
 #Licensed to the Apache Software Foundation (ASF) under one
 #or more contributor license agreements.  See the NOTICE file
@@ -19,10 +19,7 @@
 #specific language governing permissions and limitations
 #under the License.
 #
-* @@@ END COPYRIGHT @@@
-# */
-#
-#/**
+# @@@ END COPYRIGHT @@@
 # */
 # 
 # Runs a WMS command as a daemon.

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/adaa5c73/wms/bin/wms-daemons.sh
----------------------------------------------------------------------
diff --git a/wms/bin/wms-daemons.sh b/wms/bin/wms-daemons.sh
index 5876fd1..02f1b2d 100755
--- a/wms/bin/wms-daemons.sh
+++ b/wms/bin/wms-daemons.sh
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 #/**
-* @@@ START COPYRIGHT @@@
+# @@@ START COPYRIGHT @@@
 #
 #Licensed to the Apache Software Foundation (ASF) under one
 #or more contributor license agreements.  See the NOTICE file
@@ -19,10 +19,7 @@
 #specific language governing permissions and limitations
 #under the License.
 #
-* @@@ END COPYRIGHT @@@
-# */
-#
-#/**
+# @@@ END COPYRIGHT @@@
 # */
 # 
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/adaa5c73/wms/bin/zookeepers.sh
----------------------------------------------------------------------
diff --git a/wms/bin/zookeepers.sh b/wms/bin/zookeepers.sh
index 0621250..f15453a 100755
--- a/wms/bin/zookeepers.sh
+++ b/wms/bin/zookeepers.sh
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 #/**
-* @@@ START COPYRIGHT @@@
+# @@@ START COPYRIGHT @@@
 #
 #Licensed to the Apache Software Foundation (ASF) under one
 #or more contributor license agreements.  See the NOTICE file
@@ -19,12 +19,9 @@
 #specific language governing permissions and limitations
 #under the License.
 #
-* @@@ END COPYRIGHT @@@
+# @@@ END COPYRIGHT @@@
 # */
 #
-#/**
-# */
-# 
 # Run a shell command on all zookeeper hosts.
 #
 # Environment Variables

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/adaa5c73/wms/conf/wms-env.sh
----------------------------------------------------------------------
diff --git a/wms/conf/wms-env.sh b/wms/conf/wms-env.sh
index bf57631..52bb8f0 100644
--- a/wms/conf/wms-env.sh
+++ b/wms/conf/wms-env.sh
@@ -1,5 +1,5 @@
 #/**
-* @@@ START COPYRIGHT @@@
+# @@@ START COPYRIGHT @@@
 #
 #Licensed to the Apache Software Foundation (ASF) under one
 #or more contributor license agreements.  See the NOTICE file
@@ -18,10 +18,7 @@
 #specific language governing permissions and limitations
 #under the License.
 #
-* @@@ END COPYRIGHT @@@
-# */
-#
-#/**
+# @@@ END COPYRIGHT @@@
 # */
 
 # Set environment variables here.
@@ -30,14 +27,22 @@
 # so try to keep things idempotent unless you want to take an even deeper look
 # into the startup scripts (bin/wms, etc.)
 
-# The java implementation to use.  Java 1.6 required.
-# export JAVA_HOME=/usr/java/jdk1.6.0/
+# The java implementation to use.  Java 1.7 required.
+# export JAVA_HOME=/usr/java/jdk1.7.0/
+
+# Add Trafodion to the classpath
+if [ "$MY_SQROOT" != "" ]; then
+  if [ -d $MY_SQROOT ]; then
+    export WMS_CLASSPATH=${CLASSPATH}:
+  fi
+fi
+
 
 # Extra Java CLASSPATH elements.  Optional.
-# export WMS_CLASSPATH=
+# export WMS_CLASSPATH=${WMS_CLASSPATH}:
 
-# The maximum amount of heap to use, in MB. Default is 1000.
-# export WMS_HEAPSIZE=1000
+# The maximum amount of heap to use, in MB. Default is 128.
+# export WMS_HEAPSIZE=128
 
 # Extra Java runtime options.
 # Below are what we set by default.  May only work with SUN JVM.
@@ -97,7 +102,7 @@ export WMS_OPTS="-XX:+UseConcMarkSweepGC"
 # export WMS_NICENESS=10
 
 # The directory where pid files are stored. /tmp by default.
-# export WMS_PID_DIR=/var/hadoop/pids
+# export WMS_PID_DIR=/var/wms/pids
 
 # Seconds to sleep between slave commands.  Unset by default.  This
 # can be useful in large clusters, where, e.g., slave rsyncs can
@@ -106,3 +111,7 @@ export WMS_OPTS="-XX:+UseConcMarkSweepGC"
 
 # Tell WMS whether it should manage it's own instance of Zookeeper or not.
 # export WMS_MANAGES_ZK=true
+
+# Tell WMS where the user program environment lives.
+ export WMS_USER_PROGRAM_HOME=$MY_SQROOT
+

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/adaa5c73/wms/src/main/java/org/trafodion/wms/rest/ServerListResource.java
----------------------------------------------------------------------
diff --git a/wms/src/main/java/org/trafodion/wms/rest/ServerListResource.java b/wms/src/main/java/org/trafodion/wms/rest/ServerListResource.java
index ae84eea..84994ed 100644
--- a/wms/src/main/java/org/trafodion/wms/rest/ServerListResource.java
+++ b/wms/src/main/java/org/trafodion/wms/rest/ServerListResource.java
@@ -75,7 +75,7 @@ public class ServerListResource extends ResourceBase {
  
     try {
     	ServerListModel serverList = new ServerListModel();
-    	serverList.add(new ServerModel("Field1","field2","field3","field4","field5"));
+    	serverList.add(new ServerModel("field2","field3","field4","field5"));
 
     	ResponseBuilder response = Response.ok(serverList);
     	response.cacheControl(cacheControl);

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/adaa5c73/wms/src/main/java/org/trafodion/wms/server/ServerManager.java
----------------------------------------------------------------------
diff --git a/wms/src/main/java/org/trafodion/wms/server/ServerManager.java b/wms/src/main/java/org/trafodion/wms/server/ServerManager.java
index 6c260f0..0419da3 100644
--- a/wms/src/main/java/org/trafodion/wms/server/ServerManager.java
+++ b/wms/src/main/java/org/trafodion/wms/server/ServerManager.java
@@ -154,7 +154,7 @@ public final class ServerManager implements Callable {
                     StringTokenizer st = new StringTokenizer(nodes.get(0), ":");
                     while (st.hasMoreTokens()) {
                         masterHostName = st.nextToken();
-                        masterThriftPort = Integer.parseInt(st.nextToken());
+                        //masterThriftPort = Integer.parseInt(st.nextToken());
                         masterStartTime = Long.parseLong(st.nextToken());
                     }
                     found = true;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/adaa5c73/wms/src/main/java/org/trafodion/wms/server/stats/PStats.java
----------------------------------------------------------------------
diff --git a/wms/src/main/java/org/trafodion/wms/server/stats/PStats.java b/wms/src/main/java/org/trafodion/wms/server/stats/PStats.java
index 777c888..8fe7e18 100644
--- a/wms/src/main/java/org/trafodion/wms/server/stats/PStats.java
+++ b/wms/src/main/java/org/trafodion/wms/server/stats/PStats.java
@@ -124,6 +124,7 @@ public class PStats implements Runnable {
             }
             String schema = Bytes.toString(zkc.getData(parentZnode
                     + Constants.DEFAULT_ZOOKEEPER_ZNODE_STATS, false, stat));
+            LOG.info("AH:: " + schema);
 
             InetAddress ip = InetAddress.getLocalHost();
             LOG.info("hostname " + ip.getCanonicalHostName());

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/adaa5c73/wms/src/saveVersion.sh
----------------------------------------------------------------------
diff --git a/wms/src/saveVersion.sh b/wms/src/saveVersion.sh
index 4fee8fc..0bce11c 100644
--- a/wms/src/saveVersion.sh
+++ b/wms/src/saveVersion.sh
@@ -25,7 +25,7 @@ outputDirectory=$2
 user=`whoami`
 date=`date`
 cwd=`pwd`
-if [ -d ../../.git ]; then
+if [ -d ../.git ]; then
   revision=`git log -1 --pretty=format:"%h"`
   hostname=`hostname`
   url="git://${hostname}${cwd}"