[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 <mblow@apache.org>
Tested-by: Michael Blow <mblow@apache.org>
Integration-Tests: Michael Blow <mblow@apache.org>
Reviewed-by: Murtadha Hubail <mhubail@apache.org>
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 @@
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 @@
@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 @@
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 @@
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 @@
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 @@
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 @@
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.max.misses=25
[common]
+log.dir = ../asterix-server/target/failsafe-reports/
log.level = INFO
\ No newline at end of file