Github user zellerh commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/138#discussion_r42567486
--- Diff: core/sqf/sql/scripts/install_traf_components ---
@@ -25,17 +25,42 @@ 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
-MY_START_PORT=`cat $HOME/.traf-clports-$USER |grep HADOOP_START_PORT |cut
-d "=" -f2`
-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`
+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
--- End diff --
This duplicates the code in install_local_hadoop. Would it make sense to
add all the ports you need here to sw_env.sh?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---