asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amo...@apache.org
Subject asterixdb git commit: Fix Installer tests on Local machines
Date Mon, 21 Nov 2016 02:37:26 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master 42467cb11 -> 91dbc2f48


Fix Installer tests on Local machines

Change-Id: Idcb10e0e72d6a60d91fe1845567bac1208991f93
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1354
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>


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

Branch: refs/heads/master
Commit: 91dbc2f4811676369c06b53879a6b0395386760c
Parents: 42467cb
Author: Abdullah Alamoudi <bamousaa@gmail.com>
Authored: Sun Nov 20 09:29:53 2016 -0800
Committer: abdullah alamoudi <bamousaa@gmail.com>
Committed: Sun Nov 20 18:36:55 2016 -0800

----------------------------------------------------------------------
 .../org/apache/asterix/event/management/EventExecutor.java     | 3 +--
 .../src/main/resources/events/cc_start/cc_start.sh             | 2 +-
 .../src/main/resources/events/node_join/nc_join.sh             | 2 +-
 .../org/apache/asterix/installer/command/ConfigureCommand.java | 6 +++++-
 .../org/apache/asterix/installer/command/DeleteCommand.java    | 3 +--
 .../org/apache/asterix/installer/test/AsterixLifecycleIT.java  | 2 +-
 6 files changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/91dbc2f4/asterixdb/asterix-events/src/main/java/org/apache/asterix/event/management/EventExecutor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-events/src/main/java/org/apache/asterix/event/management/EventExecutor.java
