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 2019/02/07 14:47:37 UTC

[asterixdb] branch master updated: [NO ISSUE] Fix logging in NCServiceExecutionIT

This is an automated email from the ASF dual-hosted git repository.

mblow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git


The following commit(s) were added to refs/heads/master by this push:
     new ae477ae  [NO ISSUE] Fix logging in NCServiceExecutionIT
ae477ae is described below

commit ae477ae8ecce225615120937836d7c53a7a97d05
Author: Michael Blow <mb...@apache.org>
AuthorDate: Wed Feb 6 23:06:32 2019 -0500

    [NO ISSUE] Fix logging in NCServiceExecutionIT
    
    - remove GC options not supported by OpenJDK
    - don't run HDFSCluster by default (not compatible w/ Java 11)
    
    Change-Id: I17ca6ec4605f6d2ceb2c727e9479e56becc29670
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/3156
    Contrib: Michael Blow <mb...@apache.org>
    Tested-by: Michael Blow <mb...@apache.org>
    Integration-Tests: Michael Blow <mb...@apache.org>
    Reviewed-by: Murtadha Hubail <mh...@apache.org>
---
 .../asterix/test/server/NCServiceExecutionIT.java      | 18 ++++++++++++++----
 .../src/test/resources/NCServiceExecutionIT/cc.conf    |  5 ++---
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/asterixdb/asterix-server/src/test/java/org/apache/asterix/test/server/NCServiceExecutionIT.java b/asterixdb/asterix-server/src/test/java/org/apache/asterix/test/server/NCServiceExecutionIT.java
index 7398dbf..64506f5 100644
--- a/asterixdb/asterix-server/src/test/java/org/apache/asterix/test/server/NCServiceExecutionIT.java
+++ b/asterixdb/asterix-server/src/test/java/org/apache/asterix/test/server/NCServiceExecutionIT.java
@@ -93,6 +93,7 @@ public class NCServiceExecutionIT {
             StringUtils.join(new String[] { TARGET_DIR, "ittest" }, File.separator);
 
     private static final Logger LOGGER = LogManager.getLogger();
+    private static boolean startHdfs;
 
     enum KillCommand {
         CC,
@@ -119,6 +120,11 @@ public class NCServiceExecutionIT {
 
     @BeforeClass
     public static void setUp() throws Exception {
+        setUp(false);
+    }
+
+    public static void setUp(boolean startHdfs) throws Exception {
+        NCServiceExecutionIT.startHdfs = startHdfs;
         // Create actual-results output directory.
         File outDir = new File(ACTUAL_RESULTS_DIR);
         outDir.mkdirs();
@@ -129,8 +135,10 @@ public class NCServiceExecutionIT {
             FileUtils.deleteDirectory(instanceDir);
         }
 
-        // HDFSCluster requires the input directory to end with a file separator.
-        HDFSCluster.getInstance().setup(ASTERIX_APP_DIR + File.separator);
+        if (startHdfs) {
+            // HDFSCluster requires the input directory to end with a file separator.
+            HDFSCluster.getInstance().setup(ASTERIX_APP_DIR + File.separator);
+        }
 
         cluster = new HyracksVirtualCluster(new File(APP_HOME), new File(ASTERIX_APP_DIR));
         nc1 = cluster.addNCService(new File(CONF_DIR, "ncservice1.conf"), new File(LOG_DIR, "ncservice1.log"));
@@ -138,7 +146,7 @@ public class NCServiceExecutionIT {
         nc2 = cluster.addNCService(new File(CONF_DIR, "ncservice2.conf"), new File(LOG_DIR, "ncservice2.log"));
 
         // Start CC
-        cc = cluster.start(new File(CONF_DIR, "cc.conf"), new File(LOG_DIR, "cc.log"));
+        cc = cluster.start(new File(CONF_DIR, "cc.conf"), new File(LOG_DIR, "asterixcc.out.log"));
 
         testExecutor.waitForClusterActive(30, TimeUnit.SECONDS);
         clusterActive = true;
@@ -152,7 +160,9 @@ public class NCServiceExecutionIT {
             outdir.delete();
         }
         cluster.stop();
-        HDFSCluster.getInstance().cleanup();
+        if (startHdfs) {
+            HDFSCluster.getInstance().cleanup();
+        }
         if (!badTestCases.isEmpty()) {
             System.out.println("The following test cases left some data");
             for (String testCase : badTestCases) {
diff --git a/asterixdb/asterix-server/src/test/resources/NCServiceExecutionIT/cc.conf b/asterixdb/asterix-server/src/test/resources/NCServiceExecutionIT/cc.conf
index f3dcd63..f721ae5 100644
--- a/asterixdb/asterix-server/src/test/resources/NCServiceExecutionIT/cc.conf
+++ b/asterixdb/asterix-server/src/test/resources/NCServiceExecutionIT/cc.conf
@@ -20,7 +20,6 @@ txn.log.dir=../asterix-server/target/tmp/asterix_nc1/txnlog
 core.dump.dir=../asterix-server/target/tmp/asterix_nc1/coredump
 iodevices=../asterix-server/target/tmp/asterix_nc1/iodevice1,../asterix-server/target/tmp/asterix_nc1/iodevice2
 nc.api.port=19004
-jvm.args=-Xloggc:/tmp/asterix-server-failsafe/asterix_nc1-%p-gc.log -XX:+PrintGC -XX:+PrintGCDateStamps -XX:GCLogFileSize=10M -XX:+PrintFlagsFinal
 #jvm.args=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5006
 
 [nc/asterix_nc2]
@@ -29,14 +28,13 @@ txn.log.dir=../asterix-server/target/tmp/asterix_nc2/txnlog
 core.dump.dir=../asterix-server/target/tmp/asterix_nc2/coredump
 iodevices=../asterix-server/target/tmp/asterix_nc2/iodevice1,../asterix-server/target/tmp/asterix_nc2/iodevice2
 nc.api.port=19005
-jvm.args=-Xloggc:/tmp/asterix-server-failsafe/asterix_nc2-%p-gc.log -XX:+PrintGC -XX:+PrintGCDateStamps -XX:GCLogFileSize=10M -XX:+PrintFlagsFinal
 #jvm.args=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5007
 
 [nc]
 address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
-jvm.args=-Xmx4g -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
+jvm.args=-Xmx4g
 storage.memorycomponent.globalbudget = 1073741824
 
 [cc]
@@ -46,4 +44,5 @@ heartbeat.period=2000
 heartbeat.max.misses=25
 
 [common]
+log.dir = ../asterix-server/target/failsafe-reports/
 log.level = INFO
\ No newline at end of file