You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by mb...@apache.org on 2017/03/10 16:09:47 UTC

asterixdb git commit: Remove Usages Of Jps To Enable Running With JRE

Repository: asterixdb
Updated Branches:
  refs/heads/master 953eb9668 -> efe014d63


Remove Usages Of Jps To Enable Running With JRE

Fixes ASTERIXDB-1832 - Cluster scripts shouldn't require JDK

Change-Id: Iddb52d2a2696c8c43af92fda9b6806d9798bf881
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1563
Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
BAD: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <ti...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/efe014d6
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/efe014d6
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/efe014d6

Branch: refs/heads/master
Commit: efe014d63885c4b99069296d5598bb0a32ea7c53
Parents: 953eb96
Author: Michael Blow <mb...@apache.org>
Authored: Thu Mar 9 22:09:20 2017 -0500
Committer: Michael Blow <mb...@apache.org>
Committed: Fri Mar 10 08:08:37 2017 -0800

----------------------------------------------------------------------
 asterixdb/asterix-app/scripts/asterix/stopcc.sh         |  2 +-
 asterixdb/asterix-app/scripts/asterix/stopnc.sh         |  2 +-
 asterixdb/asterix-app/scripts/idefix/stopallncs.sh      |  2 +-
 asterixdb/asterix-app/scripts/idefix/stopcc.sh          |  2 +-
 asterixdb/asterix-app/scripts/rainbow/stopcc.sh         |  2 +-
 asterixdb/asterix-app/scripts/rainbow/stopnc.sh         |  2 +-
 .../main/resources/events/node_failure/nc_failure.sh    |  4 ++--
 .../action/derived/RemoteAsterixDriverKill.java         |  3 ++-
 .../killdrivers.sh                                      |  2 +-
 .../src/main/resources/zookeeper/stop_zk                |  2 +-
 .../scripts/feed-restart/issue-1636/kill_cc_and_nc.sh   |  2 +-
 .../scripts/dml_recovery/kill_cc_and_nc.sh              |  2 +-
 .../primary_index_only/kill_cc_and_nc.sh                |  2 +-
 .../kill_cc_and_nc.sh                                   |  2 +-
 .../kill_cc_and_nc.sh                                   |  2 +-
 .../kill_cc_and_nc.sh                                   |  2 +-
 .../primary_plus_ngram_index/kill_cc_and_nc.sh          |  2 +-
 .../primary_plus_rtree_index/kill_cc_and_nc.sh          |  2 +-
 .../kill_cc_and_nc.sh                                   |  2 +-
 .../temp_primary_index_only/kill_cc_and_nc.sh           |  2 +-
 .../kill_cc_and_nc.sh                                   |  2 +-
 .../kill_cc_and_nc.sh                                   |  2 +-
 .../kill_cc_and_nc.sh                                   |  2 +-
 .../temp_primary_plus_ngram_index/kill_cc_and_nc.sh     |  2 +-
 .../temp_primary_plus_rtree_index/kill_cc_and_nc.sh     |  2 +-
 .../recovery_ddl/dataset_recovery/kill_cc_and_nc.sh     |  2 +-
 .../recovery_ddl/datatype_recovery/kill_cc_and_nc.sh    |  2 +-
 .../recovery_ddl/dataverse_recovery/kill_cc_and_nc.sh   |  2 +-
 .../delete_after_recovery/kill_cc_and_nc.sh             |  2 +-
 .../recovery_ddl/function_recovery/kill_cc_and_nc.sh    |  2 +-
 .../insert_after_recovery/kill_cc_and_nc.sh             |  2 +-
 .../recovery_ddl/load_after_recovery/kill_cc_and_nc.sh  |  2 +-
 .../secondary_index_recovery/kill_cc_and_nc.sh          |  2 +-
 .../temp_dataset_recovery/kill_cc_and_nc.sh             |  2 +-
 .../temp_delete_after_recovery/kill_cc_and_nc.sh        |  2 +-
 .../temp_insert_after_recovery/kill_cc_and_nc.sh        |  2 +-
 .../temp_load_after_recovery/kill_cc_and_nc.sh          |  2 +-
 .../temp_secondary_index_recovery/kill_cc_and_nc.sh     |  2 +-
 .../scripts/setup_teardown/kill_cc_and_nc.sh            |  2 +-
 .../src/test/resources/scripts/kill_cc_and_nc.sh        |  2 +-
 .../src/main/opt/local/bin/start-sample-cluster.sh      |  8 ++++----
 .../src/main/opt/local/bin/stop-sample-cluster.sh       | 12 ++++++------
 42 files changed, 52 insertions(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-app/scripts/asterix/stopcc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/scripts/asterix/stopcc.sh b/asterixdb/asterix-app/scripts/asterix/stopcc.sh
index f618f90..0a6c289 100644
--- a/asterixdb/asterix-app/scripts/asterix/stopcc.sh
+++ b/asterixdb/asterix-app/scripts/asterix/stopcc.sh
@@ -17,7 +17,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-PID=`/usr/local/java/vms/java/bin/jps | grep CCDriver | awk '{print $1}'`
+PID=`ps -ef | awk '/java.*CCDriver/ {print $2}'`
 
 echo $PID
 kill -9 $PID

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-app/scripts/asterix/stopnc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/scripts/asterix/stopnc.sh b/asterixdb/asterix-app/scripts/asterix/stopnc.sh
index aea6f17..c569911 100644
--- a/asterixdb/asterix-app/scripts/asterix/stopnc.sh
+++ b/asterixdb/asterix-app/scripts/asterix/stopnc.sh
@@ -17,7 +17,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-PID=`/usr/local/java/vms/java/bin/jps | grep NCDriver | awk '{print $1}'`
+PID=`ps -ef | awk '/java.*NCDriver/ {print $2}'`
 
 echo $PID
 kill -9 $PID

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-app/scripts/idefix/stopallncs.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/scripts/idefix/stopallncs.sh b/asterixdb/asterix-app/scripts/idefix/stopallncs.sh
index c02827c..c569911 100644
--- a/asterixdb/asterix-app/scripts/idefix/stopallncs.sh
+++ b/asterixdb/asterix-app/scripts/idefix/stopallncs.sh
@@ -17,7 +17,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-PID=`/usr/bin/jps | grep NCDriver | awk '{print $1}'`
+PID=`ps -ef | awk '/java.*NCDriver/ {print $2}'`
 
 echo $PID
 kill -9 $PID

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-app/scripts/idefix/stopcc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/scripts/idefix/stopcc.sh b/asterixdb/asterix-app/scripts/idefix/stopcc.sh
index 261acce..0a6c289 100644
--- a/asterixdb/asterix-app/scripts/idefix/stopcc.sh
+++ b/asterixdb/asterix-app/scripts/idefix/stopcc.sh
@@ -17,7 +17,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-PID=`/usr/bin/jps | grep CCDriver | awk '{print $1}'`
+PID=`ps -ef | awk '/java.*CCDriver/ {print $2}'`
 
 echo $PID
 kill -9 $PID

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-app/scripts/rainbow/stopcc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/scripts/rainbow/stopcc.sh b/asterixdb/asterix-app/scripts/rainbow/stopcc.sh
index f618f90..0a6c289 100644
--- a/asterixdb/asterix-app/scripts/rainbow/stopcc.sh
+++ b/asterixdb/asterix-app/scripts/rainbow/stopcc.sh
@@ -17,7 +17,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-PID=`/usr/local/java/vms/java/bin/jps | grep CCDriver | awk '{print $1}'`
+PID=`ps -ef | awk '/java.*CCDriver/ {print $2}'`
 
 echo $PID
 kill -9 $PID

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-app/scripts/rainbow/stopnc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/scripts/rainbow/stopnc.sh b/asterixdb/asterix-app/scripts/rainbow/stopnc.sh
index aea6f17..c569911 100644
--- a/asterixdb/asterix-app/scripts/rainbow/stopnc.sh
+++ b/asterixdb/asterix-app/scripts/rainbow/stopnc.sh
@@ -17,7 +17,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-PID=`/usr/local/java/vms/java/bin/jps | grep NCDriver | awk '{print $1}'`
+PID=`ps -ef | awk '/java.*NCDriver/ {print $2}'`
 
 echo $PID
 kill -9 $PID

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-events/src/main/resources/events/node_failure/nc_failure.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-events/src/main/resources/events/node_failure/nc_failure.sh b/asterixdb/asterix-events/src/main/resources/events/node_failure/nc_failure.sh
index 39a51db..9b0dcbb 100644
--- a/asterixdb/asterix-events/src/main/resources/events/node_failure/nc_failure.sh
+++ b/asterixdb/asterix-events/src/main/resources/events/node_failure/nc_failure.sh
@@ -25,10 +25,10 @@ PID_INFO=`ps -ef |  grep asterix | grep -v grep | grep -v nc_join |  grep $PAREN
 PID=`echo $PID_INFO | cut -d " " -f2`
 kill -15 $PID
 
-cmd_output=$(jps|grep "^$PID\s")
+cmd_output=$(ps -ef | awk '{print $2}' |grep "^$PID$")
 while [ ${#cmd_output} -ne 0 ]
 do
   sleep 1
   kill -15 $PID
-  cmd_output=$(jps|grep "^$PID\s")
+  cmd_output=$(ps -ef | awk '{print $2}' |grep "^$PID$")
 done

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/action/derived/RemoteAsterixDriverKill.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/action/derived/RemoteAsterixDriverKill.java b/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/action/derived/RemoteAsterixDriverKill.java
index 44408e7..229b8c7 100644
--- a/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/action/derived/RemoteAsterixDriverKill.java
+++ b/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/action/derived/RemoteAsterixDriverKill.java
@@ -27,7 +27,8 @@ public class RemoteAsterixDriverKill extends AbstractRemoteExecutableAction {
 
     @Override
     protected String getCommand() {
-        return "jps | awk '{if ($2 == \"NCDriver\" || $2 == \"CCDriver\") print $1;}' | xargs -n 1 kill -9";
+        return "ps -ef | awk '/java.*org\\.apache\\.hyracks\\.control\\.[cn]c\\.[CN]CDriver/ {print $2}' " +
+                "| xargs -n 1 kill -9";
     }
 
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/killdrivers.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/killdrivers.sh b/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/killdrivers.sh
index 9e1e7b0..36a07b8 100644
--- a/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/killdrivers.sh
+++ b/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/killdrivers.sh
@@ -1,3 +1,3 @@
 #!/bin/bash
 
-jps | grep Driver | awk '{print $1}' | xargs kill -9
+ps -ef | awk '/java.*Driver/ {print $2}' | xargs kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/main/resources/zookeeper/stop_zk
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/main/resources/zookeeper/stop_zk b/asterixdb/asterix-installer/src/main/resources/zookeeper/stop_zk
index 598ba27..9adac4c 100644
--- a/asterixdb/asterix-installer/src/main/resources/zookeeper/stop_zk
+++ b/asterixdb/asterix-installer/src/main/resources/zookeeper/stop_zk
@@ -21,5 +21,5 @@ ZK_HOME=$1
 shift 1
 for zk_host in  $@
 do
-  ssh $zk_host "kill -15 `jps | grep QuorumPeerMain | cut -d " "  -f1`" &
+  ssh $zk_host "kill -15 `ps -ef | awk '/java.*[Q]uorumPeerMain/ {print $2}'`" &
 done

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/integrationts/restart/scripts/feed-restart/issue-1636/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/integrationts/restart/scripts/feed-restart/issue-1636/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/integrationts/restart/scripts/feed-restart/issue-1636/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/integrationts/restart/scripts/feed-restart/issue-1636/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/integrationts/restart/scripts/feed-restart/issue-1636/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/dml_recovery/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/dml_recovery/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/dml_recovery/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/dml_recovery/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/dml_recovery/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_index_only/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_index_only/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_index_only/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_index_only/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_index_only/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_default_secondary_index/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_default_secondary_index/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_default_secondary_index/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_default_secondary_index/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_default_secondary_index/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_keyword_secondary_index/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_keyword_secondary_index/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_keyword_secondary_index/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_keyword_secondary_index/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_keyword_secondary_index/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_multiple_secondary_indices/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_multiple_secondary_indices/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_multiple_secondary_indices/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_multiple_secondary_indices/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_multiple_secondary_indices/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_ngram_index/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_ngram_index/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_ngram_index/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_ngram_index/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_ngram_index/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_rtree_index/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_rtree_index/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_rtree_index/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_rtree_index/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_rtree_index/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_rtree_index_insert_and_delete/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_rtree_index_insert_and_delete/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_rtree_index_insert_and_delete/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_rtree_index_insert_and_delete/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/primary_plus_rtree_index_insert_and_delete/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_index_only/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_index_only/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_index_only/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_index_only/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_index_only/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_default_secondary_index/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_default_secondary_index/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_default_secondary_index/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_default_secondary_index/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_default_secondary_index/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_keyword_secondary_index/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_keyword_secondary_index/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_keyword_secondary_index/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_keyword_secondary_index/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_keyword_secondary_index/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_multiple_secondary_indices/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_multiple_secondary_indices/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_multiple_secondary_indices/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_multiple_secondary_indices/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_multiple_secondary_indices/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_ngram_index/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_ngram_index/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_ngram_index/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_ngram_index/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_ngram_index/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_rtree_index/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_rtree_index/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_rtree_index/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_rtree_index/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_rtree_index/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/dataset_recovery/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/dataset_recovery/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/dataset_recovery/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/dataset_recovery/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/dataset_recovery/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/datatype_recovery/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/datatype_recovery/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/datatype_recovery/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/datatype_recovery/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/datatype_recovery/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/dataverse_recovery/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/dataverse_recovery/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/dataverse_recovery/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/dataverse_recovery/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/dataverse_recovery/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/delete_after_recovery/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/delete_after_recovery/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/delete_after_recovery/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/delete_after_recovery/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/delete_after_recovery/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/function_recovery/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/function_recovery/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/function_recovery/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/function_recovery/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/function_recovery/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/insert_after_recovery/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/insert_after_recovery/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/insert_after_recovery/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/insert_after_recovery/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/insert_after_recovery/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/load_after_recovery/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/load_after_recovery/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/load_after_recovery/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/load_after_recovery/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/load_after_recovery/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/secondary_index_recovery/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/secondary_index_recovery/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/secondary_index_recovery/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/secondary_index_recovery/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/secondary_index_recovery/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_dataset_recovery/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_dataset_recovery/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_dataset_recovery/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_dataset_recovery/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_dataset_recovery/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_delete_after_recovery/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_delete_after_recovery/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_delete_after_recovery/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_delete_after_recovery/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_delete_after_recovery/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_insert_after_recovery/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_insert_after_recovery/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_insert_after_recovery/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_insert_after_recovery/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_insert_after_recovery/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_load_after_recovery/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_load_after_recovery/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_load_after_recovery/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_load_after_recovery/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_load_after_recovery/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_secondary_index_recovery/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_secondary_index_recovery/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_secondary_index_recovery/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_secondary_index_recovery/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_secondary_index_recovery/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/setup_teardown/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/setup_teardown/kill_cc_and_nc.sh b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/setup_teardown/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/setup_teardown/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/scripts/setup_teardown/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-replication/src/test/resources/scripts/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-replication/src/test/resources/scripts/kill_cc_and_nc.sh b/asterixdb/asterix-replication/src/test/resources/scripts/kill_cc_and_nc.sh
index 2582713..4b876be 100755
--- a/asterixdb/asterix-replication/src/test/resources/scripts/kill_cc_and_nc.sh
+++ b/asterixdb/asterix-replication/src/test/resources/scripts/kill_cc_and_nc.sh
@@ -15,4 +15,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9
+ps -ef | awk '/java.*org\.apache\.hyracks\.control\.[cn]c\.[CN]CDriver/ {print $2}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-server/src/main/opt/local/bin/start-sample-cluster.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-server/src/main/opt/local/bin/start-sample-cluster.sh b/asterixdb/asterix-server/src/main/opt/local/bin/start-sample-cluster.sh
index d702e8a..4db0770 100755
--- a/asterixdb/asterix-server/src/main/opt/local/bin/start-sample-cluster.sh
+++ b/asterixdb/asterix-server/src/main/opt/local/bin/start-sample-cluster.sh
@@ -67,7 +67,7 @@ mkdir -p $LOGSDIR
 $INSTALLDIR/bin/${HELPER_COMMAND} get_cluster_state -quiet \
     && echo "ERROR: sample cluster address (localhost:${LISTEN_PORT}) already in use" && exit 1
 
-if $JAVA_HOME/bin/jps | grep ' \(CCDriver\|NCDriver\|NCService\)$' > /tmp/$$_jps; then
+if ps -ef | grep 'java.*org\.apache\.hyracks\.control\.[cn]c\.\([CN]CDriver\|service\.NCService\)' > /tmp/$$_pids; then
   if [ $force ]; then
     severity=WARNING
   else
@@ -80,13 +80,13 @@ if $JAVA_HOME/bin/jps | grep ' \(CCDriver\|NCDriver\|NCService\)$' > /tmp/$$_jps
     echo "aborting"
     echo
     echo "Re-run with -f to ignore, or run stop-sample-cluster.sh -f to forcibly terminate all running ${PRODUCT} processes:"
-    cat /tmp/$$_jps | sed 's/^/  - /'
-    rm /tmp/$$_jps
+    cat /tmp/pids |  sed 's/^ *[0-9]* \([0-9]*\).*org\.apache\.hyracks\.control\.[cn]c[^ ]*\.\([^ ]*\) .*/\1 - \2/'
+    rm /tmp/$$_pids
     exit 1
   fi
 fi
 
-rm /tmp/$$_jps
+rm /tmp/$$_pids
 (
   echo "--------------------------"
   date

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/efe014d6/asterixdb/asterix-server/src/main/opt/local/bin/stop-sample-cluster.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-server/src/main/opt/local/bin/stop-sample-cluster.sh b/asterixdb/asterix-server/src/main/opt/local/bin/stop-sample-cluster.sh
index 7ee5fdf..4ba5789 100755
--- a/asterixdb/asterix-server/src/main/opt/local/bin/stop-sample-cluster.sh
+++ b/asterixdb/asterix-server/src/main/opt/local/bin/stop-sample-cluster.sh
@@ -62,7 +62,7 @@ if [ $? -ne 1 ]; then
   first=1
   tries=0
   echo -n "INFO: Waiting up to 60s for cluster to shutdown"
-  while [ -n "$($JAVA_HOME/bin/jps | awk '/ (CCDriver|NCDriver|NCService)$/')" ]; do
+  while [ -n "$(ps -ef | grep 'java.*org\.apache\.hyracks\.control\.[cn]c\.\([CN]CDriver\|service\.NCService\)')" ]; do
     if [ $tries -ge 60 ]; then
       echo "...timed out!"
       break
@@ -76,18 +76,18 @@ else
   echo "WARNING: sample cluster does not appear to be running"
 fi
 
-if $JAVA_HOME/bin/jps | grep ' \(CCDriver\|NCDriver\|NCService\)$' > /tmp/$$_jps; then
+if ps -ef | grep 'java.*org\.apache\.hyracks\.control\.[cn]c\.\([CN]CDriver\|service\.NCService\)' > /tmp/$$_pids; then
   echo -n "WARNING: ${PRODUCT} processes remain after cluster shutdown; "
   if [ $force ]; then
     echo "-f[orce] specified, forcibly terminating ${PRODUCT} processes:"
-    cat /tmp/$$_jps | while read line; do
+    cat /tmp/$$_pids | while read line; do
       echo -n "   - $line..."
-      echo $line | awk '{ print $1 }' | xargs -n1 kill -9
+      echo $line | awk '{ print $2 }' | xargs -n1 kill -9
       echo "killed"
     done
   else
     echo "re-run with -f|-force to forcibly terminate all ${PRODUCT} processes:"
-    cat /tmp/$$_jps | sed 's/^/  - /'
+    cat /tmp/pids |  sed 's/^ *[0-9]* \([0-9]*\).*org\.apache\.hyracks\.control\.[cn]c[^ ]*\.\([^ ]*\) .*/\1 - \2/'
   fi
 fi
-rm /tmp/$$_jps
+rm /tmp/$$_pids