b/asterixdb/asterix-events/src/main/java/org/apache/asterix/event/management/EventExecutor.java
index ebeea63..5035072 100644
--- a/asterixdb/asterix-events/src/main/java/org/apache/asterix/event/management/EventExecutor.java
+++ b/asterixdb/asterix-events/src/main/java/org/apache/asterix/event/management/EventExecutor.java
@@ -44,7 +44,7 @@ public class EventExecutor {
 
     public void executeEvent(Node node, String script, List<String> args, boolean isDaemon,
Cluster cluster,
             Pattern pattern, IOutputHandler outputHandler, AsterixEventServiceClient client)
throws IOException {
-        List<String> pargs = new ArrayList<String>();
+        List<String> pargs = new ArrayList<>();
         pargs.add("/bin/bash");
         pargs.add(client.getEventsHomeDir() + File.separator + AsterixEventServiceUtil.EVENT_DIR
+ File.separator
                 + EXECUTE_SCRIPT);
@@ -88,7 +88,6 @@ public class EventExecutor {
         pb.environment().put(SCRIPT, script);
         pb.environment().put(ARGS, argBuffer.toString());
         pb.environment().put(DAEMON, Boolean.toString(isDaemon));
-
         Process p = pb.start();
         if (!isDaemon) {
             BufferedInputStream bis = new BufferedInputStream(p.getInputStream());

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/91dbc2f4/asterixdb/asterix-events/src/main/resources/events/cc_start/cc_start.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-events/src/main/resources/events/cc_start/cc_start.sh b/asterixdb/asterix-events/src/main/resources/events/cc_start/cc_start.sh
index c761744..c33ba6c 100644
--- a/asterixdb/asterix-events/src/main/resources/events/cc_start/cc_start.sh
+++ b/asterixdb/asterix-events/src/main/resources/events/cc_start/cc_start.sh
@@ -74,4 +74,4 @@ cat <<EOF >> $LOG_DIR/cc.log
 LOG START: $DATE
 --------------------------------------------------------------------------------
 EOF
-$ASTERIX_HOME/bin/asterixcc echo $ccArgs &>> $LOG_DIR/cc.log
\ No newline at end of file
+$ASTERIX_HOME/bin/asterixcc echo $ccArgs >> $LOG_DIR/cc.log 2>&1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/91dbc2f4/asterixdb/asterix-events/src/main/resources/events/node_join/nc_join.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-events/src/main/resources/events/node_join/nc_join.sh b/asterixdb/asterix-events/src/main/resources/events/node_join/nc_join.sh
index 1a3de9a..7f86379 100644
--- a/asterixdb/asterix-events/src/main/resources/events/node_join/nc_join.sh
+++ b/asterixdb/asterix-events/src/main/resources/events/node_join/nc_join.sh
@@ -34,4 +34,4 @@ cat <<EOF >> $LOG_DIR/${NC_ID}.log
 LOG START: $DATE
 --------------------------------------------------------------------------------
 EOF
-$ASTERIX_HOME/bin/asterixnc -node-id $NC_ID -cc-host $CC_HOST -cc-port $CLUSTER_NET_PORT
 -cluster-net-ip-address $IP_LOCATION  -data-ip-address $IP_LOCATION -iodevices $IO_DEVICES
-result-ip-address $IP_LOCATION -- $INITIAL_RUN_FLAG &>> $LOG_DIR/${NC_ID}.log
+$ASTERIX_HOME/bin/asterixnc -node-id $NC_ID -cc-host $CC_HOST -cc-port $CLUSTER_NET_PORT
 -cluster-net-ip-address $IP_LOCATION  -data-ip-address $IP_LOCATION -iodevices $IO_DEVICES
-result-ip-address $IP_LOCATION -- $INITIAL_RUN_FLAG >> $LOG_DIR/${NC_ID}.log 2>&1

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/91dbc2f4/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/ConfigureCommand.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/ConfigureCommand.java
b/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/ConfigureCommand.java
index eaf6cf4..aeb118f 100644
--- a/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/ConfigureCommand.java
+++ b/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/ConfigureCommand.java
@@ -72,7 +72,11 @@ public class ConfigureCommand extends AbstractCommand {
         cluster.setIodevices(configureIoDevices(cluster.getIodevices(), workingDir));
         cluster.setLogDir(configureDirectory(cluster.getLogDir(), workingDir));
         cluster.setTxnLogDir(configureDirectory(cluster.getTxnLogDir(), workingDir));
-        cluster.setJavaHome(System.getProperty("java.home"));
+        String javaHome = System.getProperty("java.home");
+        if (javaHome.endsWith(File.separator + "jre")) {
+            javaHome = javaHome.substring(0, javaHome.indexOf(File.separator + "jre"));
+        }
+        cluster.setJavaHome(javaHome);
 
         for (Node node : cluster.getNode()) {
             node.setIodevices(configureIoDevices(node.getIodevices(), workingDir));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/91dbc2f4/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/DeleteCommand.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/DeleteCommand.java
b/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/DeleteCommand.java
index 4e446f8..043d48a 100644
--- a/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/DeleteCommand.java
+++ b/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/DeleteCommand.java
@@ -18,8 +18,6 @@
  */
 package org.apache.asterix.installer.command;
 
-import org.kohsuke.args4j.Option;
-
 import org.apache.asterix.event.model.AsterixInstance;
 import org.apache.asterix.event.model.AsterixInstance.State;
 import org.apache.asterix.event.schema.pattern.Patterns;
@@ -28,6 +26,7 @@ import org.apache.asterix.event.service.AsterixEventServiceUtil;
 import org.apache.asterix.event.service.ServiceProvider;
 import org.apache.asterix.event.util.PatternCreator;
 import org.apache.asterix.installer.driver.InstallerDriver;
+import org.kohsuke.args4j.Option;
 
 public class DeleteCommand extends AbstractCommand {
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/91dbc2f4/asterixdb/asterix-installer/src/test/java/org/apache/asterix/installer/test/AsterixLifecycleIT.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/java/org/apache/asterix/installer/test/AsterixLifecycleIT.java
b/asterixdb/asterix-installer/src/test/java/org/apache/asterix/installer/test/AsterixLifecycleIT.java
index 52e75cc..04e73ed 100644
--- a/asterixdb/asterix-installer/src/test/java/org/apache/asterix/installer/test/AsterixLifecycleIT.java
+++ b/asterixdb/asterix-installer/src/test/java/org/apache/asterix/installer/test/AsterixLifecycleIT.java
@@ -72,7 +72,7 @@ public class AsterixLifecycleIT {
 
     @Parameters
     public static Collection<Object[]> tests() throws Exception {
-        Collection<Object[]> testArgs = new ArrayList<Object[]>();
+        Collection<Object[]> testArgs = new ArrayList<>();
         return testArgs;
     }
 


Mime
View raw message