Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id AF1A1200D62 for ; Fri, 17 Nov 2017 00:48:54 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id ADCF4160BEA; Thu, 16 Nov 2017 23:48:54 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0086E160BF4 for ; Fri, 17 Nov 2017 00:48:53 +0100 (CET) Received: (qmail 91605 invoked by uid 500); 16 Nov 2017 23:48:53 -0000 Mailing-List: contact commits-help@trafodion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: commits@trafodion.apache.org Delivered-To: mailing list commits@trafodion.apache.org Received: (qmail 91596 invoked by uid 99); 16 Nov 2017 23:48:53 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Nov 2017 23:48:53 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 133741807D5 for ; Thu, 16 Nov 2017 23:48:52 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.222 X-Spam-Level: X-Spam-Status: No, score=-4.222 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 6BMsW7GRuSa3 for ; Thu, 16 Nov 2017 23:48:51 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id A52D75FD14 for ; Thu, 16 Nov 2017 23:48:50 +0000 (UTC) Received: (qmail 91508 invoked by uid 99); 16 Nov 2017 23:48:50 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Nov 2017 23:48:50 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3DA6FF5C2D; Thu, 16 Nov 2017 23:48:48 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dbirdsall@apache.org To: commits@trafodion.incubator.apache.org Date: Thu, 16 Nov 2017 23:48:48 -0000 Message-Id: <0bd351d6a0844ca59e1fc2ebb11caeb3@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] incubator-trafodion git commit: [TRAFODION-2806] optimize 'hbase classpath' cmd in sqenvcom.sh archived-at: Thu, 16 Nov 2017 23:48:54 -0000 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 Authored: Wed Nov 15 10:29:58 2017 +0800 Committer: Eason 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