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 2017/11/16 23:48:48 UTC

[1/2] incubator-trafodion git commit: [TRAFODION-2806] optimize 'hbase classpath' cmd in sqenvcom.sh

Repository: incubator-trafodion
Updated Branches:
  refs/heads/master c5519b495 -> 7694a63ed


[TRAFODION-2806] optimize 'hbase classpath' cmd in sqenvcom.sh


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

Branch: refs/heads/master
Commit: 2d9aaa2302f4f747d6095a3c33fb452920500ea8
Parents: e4ef5e3
Author: Eason <hf...@gmail.com>
Authored: Wed Nov 15 10:29:58 2017 +0800
Committer: Eason <hf...@gmail.com>
Committed: Wed Nov 15 10:29:58 2017 +0800

----------------------------------------------------------------------
 core/sqf/sqenvcom.sh | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2d9aaa23/core/sqf/sqenvcom.sh
----------------------------------------------------------------------
diff --git a/core/sqf/sqenvcom.sh b/core/sqf/sqenvcom.sh
index bb1638e..8063225 100644
--- a/core/sqf/sqenvcom.sh
+++ b/core/sqf/sqenvcom.sh
@@ -286,6 +286,17 @@ else
   export LOC_JVMLIBS=$JAVA_HOME/jre/lib/i386/server
 fi
 
+# cache hbase classpath to a file to avoid running hbase command
+# every time when login as trafodion
+CACHED_HBASE_CP_FILE="$TRAF_VAR/hbase_classpath"
+if [[ ! -f $CACHED_HBASE_CP_FILE ]]; then
+  #hbase classpath captures all the right set of jars hbase is using.
+  #this also includes the trx jar that gets installed as part of install.
+  #Additional testing needed.Including it here for future validation.
+  hbase classpath > $CACHED_HBASE_CP_FILE 2>/dev/null
+fi
+lv_hbase_cp=`cat $CACHED_HBASE_CP_FILE`
+
 if [[ -e $TRAF_HOME/sql/scripts/sw_env.sh ]]; then
   # we are on a development system where install_local_hadoop has been
   # executed
@@ -337,8 +348,6 @@ elif [[ -d /opt/cloudera/parcels/CDH ]]; then
   export CURL_INC_DIR=/usr/include
   export CURL_LIB_DIR=/usr/lib64
 
-  lv_hbase_cp=`/opt/cloudera/parcels/CDH/bin/hbase classpath`
-
   # directories with jar files and list of jar files
   # (could try to reduce the number of jars in the classpath)
   export HADOOP_JAR_DIRS="/opt/cloudera/parcels/CDH/lib/hadoop
@@ -369,8 +378,6 @@ elif [[ -n "$(ls /usr/lib/hadoop/hadoop-*cdh*.jar 2>/dev/null)" ]]; then
   export CURL_INC_DIR=/usr/include
   export CURL_LIB_DIR=/usr/lib64
 
-  lv_hbase_cp=`hbase classpath`
-
   # directories with jar files and list of jar files
   # (could try to reduce the number of jars in the classpath)
   export HADOOP_JAR_DIRS="/usr/lib/hadoop
@@ -402,8 +409,6 @@ elif [[ -n "$(ls /etc/init.d/ambari* 2>/dev/null)" ]]; then
   export CURL_INC_DIR=/usr/include
   export CURL_LIB_DIR=/usr/lib64
 
-  lv_hbase_cp=`hbase classpath`
-
   # directories with jar files and list of jar files
   export HADOOP_JAR_DIRS="/usr/hdp/current/hadoop-client
                           /usr/hdp/current/hadoop-client/lib
@@ -573,11 +578,6 @@ EOF
     export HADOOP_JAR_FILES=
     export HIVE_JAR_DIRS="$APACHE_HIVE_HOME/lib"
 
-    #hbase classpath captures all the right set of jars hbase is using.
-    #this also includes the trx jar that gets installed as part of install.
-    #Additional testing needed.Including it here for future validation.
-    lv_hbase_cp=`hbase classpath`
-
     # end of code for Apache Hadoop/HBase installation w/o distro
     export HBASE_TRX_JAR=${HBASE_TRX_ID_APACHE}-${TRAFODION_VER}.jar
     export DTM_COMMON_JAR=trafodion-dtm-apache-${TRAFODION_VER}.jar


[2/2] incubator-trafodion git commit: Merge [TRAFODION-2806] PR 1299 Optimize hbase classpath cmd in sqenvcom.sh

Posted by db...@apache.org.
Merge [TRAFODION-2806] PR 1299 Optimize hbase classpath cmd in sqenvcom.sh


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

Branch: refs/heads/master
Commit: 7694a63ed7810a87f5591e2b9d02f9b5b2b648a5
Parents: c5519b4 2d9aaa2
Author: Dave Birdsall <db...@apache.org>
Authored: Thu Nov 16 23:47:57 2017 +0000
Committer: Dave Birdsall <db...@apache.org>
Committed: Thu Nov 16 23:47:57 2017 +0000

----------------------------------------------------------------------
 core/sqf/sqenvcom.sh | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------