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 2015/09/30 18:39:32 UTC

[06/14] incubator-trafodion git commit: Incorporated review comments

Incorporated review comments


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

Branch: refs/heads/master
Commit: 020e648139cef413ac954d80c63f01fa3a2f6384
Parents: 29dc56e
Author: Anuradha Hegde <an...@esgyn.com>
Authored: Thu Sep 24 06:10:44 2015 +0000
Committer: Anuradha Hegde <an...@esgyn.com>
Committed: Thu Sep 24 06:10:44 2015 +0000

----------------------------------------------------------------------
 .gitignore                                   |  1 +
 core/Makefile                                |  8 +--
 core/rest/Makefile                           |  4 +-
 core/sqf/sql/scripts/dcscheck                |  1 +
 core/sqf/sql/scripts/install_local_hadoop    |  2 +-
 core/sqf/sql/scripts/install_traf_components | 77 +++++++++++++++++------
 dcs/Makefile                                 | 52 +++++++++++++++
 dcs/genvers                                  |  3 +
 8 files changed, 120 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/020e6481/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..8508a5c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/distribution/

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/020e6481/core/Makefile
----------------------------------------------------------------------
diff --git a/core/Makefile b/core/Makefile
index 4378452..94e3b7b 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -74,9 +74,7 @@ jdbc_jar: verhdr
 	    -Dpackaging=jar -DgeneratePom=true | sed -e "s/$$/        ##(JDBCT4)/";exit $${PIPESTATUS[0]}
 
 dcs: verhdr jdbc_jar
-	cd ../dcs && $(MAVEN) site package 2>&1 | sed -e "s/$$/        ##(DCS)/";exit $${PIPESTATUS[0]}
-	mkdir -p ../${DISTRIBUTION_DIR}
-	mv ../dcs/target/dcs*.gz ../${DISTRIBUTION_DIR}/ | sed -e "s/$$/  ##(DCS)/" ; exit $${PIPESTATUS[0]}
+	cd ../dcs && $(MAKE) 2>&1 | sed -e "s/$$/  ##(DCS)/" ; exit $${PIPESTATUS[0]}
 
 ndcs: jdbc_jar foundation
 	cd conn/odbc/src/odbc && $(MAKE) ndcs        2>&1 | sed -e "s/$$/	##(NDCS)/";exit $${PIPESTATUS[0]}
@@ -111,7 +109,7 @@ clean: sqroot
 	cd conn/jdbc_type2 &&		$(ANT) clean && $(MAKE) clean
 	cd rest &&			$(MAKE) clean
 	cd conn/odb &&			$(MAKE) clean
-	cd ../dcs &&			$(MAVEN) clean 
+	cd ../dcs &&			$(MAKE) clean 
 	$(RM) -r ../${DISTRIBUTION_DIR}
 
 cleanall: sqroot
@@ -125,7 +123,7 @@ cleanall: sqroot
 	cd conn/jdbc_type2 &&	        $(ANT) clean && $(MAKE) clean
 	cd rest &&			$(MAKE) clean
 	cd conn/odb &&			$(MAKE) clean
-	cd ../dcs &&			$(MAVEN) clean
+	cd ../dcs &&			$(MAKE) clean
 	$(RM) -r ../${DISTRIBUTION_DIR}
 
 package-all: package pkg-sql-regress pkg-phx-tests pkg-dcs-tests

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/020e6481/core/rest/Makefile
----------------------------------------------------------------------
diff --git a/core/rest/Makefile b/core/rest/Makefile
index a4b4c79..0d74718 100644
--- a/core/rest/Makefile
+++ b/core/rest/Makefile
@@ -37,7 +37,7 @@ build_all:
 	echo "### For full Maven output, see file build_rest.log"
 	set -o pipefail && $(MAVEN) site package -DskipTests | tee build_rest.log | grep --line-buffered -E -e '^\[[^WId]' -e '^\[INFO\] B[Uu][Ii][Ll][Dd]' -e 'to compile'
 	mkdir -p ../../${DISTRIBUTION_DIR}
-	mv target/$(BLD_TRAFODION_REST_TARNAME) ../../${DISTRIBUTION_DIR}/
+	cp target/$(BLD_TRAFODION_REST_TARNAME) ../../${DISTRIBUTION_DIR}/
 	$(RM) $(VFILE)
 
 build_chk:
@@ -46,7 +46,7 @@ build_chk:
 	@if [ $(MY_SQROOT)/export/include/SCMBuildStr.h -nt target/$(BLD_TRAFODION_REST_TARNAME) ]; then echo "update manifest"; $(RM) -f target/$(BLD_TRAFODION_REST_TARNAME); fi
 
 clean:
