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 2015/10/21 23:22:27 UTC

[3/5] incubator-trafodion git commit: Removed the unwanted message from dcsstart and dcsstop command Checked for the existence of start port number

Removed the unwanted message from dcsstart and dcsstop command
Checked for the existence of start port number


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

Branch: refs/heads/master
Commit: 4e52d0319115e46e2e57dffabfe64fd3b0b58983
Parents: fcd8a67
Author: Anuradha Hegde <he...@dev02.trafodion.org>
Authored: Tue Oct 20 23:06:21 2015 +0000
Committer: Anuradha Hegde <he...@dev02.trafodion.org>
Committed: Tue Oct 20 23:06:21 2015 +0000

----------------------------------------------------------------------
 core/sqf/sql/scripts/dcsstart                |  4 +---
 core/sqf/sql/scripts/dcsstop                 |  4 +---
 core/sqf/sql/scripts/install_traf_components | 14 ++++++++++++--
 core/sqf/sql/scripts/reststart               |  4 +---
 core/sqf/sql/scripts/reststop                |  4 +---
 5 files changed, 16 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/4e52d031/core/sqf/sql/scripts/dcsstart
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/dcsstart b/core/sqf/sql/scripts/dcsstart
index ca6a5c3..5bb6140 100755
--- a/core/sqf/sql/scripts/dcsstart
+++ b/core/sqf/sql/scripts/dcsstart
@@ -33,9 +33,7 @@ if [[ $sq_stat == 0 ]]; then
       exit 1;
    fi
 
-   if [ -e ${DCS_START_CMD} ]; then
-     echo "${DCS_START_CMD} found."
-   else 
+   if [ ! -e ${DCS_START_CMD} ]; then
      echo "${DCS_START_CMD} not found."
      exit 1;
    fi

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/4e52d031/core/sqf/sql/scripts/dcsstop
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/dcsstop b/core/sqf/sql/scripts/dcsstop
index b0ed43f..70fbdfa 100755
--- a/core/sqf/sql/scripts/dcsstop
+++ b/core/sqf/sql/scripts/dcsstop
@@ -29,9 +29,7 @@ if [ -z ${DCS_INSTALL_DIR} ]; then
    exit 1;
 fi
 
-if [ -e ${DCS_STOP_CMD} ]; then
-   echo "${DCS_STOP_CMD} found."
-else 
+if [ ! -e ${DCS_STOP_CMD} ]; then
    echo "${DCS_STOP_CMD} not found."
    exit 1;
 fi

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/4e52d031/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 f3f563a..8a49b3e 100755
--- a/core/sqf/sql/scripts/install_traf_components
+++ b/core/sqf/sql/scripts/install_traf_components
@@ -25,8 +25,18 @@ MY_SW_ROOT=$MY_SQROOT/sql/local_hadoop
 MY_LOG_FILE=$MY_SW_ROOT/log/install_traf_components_$(date +%F_%T).log
 
 # Define ports for Trafodion components
-DEFAULT_PORT_USED=`cat $HOME/.traf-clports-$USER |grep DEFAULT_PORT |cut -d "=" -f2`
-MY_START_PORT=`cat $HOME/.traf-clports-$USER |grep HADOOP_START_PORT |cut -d "=" -f2`
+if [ -f "$HOME/.traf-clports-$USER" ]; then
+    DEFAULT_PORT_USED=`cat $HOME/.traf-clports-$USER |grep DEFAULT_PORT |cut -d "=" -f2`
+    MY_START_PORT=`cat $HOME/.traf-clports-$USER |grep HADOOP_START_PORT |cut -d "=" -f2`
+fi
+
+if [ -z "$DEFAULT_PORT_USED" ]; then
+     DEFAULT_PORT_USED="no"
+fi
+
+if [ -z "$MY_START_PORT" ]; then
+    MY_START_PORT=`cat $MY_SQROOT/sql/scripts/sw_env.sh |grep MY_HADOOP_HDFS_PORT_NUM | cut -d "=" -f2`
+fi
 
 if [ $DEFAULT_PORT_USED == 'yes' ]; then
      MY_HBASE_ZOOKEEPER_PEERPORT_NUM=2888

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/4e52d031/core/sqf/sql/scripts/reststart
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/reststart b/core/sqf/sql/scripts/reststart
index 6dc4529..7111be8 100755
--- a/core/sqf/sql/scripts/reststart
+++ b/core/sqf/sql/scripts/reststart
@@ -33,9 +33,7 @@ if [[ $sq_stat == 0 ]]; then
       exit 1;
    fi
 
-   if [ -e ${REST_START_CMD} ]; then
-      echo "${REST_START_CMD} found."
-   else 
+   if [ ! -e ${REST_START_CMD} ]; then
       echo "${REST_START_CMD} not found."
       exit 1;
    fi

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/4e52d031/core/sqf/sql/scripts/reststop
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/reststop b/core/sqf/sql/scripts/reststop
index cffe6d5..b693f6d 100755
--- a/core/sqf/sql/scripts/reststop
+++ b/core/sqf/sql/scripts/reststop
@@ -29,9 +29,7 @@ if [ -z ${REST_INSTALL_DIR} ]; then
    exit 1;
 fi
 
-if [ -e ${REST_STOP_CMD} ]; then
-   echo "${REST_STOP_CMD} found."
-else 
+if [ ! -e ${REST_STOP_CMD} ]; then
    echo "${REST_STOP_CMD} not found."
    exit 1;
 fi