You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by ce...@apache.org on 2016/07/08 17:30:38 UTC

asterixdb git commit: Use more accurate name 'NCService' for HyracksVirtualCluster

Repository: asterixdb
Updated Branches:
  refs/heads/master f09607dd9 -> 29682cf47


Use more accurate name 'NCService' for HyracksVirtualCluster

Change-Id: I2c68c8a7abde3906df2961b214f046bdd9bfd426
Reviewed-on: https://asterix-gerrit.ics.uci.edu/982
Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: 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/29682cf4
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/29682cf4
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/29682cf4

Branch: refs/heads/master
Commit: 29682cf4761fc868dc27658c74c7339eb0512c65
Parents: f09607d
Author: Chris Hillery <ch...@lambda.nu>
Authored: Fri Jul 8 00:17:16 2016 -0700
Committer: Chris Hillery <ce...@lambda.nu>
Committed: Fri Jul 8 10:29:14 2016 -0700

----------------------------------------------------------------------
 .../server/test/NCServiceExecutionIT.java       |  4 +-
 .../server/process/HyracksNCProcess.java        | 45 --------------------
 .../server/process/HyracksNCServiceProcess.java | 45 ++++++++++++++++++++
 .../server/process/HyracksVirtualCluster.java   | 10 ++---
 .../apache/hyracks/server/test/NCServiceIT.java |  6 +--
 5 files changed, 54 insertions(+), 56 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/29682cf4/asterixdb/asterix-server/src/test/java/org/apache/asterix/server/test/NCServiceExecutionIT.java
----------------------------------------------------------------------
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 @@ public class NCServiceExecutionIT {
         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")
         );

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/29682cf4/hyracks-fullstack/hyracks/hyracks-server/src/main/java/org/apache/hyracks/server/process/HyracksNCProcess.java
----------------------------------------------------------------------
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/HyracksNCProcess.java
deleted file mode 100644
index 8bc1694..0000000
--- a/hyracks-fullstack/hyracks/hyracks-server/src/main/java/org/apache/hyracks/server/process/HyracksNCProcess.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.hyracks.server.process;
-
-import org.apache.hyracks.control.nc.service.NCService;
-
-import java.io.File;
-import java.util.List;
-
-public class HyracksNCProcess extends HyracksServerProcess {
-
-    public HyracksNCProcess(File configFile, File logFile, File appHome, File workingDir) {
-        this.configFile = configFile;
-        this.logFile = logFile;
-        this.appHome = appHome;
-        this.workingDir = workingDir;
-    }
-
-    @Override
-    protected String getMainClassName() {
-        return NCService.class.getName();
-    }
-
-    @Override
-    protected void addJvmArgs(List<String> cList) {
-        // NCService needs little memory
-        cList.add("-Xmx128m");
-    }
-}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/29682cf4/hyracks-fullstack/hyracks/hyracks-server/src/main/java/org/apache/hyracks/server/process/HyracksNCServiceProcess.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-server/src/main/java/org/apache/hyracks/server/process/HyracksNCServiceProcess.java b/hyracks-fullstack/hyracks/hyracks-server/src/main/java/org/apache/hyracks/server/process/HyracksNCServiceProcess.java
new file mode 100644
index 0000000..39971ad
--- /dev/null
+++ b/hyracks-fullstack/hyracks/hyracks-server/src/main/java/org/apache/hyracks/server/process/HyracksNCServiceProcess.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.hyracks.server.process;
+
+import org.apache.hyracks.control.nc.service.NCService;
+
+import java.io.File;
+import java.util.List;
+
+public class HyracksNCServiceProcess extends HyracksServerProcess {
+
+    public HyracksNCServiceProcess(File configFile, File logFile, File appHome, File workingDir) {
+        this.configFile = configFile;
+        this.logFile = logFile;
+        this.appHome = appHome;
+        this.workingDir = workingDir;
+    }
+
+    @Override
+    protected String getMainClassName() {
+        return NCService.class.getName();
+    }
+
+    @Override
+    protected void addJvmArgs(List<String> cList) {
+        // NCService needs little memory
+        cList.add("-Xmx128m");
+    }
+}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/29682cf4/hyracks-fullstack/hyracks/hyracks-server/src/main/java/org/apache/hyracks/server/process/HyracksVirtualCluster.java
----------------------------------------------------------------------
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 @@ import java.util.List;
 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 @@ public class HyracksVirtualCluster {
      * @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 class HyracksVirtualCluster {
      */
     public void stop() {
         ccProc.stop();
-        for (HyracksNCProcess proc : ncProcs) {
+        for (HyracksNCServiceProcess proc : ncProcs) {
             proc.stop();
         }
     }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/29682cf4/hyracks-fullstack/hyracks/hyracks-server/src/test/java/org/apache/hyracks/server/test/NCServiceIT.java
----------------------------------------------------------------------
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 org.junit.Test;
 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 @@ public class NCServiceIT {
     @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")
         );