eagle-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m.@apache.org
Subject incubator-eagle git commit: remove unnecessary code of eagle-hadoop-queue
Date Wed, 26 Oct 2016 08:57:53 GMT
Repository: incubator-eagle
Updated Branches:
  refs/heads/master 278b0961c -> ee65453db


remove unnecessary code of eagle-hadoop-queue


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

Branch: refs/heads/master
Commit: ee65453dbbfb2f829201d4e8189ee716bcc849de
Parents: 278b096
Author: anyway1021 <mw@apache.org>
Authored: Wed Oct 26 16:53:06 2016 +0800
Committer: anyway1021 <mw@apache.org>
Committed: Wed Oct 26 16:56:48 2016 +0800

----------------------------------------------------------------------
 .../common/config/EagleConfigConstants.java     |  3 ---
 .../service/client/EagleServiceConnector.java   | 21 +++++---------------
 2 files changed, 5 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ee65453d/eagle-core/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigConstants.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigConstants.java
b/eagle-core/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigConstants.java
index 7c0c257..693041d 100644
--- a/eagle-core/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigConstants.java
+++ b/eagle-core/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigConstants.java
@@ -18,11 +18,8 @@ package org.apache.eagle.common.config;
 
 public final class EagleConfigConstants {
     public static final String SERVICE_ENV = "service.env";
-    public static final String SERVICE = "service";
     public static final String SERVICE_HOST = "service.host";
     public static final String SERVICE_PORT = "service.port";
-    public static final String SERVICE_USERNAME = "service.username";
-    public static final String SERVICE_PASSWORD = "service.password";
     public static final String SERVICE_HBASE_ZOOKEEPER_QUORUM = "storage.hbase.zookeeperQuorum";
     public static final String SERVICE_HBASE_ZOOKEEPER_PROPERTY_CLIENTPORT = "storage.hbase.zookeeperPropertyClientPort";
     public static final String SERVICE_ZOOKEEPER_ZNODE_PARENT = "storage.hbase.zookeeperZnodeParent";

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ee65453d/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceConnector.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceConnector.java
b/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceConnector.java
index a34f552..d06a3e4 100644
--- a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceConnector.java
+++ b/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceConnector.java
@@ -22,8 +22,6 @@ import org.apache.eagle.common.config.EagleConfigConstants;
 
 import java.io.Serializable;
 
-import static org.apache.eagle.common.config.EagleConfigConstants.SERVICE_ENV;
-
 /**
  * Some common codes to enable DAO through eagle service including service host/post, credential
population etc.
  */
@@ -61,20 +59,11 @@ public class EagleServiceConnector implements Serializable{
     }
 
     public EagleServiceConnector(Config config){
-        if (config.hasPath(EagleConfigConstants.SERVICE)) {
-            this.eagleServiceHost = config.getString(EagleConfigConstants.SERVICE_HOST);
-            this.eagleServicePort = config.getInt(EagleConfigConstants.SERVICE_PORT);
-            if (config.hasPath(EagleConfigConstants.SERVICE_USERNAME) && config.hasPath(EagleConfigConstants.SERVICE_PASSWORD))
{
-                this.username = config.getString(EagleConfigConstants.SERVICE_USERNAME);
-                this.password = config.getString(EagleConfigConstants.SERVICE_PASSWORD);
-            }
-        } else {
-            this.eagleServiceHost = config.getString(EagleConfigConstants.EAGLE_PROPS + "."
+ EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.HOST);
-            this.eagleServicePort = config.getInt(EagleConfigConstants.EAGLE_PROPS + "."
+ EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.PORT);
-            if (config.hasPath(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE
+ "." + EagleConfigConstants.USERNAME) && config.hasPath(EagleConfigConstants.EAGLE_PROPS
+ "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.PASSWORD)) {
-                this.username = config.getString(EagleConfigConstants.EAGLE_PROPS + "." +
EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.USERNAME);
-                this.password = config.getString(EagleConfigConstants.EAGLE_PROPS + "." +
EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.PASSWORD);
-            }
+        this.eagleServiceHost = config.getString(EagleConfigConstants.EAGLE_PROPS + "." +
EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.HOST);
+        this.eagleServicePort = config.getInt(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE
+ "." + EagleConfigConstants.PORT);
+        if (config.hasPath(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE
+ "." + EagleConfigConstants.USERNAME) && config.hasPath(EagleConfigConstants.EAGLE_PROPS
+ "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.PASSWORD)) {
+            this.username = config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE
+ "." + EagleConfigConstants.USERNAME);
+            this.password = config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE
+ "." + EagleConfigConstants.PASSWORD);
         }
     }
 }


Mime
View raw message