-	-$(MAVEN) clean | grep ERROR
+	-$(MAVEN) clean | grep ERROR 
 	$(RM) build_rest.log
 	$(RM) $(VFILE)
 	$(RM) ../../${DISTRIBUTION_DIR}/$(BLD_TRAFODION_REST_TARNAME)

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/020e6481/core/sqf/sql/scripts/dcscheck
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/dcscheck b/core/sqf/sql/scripts/dcscheck
index 8539786..4f5274e 100755
--- a/core/sqf/sql/scripts/dcscheck
+++ b/core/sqf/sql/scripts/dcscheck
@@ -133,3 +133,4 @@ else
  echo "Trafodion is not started..."
  echo
 fi
+exit 0

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/020e6481/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 ed06708..d4b2aa4 100755
--- a/core/sqf/sql/scripts/install_local_hadoop
+++ b/core/sqf/sql/scripts/install_local_hadoop
@@ -860,7 +860,7 @@ EOF
 <a href="http://${MY_HOST_1}:${MY_HADOOP_NN_HTTP_PORT_NUM}">HDFS Admin</a>
 <a href="http://${MY_HOST_1}:${MY_YARN_HTTP_PORT_NUM}">Yarn</a>
 <a href="http://${MY_HOST_1}:${MY_HBASE_MASTER_INFO_PORT_NUM}">HBase Master</a>
-<a href="http://${MY_HOST_1}:${MY_DCS_MASTER_PORT}">DCS Master</a>
+<a href="http://${MY_HOST_1}:${MY_DCS_MASTER_INFO_PORT}">DCS Master</a>
 </pre>
 </BODY>
 </HTML>

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/020e6481/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 87ee72d..a4ea09f 100755
--- a/core/sqf/sql/scripts/install_traf_components
+++ b/core/sqf/sql/scripts/install_traf_components
@@ -1,4 +1,22 @@
 #!/bin/bash
+# @@@ START COPYRIGHT @@@ 
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# @@@ END COPYRIGHT @@@
 
 #### Script to install and configure DCS, REST and Phoenix tests...
 
@@ -27,6 +45,10 @@ if [ -z "$PHX_TAR" ]; then
     PHX_TAR=$(ls $TRAF_TARS/phoenix*.tgz 2>/dev/null)
 fi
 
