trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arvi...@apache.org
Subject [4/5] incubator-trafodion git commit: Added the required ports to sw_env.sh and cleaned up the code
Date Wed, 21 Oct 2015 21:22:28 GMT
 Added the required ports to sw_env.sh and cleaned up the code


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

Branch: refs/heads/master
Commit: f43a24c18c3a586a4f600cca3d19c5e5fb6e0632
Parents: 4e52d03
Author: Anuradha Hegde <hegdean@dev02.trafodion.org>
Authored: Wed Oct 21 00:33:46 2015 +0000
Committer: Anuradha Hegde <hegdean@dev02.trafodion.org>
Committed: Wed Oct 21 00:33:46 2015 +0000

----------------------------------------------------------------------
 core/sqf/sql/scripts/install_local_hadoop    | 16 +++++----
 core/sqf/sql/scripts/install_traf_components | 40 +++--------------------
 2 files changed, 15 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/f43a24c1/core/sqf/sql/scripts/install_local_hadoop
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/install_local_hadoop b/core/sqf/sql/scripts/install_local_hadoop
index f3cff47..7067107 100755
--- a/core/sqf/sql/scripts/install_local_hadoop
+++ b/core/sqf/sql/scripts/install_local_hadoop
@@ -685,6 +685,16 @@ export YARN_HOME=${YARN_HOME}
 export HIVE_HOME=${HIVE_HOME}
 export HBASE_HOME=${HBASE_HOME}
 export MY_HADOOP_HDFS_PORT_NUM=${MY_HADOOP_HDFS_PORT_NUM}
+export MY_HBASE_ZOOKEEPER_PEERPORT_NUM=${MY_HBASE_ZOOKEEPER_PEERPORT_NUM}
+export MY_HBASE_ZOOKEEPER_LEADERPORT_NUM=${MY_HBASE_ZOOKEEPER_LEADERPORT_NUM}
+export MY_HBASE_ZOOKEEPER_PROPERTY_CLIENTPORT_NUM=${MY_HBASE_ZOOKEEPER_PROPERTY_CLIENTPORT_NUM}
+export MY_DCS_MASTER_PORT=${MY_DCS_MASTER_PORT}
+export MY_DCS_MASTER_INFO_PORT=${MY_DCS_MASTER_INFO_PORT}
+export MY_DCS_SERVER_INFO_PORT=${MY_DCS_SERVER_INFO_PORT}
+export MY_REST_SERVER_PORT=${MY_REST_SERVER_PORT}
+export MY_REST_SERVER_SECURE_PORT=${MY_REST_SERVER_SECURE_PORT}
+export MY_DB_MGR_PORT=${MY_DB_MGR_PORT}
+export MY_DB_MGR_SECURE_PORT=${MY_DB_MGR_SECURE_PORT}
 EOF
 
   # now source in this script
@@ -1541,12 +1551,6 @@ if [ ! -r $YARN_HOME/lib/native/libhdfs.so ]; then
   echo "------------------------------------------------------------"
 fi
 
-#For clients
-cat >$HOME/.traf-clports-$USER <<EOF
-DEFAULT_PORT=$USE_DEFAULT_PORT
-HADOOP_START_PORT=$MY_START_PORT
-EOF
-
 echo
 echo "Installed directory size and name = $(du -sh $MY_SW_ROOT)" | tee -a ${MY_LOG_FILE}
 echo

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/f43a24c1/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 8a49b3e..5c293c6 100755
--- a/core/sqf/sql/scripts/install_traf_components
+++ b/core/sqf/sql/scripts/install_traf_components
@@ -24,42 +24,12 @@
 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
-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
-     MY_HBASE_ZOOKEEPER_LEADERPORT_NUM=3888
-     MY_HBASE_ZOOKEEPER_PROPERTY_CLIENTPORT_NUM=2181
-     MY_DCS_MASTER_PORT=23400
-     MY_DCS_MASTER_INFO_PORT=24400
-     MY_DCS_SERVER_INFO_PORT=24410
-     MY_REST_SERVER_PORT=4200
-     MY_REST_SERVER_SECURE_PORT=4201
-     MY_DB_MGR_PORT=4205
-     MY_DB_MGR_SECURE_PORT=4206
+# Source in script to get the list of ports
+if [ -f $MY_SQROOT/sql/scripts/sw_env.sh ]; then
+   . $MY_SQROOT/sql/scripts/sw_env.sh
 else
-     MY_HBASE_ZOOKEEPER_PEERPORT_NUM=`expr $MY_START_PORT + 167`
-     MY_HBASE_ZOOKEEPER_LEADERPORT_NUM=`expr $MY_START_PORT + 168`
-     MY_HBASE_ZOOKEEPER_PROPERTY_CLIENTPORT_NUM=`expr $MY_START_PORT + 170`
-     MY_DCS_MASTER_PORT=`expr $MY_START_PORT + 172`
-     MY_DCS_MASTER_INFO_PORT=`expr $MY_START_PORT + 181`
-     MY_DCS_SERVER_INFO_PORT=`expr $MY_START_PORT + 182`
-     MY_REST_SERVER_PORT=`expr $MY_START_PORT + 193`
-     MY_REST_SERVER_SECURE_PORT=`expr $MY_START_PORT + 194`
-     MY_DB_MGR_PORT=`expr $MY_START_PORT + 195`
-     MY_DB_MGR_SECURE_PORT=`expr $MY_START_PORT + 196`
+   echo "Unable to find $MY_SQROOT/sql/scripts/sw_env.sh to get the list of ports"
+   exit 1;
 fi
 
 # Default location of Trafodion, DCS, REST and Phoenix src folders


Mime
View raw message