asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amo...@apache.org
Subject asterixdb git commit: Rename Class Helper and cleanup ICCApplication interface
Date Fri, 10 Mar 2017 16:13:38 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master efe014d63 -> ebbc4dd71


Rename Class Helper and cleanup ICCApplication interface

Change-Id: I2f6deb10ff240e85b26244b52c99776c0d1d3291
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1567
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Michael Blow <mblow@apache.org>


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

Branch: refs/heads/master
Commit: ebbc4dd71f7688fedd0c96b9a759ef09cd6aae89
Parents: efe014d
Author: Abdullah Alamoudi <bamousaa@gmail.com>
Authored: Fri Mar 10 00:27:19 2017 -0800
Committer: abdullah alamoudi <bamousaa@gmail.com>
Committed: Fri Mar 10 08:12:09 2017 -0800

----------------------------------------------------------------------
 .../bootstrap/ApplicationClassHelper.java       | 39 --------------------
 .../bootstrap/ApplicationConfigurator.java      | 38 +++++++++++++++++++
 .../hyracks/bootstrap/CCApplication.java        |  5 +--
 .../hyracks/bootstrap/NCApplication.java        |  2 +-
 .../hyracks/api/application/ICCApplication.java |  3 --
 .../hyracks/control/cc/BaseCCApplication.java   |  6 ---
 6 files changed, 41 insertions(+), 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ebbc4dd7/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/ApplicationClassHelper.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/ApplicationClassHelper.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/ApplicationClassHelper.java
deleted file mode 100644
index e276be1..0000000
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/ApplicationClassHelper.java
+++ /dev/null
@@ -1,39 +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.asterix.hyracks.bootstrap;
-
-import org.apache.asterix.common.config.AsterixProperties;
-import org.apache.hyracks.api.config.IConfigManager;
-import org.apache.hyracks.control.common.controllers.CCConfig;
-import org.apache.hyracks.control.common.controllers.ControllerConfig;
-import org.apache.hyracks.control.common.controllers.NCConfig;
-import org.apache.hyracks.util.file.FileUtil;
-
-class ApplicationClassHelper {
-    private ApplicationClassHelper() {
-    }
-
-    static void registerConfigOptions(IConfigManager configManager) {
-        AsterixProperties.registerConfigOptions(configManager);
-
-        ControllerConfig.defaultDir = FileUtil.joinPath(System.getProperty("java.io.tmpdir"),
"asterixdb");
-        NCConfig.defaultAppClass = NCApplication.class.getName();
-        CCConfig.defaultAppClass = CCApplication.class.getName();
-    }
-}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ebbc4dd7/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/ApplicationConfigurator.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/ApplicationConfigurator.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/ApplicationConfigurator.java
new file mode 100644
index 0000000..4a5371a
--- /dev/null
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/ApplicationConfigurator.java
@@ -0,0 +1,38 @@
+/*
+ * 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.asterix.hyracks.bootstrap;
+
+import org.apache.asterix.common.config.AsterixProperties;
+import org.apache.hyracks.api.config.IConfigManager;
+import org.apache.hyracks.control.common.controllers.CCConfig;
+import org.apache.hyracks.control.common.controllers.ControllerConfig;
+import org.apache.hyracks.control.common.controllers.NCConfig;
+import org.apache.hyracks.util.file.FileUtil;
+
+class ApplicationConfigurator {
+    private ApplicationConfigurator() {
+    }
+
+    static void registerConfigOptions(IConfigManager configManager) {
+        AsterixProperties.registerConfigOptions(configManager);
+        ControllerConfig.defaultDir = FileUtil.joinPath(System.getProperty("java.io.tmpdir"),
"asterixdb");
+        NCConfig.defaultAppClass = NCApplication.class.getName();
+        CCConfig.defaultAppClass = CCApplication.class.getName();
+    }
+}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ebbc4dd7/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplication.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplication.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplication.java
index dadc2ae..c831508 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplication.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplication.java
@@ -304,7 +304,7 @@ public class CCApplication extends BaseCCApplication {
     @Override
     public void registerConfig(IConfigManager configManager) {
         super.registerConfig(configManager);
-        ApplicationClassHelper.registerConfigOptions(configManager);
+        ApplicationConfigurator.registerConfigOptions(configManager);
     }
 
     public static synchronized void setAsterixStateProxy(IAsterixStateProxy proxy) {
@@ -316,8 +316,7 @@ public class CCApplication extends BaseCCApplication {
         return AppContextInfo.INSTANCE;
     }
 
-    @Override
-    public IHyracksClientConnection getHcc() throws Exception {
+    protected IHyracksClientConnection getHcc() throws Exception {
         String strIP = ccServiceCtx.getCCContext().getClusterControllerInfo().getClientNetAddress();
         int port = ccServiceCtx.getCCContext().getClusterControllerInfo().getClientNetPort();
         return new HyracksConnection(strIP, port);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ebbc4dd7/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/NCApplication.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/NCApplication.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/NCApplication.java
index 28e1f23..ce33cef 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/NCApplication.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/NCApplication.java
@@ -68,7 +68,7 @@ public class NCApplication extends BaseNCApplication {
     @Override
     public void registerConfig(IConfigManager configManager) {
         super.registerConfig(configManager);
-        ApplicationClassHelper.registerConfigOptions(configManager);
+        ApplicationConfigurator.registerConfigOptions(configManager);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ebbc4dd7/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/application/ICCApplication.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/application/ICCApplication.java
b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/application/ICCApplication.java
index b105d24..d4269d5 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/application/ICCApplication.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/application/ICCApplication.java
@@ -18,13 +18,10 @@
  */
 package org.apache.hyracks.api.application;
 
-import org.apache.hyracks.api.client.IHyracksClientConnection;
 import org.apache.hyracks.api.job.resource.IJobCapacityController;
 
 public interface ICCApplication extends IApplication {
 
     IJobCapacityController getJobCapacityController();
 
-    IHyracksClientConnection getHcc() throws Exception; //NOSONAR
-
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ebbc4dd7/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/BaseCCApplication.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/BaseCCApplication.java
b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/BaseCCApplication.java
index ccdd493..8e423b8 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/BaseCCApplication.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/BaseCCApplication.java
@@ -22,7 +22,6 @@ import java.util.Arrays;
 
 import org.apache.hyracks.api.application.ICCApplication;
 import org.apache.hyracks.api.application.IServiceContext;
-import org.apache.hyracks.api.client.IHyracksClientConnection;
 import org.apache.hyracks.api.config.IConfigManager;
 import org.apache.hyracks.api.config.Section;
 import org.apache.hyracks.api.job.resource.DefaultJobCapacityController;
@@ -71,9 +70,4 @@ public class BaseCCApplication implements ICCApplication {
     public Object getApplicationContext() {
         return null;
     }
-
-    @Override
-    public IHyracksClientConnection getHcc() throws Exception {
-        return null;
-    }
 }


Mime
View raw message