[GitHub] trafodion pull request #1753: [TRAFODION-3241]support both jdk1.7 and jdk1.8

2018-12-06 Thread svarnau
Github user svarnau commented on a diff in the pull request:

https://github.com/apache/trafodion/pull/1753#discussion_r239634533
  
--- Diff: core/conn/jdbcT4/Makefile ---
@@ -26,17 +26,20 @@ include ../../macros.gmk #top level
 all: build_all
 
 build_all: LICENSE NOTICE 
-   echo "$(MAVEN) package -DskipTests"
-   set -o pipefail && $(MAVEN) package -DskipTests | tee build_jdbct4.log 
| grep --line-buffered -E -e '^\[[^WId]' -e '^\[INFO\] B[Uu][Ii][Ll][Dd]' -e 
'to compile'
-   cp target/jdbcT4-${TRAFODION_VER}.jar ${TRAF_HOME}/export/lib
-   mkdir -p ../clients
-   mv target/jdbcT4-${TRAFODION_VER}.zip ../clients
-   #ln -sf ${TRAF_HOME}/export/lib/jdbcT4-${TRAFODION_VER}.jar 
${TRAF_HOME}/export/lib/jdbcT4.jar
-   `cd ${TRAF_HOME}/export/lib;ln -sf jdbcT4-${TRAFODION_VER}.jar 
jdbcT4.jar`
+   @if [ ! -f target/*.jar ]; then \
--- End diff --

If *.jar expands to more than one file, won't that generate a shell syntax 
error?


---


[GitHub] trafodion pull request #1738: [TRAFODION-2626] Fix DCS API for $TRAF_LOG

2018-11-06 Thread svarnau
GitHub user svarnau opened a pull request:

https://github.com/apache/trafodion/pull/1738

[TRAFODION-2626] Fix DCS API for $TRAF_LOG

Previous change allowed configuration of log location, but did not
take into account retrieving logs via DCS web interface.

Link to trafodion logs is not exposed by default, but this change was tested
with that option enabled, as well as default.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/svarnau/trafodion j2626_dcs

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/trafodion/pull/1738.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1738


commit b558beaf428d2c2c95d32f23f04440c522be0cba
Author: Steve Varnau 
Date:   2018-11-06T23:40:23Z

[TRAFODION-2626] Fix DCS API for $TRAF_LOG

Previous change allowed configuration of log location, but did not
take into account retrieving logs via DCS web interface.

Link to trafodion logs is not exposed by default, but this change was tested
with that option enabled, as well as default.




---


[GitHub] trafodion pull request #1709: [TRAFODION-3200] correct label and version

2018-09-08 Thread svarnau
Github user svarnau commented on a diff in the pull request:

https://github.com/apache/trafodion/pull/1709#discussion_r216133725
  
--- Diff: tools/docker/build-base-docker.sh ---
@@ -19,7 +19,7 @@ set -e -x -u
 
 BASE_SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
 
-export DOCKER_ENV_VERSION="0.1"
+export DOCKER_ENV_VERSION="2.3"
 export BASE_IMAGE_NAME="trafodion/base:${DOCKER_ENV_VERSION}"
--- End diff --

Do you want to put this in the release2.3 branch instead of master?


---


[GitHub] trafodion pull request #1604: Trafodion 2884

2018-06-13 Thread svarnau
Github user svarnau commented on a diff in the pull request:

https://github.com/apache/trafodion/pull/1604#discussion_r195160478
  
--- Diff: core/sqf/sqenvcom.sh ---
@@ -673,17 +673,31 @@ export SQ_LUNMGR_VERBOSITY=1
 # Control SQ default startup behavior (c=cold, w=warm, if removed sqstart 
will autocheck)
 export SQ_STARTUP=r
 
-# Monitor process creator:
+#
+# NOTE: in a Python installation when SQ_MON_RUN_MODE below
+#   is AGENT the SQ_MON_CREATOR must be MPIRUN
+#
 #   MPIRUN - monitor process is created by mpirun
-# Uncomment SQ_MON_CREATOR when running monitor in AGENT mode
+#(meaning that mpirun is the parent process of the monitor 
process)
+#   AGENT  - monitor process runs in agent mode versus MPI collective
+#
+# Uncomment the next four environment variables
 #export SQ_MON_CREATOR=MPIRUN
-
-# Monitor process run mode:
-#   AGENT - monitor process runs in agent mode versus MPI collective
-# Uncomment the three environment variables below
 #export SQ_MON_RUN_MODE=AGENT
-#export MONITOR_COMM_PORT=23399
-#export MONITOR_SYNC_PORT=23398
+#export MONITOR_COMM_PORT=23390
+#export MONITOR_SYNC_PORT=23380
+
+#
+#   NAME-SERVER - to disable process replication and enable the name-server
+#
+# Uncomment the next environment variable
+#export SQ_NAMESERVER_ENABLED=1
+if [[ "$SQ_NAMESERVER_ENABLED" == "1" ]]; then
+  export NS_COMM_PORT=23370
+  export NS_SYNC_PORT=23360
+  export NS_M2N_COMM_PORT=23350
+  export MON2MON_COMM_PORT=23340
+fi
--- End diff --

Yes


---


[GitHub] trafodion pull request #1604: Trafodion 2884

2018-06-12 Thread svarnau
Github user svarnau commented on a diff in the pull request:

https://github.com/apache/trafodion/pull/1604#discussion_r194808275
  
--- Diff: core/sqf/sqenvcom.sh ---
@@ -673,17 +673,31 @@ export SQ_LUNMGR_VERBOSITY=1
 # Control SQ default startup behavior (c=cold, w=warm, if removed sqstart 
will autocheck)
 export SQ_STARTUP=r
 
-# Monitor process creator:
+#
+# NOTE: in a Python installation when SQ_MON_RUN_MODE below
+#   is AGENT the SQ_MON_CREATOR must be MPIRUN
+#
 #   MPIRUN - monitor process is created by mpirun
-# Uncomment SQ_MON_CREATOR when running monitor in AGENT mode
+#(meaning that mpirun is the parent process of the monitor 
process)
+#   AGENT  - monitor process runs in agent mode versus MPI collective
+#
+# Uncomment the next four environment variables
 #export SQ_MON_CREATOR=MPIRUN
-
-# Monitor process run mode:
-#   AGENT - monitor process runs in agent mode versus MPI collective
-# Uncomment the three environment variables below
 #export SQ_MON_RUN_MODE=AGENT
-#export MONITOR_COMM_PORT=23399
-#export MONITOR_SYNC_PORT=23398
+#export MONITOR_COMM_PORT=23390
+#export MONITOR_SYNC_PORT=23380
+
+#
+#   NAME-SERVER - to disable process replication and enable the name-server
+#
+# Uncomment the next environment variable
+#export SQ_NAMESERVER_ENABLED=1
+if [[ "$SQ_NAMESERVER_ENABLED" == "1" ]]; then
+  export NS_COMM_PORT=23370
+  export NS_SYNC_PORT=23360
+  export NS_M2N_COMM_PORT=23350
+  export MON2MON_COMM_PORT=23340
+fi
--- End diff --

PORT numbers should not be hard-coded here. I think most default ports are 
coded elsewhere, but these need to at leaset be coded to allow over-ride, such 
as:
export NS_COMM_PORT=${NS_COMM_PORT:-23370}


---


[GitHub] trafodion pull request #1565: Add RH7 supported flag to build & test on addi...

2018-05-15 Thread svarnau
GitHub user svarnau opened a pull request:

https://github.com/apache/trafodion/pull/1565

Add RH7 supported flag to build & test on additional OS

Testing jenkins processing, which keys off install_features file.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/svarnau/trafodion rh7_test

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/trafodion/pull/1565.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1565


commit c138dd08bbfb5f2d08c139962468ff1f70d353e0
Author: Steve Varnau <svarnau@...>
Date:   2018-05-15T17:20:55Z

Add RH7 supported flag to build & test on additional OS




---


[GitHub] trafodion pull request #1535: TRAFODION-2957 one stmt support multi-queries

2018-04-24 Thread svarnau
Github user svarnau commented on a diff in the pull request:

https://github.com/apache/trafodion/pull/1535#discussion_r183804788
  
--- Diff: 
core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/TrafT4MultiQueriesPreparedStatement.java
 ---
@@ -0,0 +1,372 @@
+package org.trafodion.jdbc.t4;
+
+import java.math.BigDecimal;
+import java.sql.BatchUpdateException;
+import java.sql.Date;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Time;
+import java.sql.Timestamp;
+import java.util.logging.Level;
+
+public class TrafT4MultiQueriesPreparedStatement extends 
TrafT4PreparedStatement {
+
+private String[] sqlArr = null;
+private TrafT4PreparedStatement[] pstmtArr = null;
+private int[][] paramDescs = null;
+
+private int currentSqlIndex;
+
+TrafT4MultiQueriesPreparedStatement(TrafT4Connection connection, 
String sql) throws SQLException {
+this(connection, sql, ResultSet.TYPE_FORWARD_ONLY, 
ResultSet.CONCUR_READ_ONLY,
+TrafT4ResultSet.CLOSE_CURSORS_AT_COMMIT, null);
+if (connection.props_.t4Logger_.isLoggable(Level.FINE) == true) {
+Object p[] = T4LoggingUtilities.makeParams(connection.props_, 
connection, sql);
+connection.props_.t4Logger_.logp(Level.FINE, 
"TrafT4MultiQueriesPreparedStatement", "", "", p);
+}
+}
+
+TrafT4MultiQueriesPreparedStatement(TrafT4Connection connection, 
String sql, String stmtLabel) throws SQLException {
+this(connection, sql, ResultSet.TYPE_FORWARD_ONLY, 
ResultSet.CONCUR_READ_ONLY,
+TrafT4ResultSet.CLOSE_CURSORS_AT_COMMIT, stmtLabel);
+if (connection.props_.t4Logger_.isLoggable(Level.FINE) == true) {
+Object p[] = T4LoggingUtilities.makeParams(connection.props_, 
connection, sql, stmtLabel);
+connection.props_.t4Logger_.logp(Level.FINE, 
"TrafT4MultiQueriesPreparedStatement", "", "", p);
+}
+}
+
+TrafT4MultiQueriesPreparedStatement(TrafT4Connection connection, 
String sql, int resultSetType,
+int resultSetConcurrency) throws SQLException {
+this(connection, sql, resultSetType, resultSetConcurrency, 
connection.holdability_, null);
+if (connection.props_.t4Logger_.isLoggable(Level.FINE) == true) {
+Object p[] = T4LoggingUtilities.makeParams(connection.props_, 
connection, sql, resultSetType,
+resultSetConcurrency);
+connection.props_.t4Logger_.logp(Level.FINE, 
"TrafT4MultiQueriesPreparedStatement", "", "", p);
+}
+}
+
+TrafT4MultiQueriesPreparedStatement(TrafT4Connection connection, 
String sql, int resultSetType,
+int resultSetConcurrency, int resultSetHoldability) throws 
SQLException {
+this(connection, sql, resultSetType, resultSetConcurrency, 
resultSetHoldability, null);
+if (connection.props_.t4Logger_.isLoggable(Level.FINE) == true) {
+Object p[] = T4LoggingUtilities.makeParams(connection.props_, 
connection, sql, resultSetType,
+resultSetConcurrency, resultSetHoldability);
+connection.props_.t4Logger_.logp(Level.FINE, 
"TrafT4MultiQueriesPreparedStatement", "", "", p);
+}
+
+}
+
+TrafT4MultiQueriesPreparedStatement(TrafT4Connection connection, 
String sql, int resultSetType,
+int resultSetConcurrency, int resultSetHoldability, String 
stmtLabel) throws SQLException {
+super(connection, sql, resultSetType, resultSetConcurrency, 
resultSetHoldability, stmtLabel);
+if (connection.props_.t4Logger_.isLoggable(Level.FINE) == true) {
+Object p[] = T4LoggingUtilities.makeParams(connection.props_, 
connection, sql, resultSetType,
+resultSetConcurrency, resultSetHoldability, stmtLabel);
+connection.props_.t4Logger_.logp(Level.FINE, 
"TrafT4MultiQueriesPreparedStatement", "", "", p);
+}
+
+if (resultSetType != ResultSet.TYPE_FORWARD_ONLY && resultSetType 
!= ResultSet.TYPE_SCROLL_INSENSITIVE
+&& resultSetType != ResultSet.TYPE_SCROLL_SENSITIVE) {
+throw TrafT4Messages.createSQLException(connection_.props_, 
connection_.getLocale(),
+"invalid_resultset_type", null);
+}
+if (resultSetConcurrency != ResultSet.CONCUR_READ_ONLY && 
resultSetConcurrency != ResultSet.CONCUR_UPDATABLE) {
+throw TrafT4Messages.createSQLException(connection_.props_, 
connection_.getLocale(),
   

[GitHub] trafodion pull request #1514: [TRAFODION-3022] Add web site link to Apache C...

2018-04-11 Thread svarnau
GitHub user svarnau opened a pull request:

https://github.com/apache/trafodion/pull/1514

[TRAFODION-3022] Add web site link to Apache Current Events

This adds the ApacheCon (or whatever ASF current event is next) icon on the 
top-right of the web pages, opposite of the Dragon logo.

Icon can be previewed here: 
https://www.apache.org/events/current-event-125x125.png 

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/svarnau/trafodion web3022

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/trafodion/pull/1514.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1514


commit 40058343ca89f66a1e7b6abcef1f5329db6231f6
Author: Steve Varnau <steve.varnau@...>
Date:   2018-04-11T17:55:30Z

[TRAFODION-3022] Add web site link to Apache Current Events




---


[GitHub] trafodion pull request #1477: [TRAFODION-2985] Revert 2.2.0 download links t...

2018-03-14 Thread svarnau
GitHub user svarnau opened a pull request:

https://github.com/apache/trafodion/pull/1477

[TRAFODION-2985] Revert 2.2.0 download links to mirror pointers



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/svarnau/trafodion web2985

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/trafodion/pull/1477.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1477


commit 47c9f7425aab9af74f57354c3ad741d25c81e68d
Author: Steve Varnau <steve.varnau@...>
Date:   2018-03-15T01:17:52Z

[TRAFODION-2985] Revert 2.2.0 web links to mirror pointers




---


[GitHub] trafodion pull request #1427: TRAFODION-2940 In HA env, one node lose networ...

2018-02-15 Thread svarnau
Github user svarnau commented on a diff in the pull request:

https://github.com/apache/trafodion/pull/1427#discussion_r168625988
  
--- Diff: dcs/bin/scripts/dcsunbind.sh ---
@@ -51,6 +51,31 @@ function check_node {
 done
 }
 
+function check_self_node {
+for myinterface in `/sbin/ip link show|cut -d: -f1- | cut -c1- | awk 
-F': ' '/^[0-9]+:.*/ {print $2;}'`; do
+ip_output=$(/sbin/ip addr show $myinterface | cut -d: -f1- | cut 
-c1-)
+
+myifport=`echo "$ip_output" | grep -w $gv_float_external_ip`
+status=$?
+if [ $status -eq 0 ]; then
+tempinterface=`echo $gv_float_interface:$gv_port`
+# check if another interface is bound to this virtual ip 
address
+echo "$myifport" | grep "$tempinterface"  > /dev/null
+if [ $? -eq 0 ]; then
+unbindip=`echo "$myifport" | awk '{print $2}'`
+unbindlb=`echo "$myifport"|awk '{print $NF}'`
+echo "Virtual ip $gv_float_external_ip is in use on node 
$HOSTNAME bound to interface $myinterface($unbindlb) - unbinding..."
+sudo /sbin/ip addr del $unbindip dev $myinterface
+status=$?
--- End diff --

It seems unnecessary to duplicate entire function just to change whether 
commands run locally or remotely. That can be done with a variable, so that we 
don't have two copies of this code to maintain.


---


[GitHub] trafodion pull request #1445: [TRAFODION-2959] Change download URLs for old ...

2018-02-15 Thread svarnau
GitHub user svarnau opened a pull request:

https://github.com/apache/trafodion/pull/1445

[TRAFODION-2959] Change download URLs for old releases

Old releases need to be from archives site.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/svarnau/trafodion j2959

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/trafodion/pull/1445.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1445


commit 59e2c8e457f14b6721a4582a629c82aa277f6d87
Author: Steve Varnau <steve.varnau@...>
Date:   2018-02-15T20:00:28Z

[TRAFODION-2959] Change download URLs for old releases

Old releases need to be from archives site.




---


[GitHub] trafodion pull request #1371: [TRAFODION-2863] Web-page style sheets should ...

2018-01-04 Thread svarnau
GitHub user svarnau opened a pull request:

https://github.com/apache/trafodion/pull/1371

[TRAFODION-2863] Web-page style sheets should be protocol relative

To be compatible with http or https

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/svarnau/trafodion j2863

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/trafodion/pull/1371.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1371


commit 98a07c3f1e5843b061d197a6427400f521d793dd
Author: Steve Varnau <steve.varnau@...>
Date:   2018-01-04T23:02:01Z

[TRAFODION-2863] Web-page style sheets should be protocol relative

To be compatible with http or https




---


[GitHub] trafodion pull request #1370: [TRAFODION-2861][TRAFODION-2869] Remove incuba...

2018-01-04 Thread svarnau
GitHub user svarnau opened a pull request:

https://github.com/apache/trafodion/pull/1370

[TRAFODION-2861][TRAFODION-2869] Remove incubating from release packaging

Remove disclaimer file and incubating string from packaging file names.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/svarnau/trafodion pkg-tlp

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/trafodion/pull/1370.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1370


commit 34bf83acb40350b646b1e906445423b2c041412f
Author: Steve Varnau <steve.varnau@...>
Date:   2018-01-04T20:07:47Z

[TRAFODION-2861][TRAFODION-2869] Remove incubating from release packaging

Remove disclaimer file and incubating string from packaging file names.




---


[GitHub] trafodion pull request #1359: [TRAFODION-2857] Web-site changes to remove in...

2018-01-03 Thread svarnau
Github user svarnau commented on a diff in the pull request:

https://github.com/apache/trafodion/pull/1359#discussion_r159534056
  
--- Diff: README.md ---
@@ -20,11 +20,11 @@ Hadoop.
   
   http://trafodion.apache.org/release-notes.html
 
-  - the latest Apache Trafodion can be downloaded from Apache incubator
+  - the latest Apache Trafodion can be downloaded from Apache
 distribution site or accessed from git:
 
 - download site:
-  https://dist.apache.org/repos/dist/release/incubator/trafodion
+  https://dist.apache.org/repos/dist/release/trafodion
--- End diff --

Infra team has taken care of moving the dist directory.


---