Use more accurate name 'NCService' for HyracksVirtualCluster
Change-Id: I2c68c8a7abde3906df2961b214f046bdd9bfd426
Reviewed-on: https://asterix-gerrit.ics.uci.edu/982
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>
diff --git a/asterixdb/asterix-server/src/test/java/org/apache/asterix/server/test/NCServiceExecutionIT.java b/asterixdb/asterix-server/src/test/java/org/apache/asterix/server/test/NCServiceExecutionIT.java
index c179103..696726f 100644
--- a/asterixdb/asterix-server/src/test/java/org/apache/asterix/server/test/NCServiceExecutionIT.java
+++ b/asterixdb/asterix-server/src/test/java/org/apache/asterix/server/test/NCServiceExecutionIT.java
@@ -111,11 +111,11 @@
HDFSCluster.getInstance().setup(ASTERIX_APP_DIR + File.separator);
cluster = new HyracksVirtualCluster(new File(APP_HOME), new File(ASTERIX_APP_DIR));
- cluster.addNC(
+ cluster.addNCService(
new File(CONF_DIR, "ncservice1.conf"),
new File(LOG_DIR, "ncservice1.log")
);
- cluster.addNC(
+ cluster.addNCService(
new File(CONF_DIR, "ncservice2.conf"),
new File(LOG_DIR, "ncservice2.log")
);
diff --git a/hyracks-fullstack/hyracks/hyracks-server/src/main/java/org/apache/hyracks/server/process/HyracksNCProcess.java b/hyracks-fullstack/hyracks/hyracks-server/src/main/java/org/apache/hyracks/server/process/HyracksNCServiceProcess.java
similarity index 88%
rename from hyracks-fullstack/hyracks/hyracks-server/src/main/java/org/apache/hyracks/server/process/HyracksNCProcess.java
rename to hyracks-fullstack/hyracks/hyracks-server/src/main/java/org/apache/hyracks/server/process/HyracksNCServiceProcess.java
index 8bc1694..39971ad 100644
--- a/hyracks-fullstack/hyracks/hyracks-server/src/main/java/org/apache/hyracks/server/process/HyracksNCProcess.java
+++ b/hyracks-fullstack/hyracks/hyracks-server/src/main/java/org/apache/hyracks/server/process/HyracksNCServiceProcess.java
@@ -23,9 +23,9 @@
import java.io.File;
import java.util.List;
-public class HyracksNCProcess extends HyracksServerProcess {
+public class HyracksNCServiceProcess extends HyracksServerProcess {
- public HyracksNCProcess(File configFile, File logFile, File appHome, File workingDir) {
+ public HyracksNCServiceProcess(File configFile, File logFile, File appHome, File workingDir) {
this.configFile = configFile;
this.logFile = logFile;
this.appHome = appHome;
diff --git a/hyracks-fullstack/hyracks/hyracks-server/src/main/java/org/apache/hyracks/server/process/HyracksVirtualCluster.java b/hyracks-fullstack/hyracks/hyracks-server/src/main/java/org/apache/hyracks/server/process/HyracksVirtualCluster.java
index f08bb43..cc0ecf7 100644
--- a/hyracks-fullstack/hyracks/hyracks-server/src/main/java/org/apache/hyracks/server/process/HyracksVirtualCluster.java
+++ b/hyracks-fullstack/hyracks/hyracks-server/src/main/java/org/apache/hyracks/server/process/HyracksVirtualCluster.java
@@ -30,7 +30,7 @@
public class HyracksVirtualCluster {
private final File appHome;
private final File workingDir;
- private List<HyracksNCProcess> ncProcs = new ArrayList<>(3);
+ private List<HyracksNCServiceProcess> ncProcs = new ArrayList<>(3);
private HyracksCCProcess ccProc = null;
/**
@@ -51,15 +51,15 @@
* @param configFile - full path to an ncservice.conf. May be null to accept all defaults.
* @throws IOException - if there are errors starting the process.
*/
- public void addNC(File configFile, File logFile) throws IOException {
- HyracksNCProcess proc = new HyracksNCProcess(configFile, logFile, appHome, workingDir);
+ public void addNCService(File configFile, File logFile) throws IOException {
+ HyracksNCServiceProcess proc = new HyracksNCServiceProcess(configFile, logFile, appHome, workingDir);
proc.start();
ncProcs.add(proc);
}
/**
* Starts the CC, initializing the cluster. Expects that any NCs referenced
- * in the cluster configuration have already been started with addNC().
+ * in the cluster configuration have already been started with addNCService().
* @param ccConfigFile - full path to a cluster conf file. May be null to accept all
* defaults, although this is seldom useful since there are no NCs.
* @throws IOException - if there are errors starting the process.
@@ -76,7 +76,7 @@
*/
public void stop() {
ccProc.stop();
- for (HyracksNCProcess proc : ncProcs) {
+ for (HyracksNCServiceProcess proc : ncProcs) {
proc.stop();
}
}
diff --git a/hyracks-fullstack/hyracks/hyracks-server/src/test/java/org/apache/hyracks/server/test/NCServiceIT.java b/hyracks-fullstack/hyracks/hyracks-server/src/test/java/org/apache/hyracks/server/test/NCServiceIT.java
index 9a231a0..3b40ea9 100644
--- a/hyracks-fullstack/hyracks/hyracks-server/src/test/java/org/apache/hyracks/server/test/NCServiceIT.java
+++ b/hyracks-fullstack/hyracks/hyracks-server/src/test/java/org/apache/hyracks/server/test/NCServiceIT.java
@@ -33,8 +33,6 @@
import java.io.File;
import java.io.IOException;
import java.net.InetAddress;
-import java.util.ArrayList;
-import java.util.List;
import java.util.logging.Logger;
public class NCServiceIT {
@@ -54,11 +52,11 @@
@BeforeClass
public static void setUp() throws Exception {
cluster = new HyracksVirtualCluster(new File(APP_HOME), null);
- cluster.addNC(
+ cluster.addNCService(
new File(RESOURCE_DIR, "nc-red.conf"),
new File(LOG_DIR, "nc-red.log")
);
- cluster.addNC(
+ cluster.addNCService(
new File(RESOURCE_DIR, "nc-blue.conf"),
new File(LOG_DIR, "nc-blue.log")
);