+if [ -z "$DCSTEST_TAR" ]; then
+    DCSTEST_TAR=$(ls $TRAF_TARS/dcs-test*.tgz 2>/dev/null)
+fi
+
 if [ -z "$CLIENT_TAR" ]; then
     CLIENT_TAR=$(ls $TRAF_TARS/*clients*.tgz 2>/dev/null)
 fi
@@ -129,20 +151,6 @@ else
   echo "localhost 4" > servers
   echo "Configured $DCS_HOME/conf/servers" | tee -a ${MY_LOG_FILE}
 
-# Configure DCS test scripts
-  if [[ -n "$DCS_SRC" ]]
-  then
-    echo "Adding swjdbc script...." | tee -a ${MY_LOG_FILE}
-    cat <<EOF >$MY_SQROOT/sql/scripts/swjdbc
-#!/bin/sh
-# command to run JDBC tests
-cd $DCS_SRC/src/test/jdbc_test
-./jdbc_test.py --appid=jdbc_test --user=SOMEUSER --pw=SOMEPASSWORD --javahome=\$JAVA_HOME \\
-  --target=localhost:$MY_DCS_MASTER_PORT \\
-  --jdbctype=T4 --jdbccp=\$MY_SQROOT/export/lib/jdbcT4.jar "\$@"
-EOF
-    chmod +x $MY_SQROOT/sql/scripts/swjdbc
-  fi
 fi
 
 # End of DCS setup
@@ -329,27 +337,56 @@ fi
 
 # End setup of ODB load tool
 
-# Begin setup of PyODBC test
-
 cd $MY_SW_ROOT
 
 echo | tee -a ${MY_LOG_FILE}
-# Begin configure of PyODBC test 
+# Begin setup of PyODBC test
+
+DCSTEST_DIR=$MY_SW_ROOT/dcstests
+
+if [[ -d $DCSTEST_DIR ]]; then
+  echo "DCS tests already exist $DCSTEST_DIR, skipping dcs test setup" | tee -a ${MY_LOG_FILE}
+else
+  if [[ -f $DCSTEST_TAR ]]; then
+    echo "Installing DCS tests $DCSTEST_DIR"| tee -a ${MY_LOG_FILE}
+    mkdir -p $DCSTEST_DIR | tee -a ${MY_LOG_FILE}
+    cd $DCSTEST_DIR
+    tar -xzf $DCSTEST_TAR | tee -a ${MY_LOG_FILE}
+    echo "Successfully installed DCS tests "| tee -a ${MY_LOG_FILE}
+    JDBCTEST_DIR=$DCSTEST_DIR/dcs/src/test/jdbc_test
+    PYODBCTEST_DIR=$DCSTEST_DIR/dcs/src/test/pytests
+  elif [[ -d $DCS_SRC ]]; then
+     echo "DCS test files already exist $DCS_SRC skipping test setup" | tee -a ${MY_LOG_FILE}
+     DCSTEST_DIR=$DCS_SRC
+     JDBCTEST_DIR=$DCSTEST_DIR/src/test/jdbc_test
+     PYODBCTEST_DIR=$DCSTEST_DIR/src/test/pytests
+  fi
+
+  if [[ -d $DCSTEST_DIR ]]; then
+     echo "Adding swjdbc script...." | tee -a ${MY_LOG_FILE}
+     cat <<EOF >$MY_SQROOT/sql/scripts/swjdbc
+#!/bin/sh
+# command to run JDBC tests
+cd $JDBCTEST_DIR
+./jdbc_test.py --appid=jdbc_test --user=SOMEUSER --pw=SOMEPASSWORD --javahome=\$JAVA_HOME \\
+  --target=localhost:$MY_DCS_MASTER_PORT \\
+  --jdbctype=T4 --jdbccp=\$MY_SQROOT/export/lib/jdbcT4.jar "\$@"
+EOF
+    chmod +x $MY_SQROOT/sql/scripts/swjdbc
 
-if [[ -n "$DCS_SRC" ]]
-  then
     if [[ -f $LNXDRVR_TAR ]]; then
        echo "Linux driver exists. Adding swpyodbc script...." | tee -a ${MY_LOG_FILE}
        cat <<EOF >$MY_SQROOT/sql/scripts/swpyodbc
 #!/bin/sh
 # command to run Python ODBC tests
-cd $DCS_SRC/src/test/pytests
+cd $PYODBCTEST_DIR
 ./config.sh -d localhost:$MY_DCS_MASTER_PORT -t $LNXDRVR_TAR
 tox -e py27
 
 EOF
        chmod +x $MY_SQROOT/sql/scripts/swpyodbc
     fi 
+  fi
 fi
 
 # End setup of PyODBC test

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/020e6481/dcs/Makefile
----------------------------------------------------------------------
diff --git a/dcs/Makefile b/dcs/Makefile
new file mode 100644
index 0000000..6238f82
--- /dev/null
+++ b/dcs/Makefile
@@ -0,0 +1,52 @@
+# @@@ START COPYRIGHT @@@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# @@@ END COPYRIGHT @@@
+
+# This Makefile is just a thin shell to Maven, which is used to do the real build
+
+include ../core/macros.gmk #top level
+BLD_TRAFODION_DCS_TARNAME           =dcs-$(TRAFODION_VER).tar.gz
+
+VFILE			    =trafodion-dcs.jar.versions
+GENVERS			    =./genvers
+
+.NOTPARALLEL: all
+
+all: build_all
+
+build_all:	 
+	$(MAKE) build_chk
+	echo "$(MAVEN) site package -DskipTests"
+	echo "### For full Maven output, see file build_dcs.log"
+	set -o pipefail && $(MAVEN) site package -DskipTests | tee build_dcs.log | grep --line-buffered -E -e '^\[[^WId]' -e '^\[INFO\] B[Uu][Ii][Ll][Dd]' -e 'to compile'
+	mkdir -p ../../${DISTRIBUTION_DIR}
+	cp target/$(BLD_TRAFODION_DCS_TARNAME) ../${DISTRIBUTION_DIR}/
+	$(RM) $(VFILE)
+
+build_chk:
+	$(GENVERS) > $(VFILE)
+	@if [ $(GENVERS) -nt target/$(BLD_TRAFODION_DCS_TARNAME) ]; then echo "update manifest"; $(RM) -f target/$(BLD_TRAFODION_DCS_TARNAME); fi
+	@if [ $(MY_SQROOT)/export/include/SCMBuildStr.h -nt target/$(BLD_TRAFODION_DCS_TARNAME) ]; then echo "update manifest"; $(RM) -f target/$(BLD_TRAFODION_DCS_TARNAME); fi
+
+clean:
+	-$(MAVEN) clean | grep ERROR
+	$(RM) build_dcs.log
+	$(RM) $(VFILE)
+	$(RM) ../../${DISTRIBUTION_DIR}/$(BLD_TRAFODION_DCS_TARNAME)

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/020e6481/dcs/genvers
----------------------------------------------------------------------
diff --git a/dcs/genvers b/dcs/genvers
new file mode 100755
index 0000000..4139c48
--- /dev/null
+++ b/dcs/genvers
@@ -0,0 +1,3 @@
+#!/bin/sh
+CV_VERS=1.0.1
+$MY_SQROOT/export/include/SCMBuildJava.sh $CV_VERS
\ No newline at end of file