eagle-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h..@apache.org
Subject [46/50] incubator-eagle git commit: [EAGLE-633] MR history feeder read some configurations from eagle server
Date Wed, 19 Oct 2016 03:28:01 GMT
[EAGLE-633] MR history feeder read some configurations from eagle server

Author: wujinhu <wujinhu920@126.com>

Closes #525 from wujinhu/EAGLE-633.


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

Branch: refs/heads/master
Commit: 2479d32791dd1a424af7513279ba28543baf6af4
Parents: 310935d
Author: wujinhu <wujinhu920@126.com>
Authored: Tue Oct 18 17:20:37 2016 +0800
Committer: wujinhu <wujinhu920@126.com>
Committed: Tue Oct 18 17:20:37 2016 +0800

----------------------------------------------------------------------
 .../jpm/mr/history/MRHistoryJobConfig.java      | 20 +++---
 ....history.MRHistoryJobApplicationProvider.xml | 64 +-------------------
 .../src/main/resources/application.conf         |  4 +-
 eagle-server-assembly/src/main/conf/eagle.conf  | 10 +++
 .../src/main/resources/application.conf         | 10 +++
 5 files changed, 33 insertions(+), 75 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2479d327/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobConfig.java
----------------------------------------------------------------------
diff --git a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobConfig.java
b/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobConfig.java
index 561c3d0..566f7d0 100644
--- a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobConfig.java
+++ b/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobConfig.java
@@ -119,11 +119,11 @@ public class MRHistoryJobConfig implements Serializable {
         this.config = config;
 
         //parse eagle zk
-        this.zkStateConfig.zkQuorum = config.getString("zkStateConfig.zkQuorum");
-        this.zkStateConfig.zkSessionTimeoutMs = config.getInt("zkStateConfig.zkSessionTimeoutMs");
-        this.zkStateConfig.zkRetryTimes = config.getInt("zkStateConfig.zkRetryTimes");
-        this.zkStateConfig.zkRetryInterval = config.getInt("zkStateConfig.zkRetryInterval");
-        this.zkStateConfig.zkRoot = config.getString("zkStateConfig.zkRoot");
+        this.zkStateConfig.zkQuorum = config.getString("zookeeper.zkQuorum");
+        this.zkStateConfig.zkSessionTimeoutMs = config.getInt("zookeeper.zkSessionTimeoutMs");
+        this.zkStateConfig.zkRetryTimes = config.getInt("zookeeper.zkRetryTimes");
+        this.zkStateConfig.zkRetryInterval = config.getInt("zookeeper.zkRetryInterval");
+        this.zkStateConfig.zkRoot = config.getString("zookeeper.zkRoot");
 
         //parse job history endpoint
         this.jobHistoryEndpointConfig.site = config.getString("siteId");
@@ -135,12 +135,12 @@ public class MRHistoryJobConfig implements Serializable {
         this.jobHistoryEndpointConfig.timeZone = config.getString("endpointConfig.timeZone");
 
         // parse eagle service endpoint
-        this.eagleServiceConfig.eagleServiceHost = config.getString("eagleService.host");
-        String port = config.getString("eagleService.port");
+        this.eagleServiceConfig.eagleServiceHost = config.getString("service.host");
+        String port = config.getString("service.port");
         this.eagleServiceConfig.eagleServicePort = (port == null ? 8080 : Integer.parseInt(port));
-        this.eagleServiceConfig.username = config.getString("eagleService.username");
-        this.eagleServiceConfig.password = config.getString("eagleService.password");
-        this.eagleServiceConfig.readTimeoutSeconds = config.getInt("eagleService.readTimeOutSeconds");
+        this.eagleServiceConfig.username = config.getString("service.username");
+        this.eagleServiceConfig.password = config.getString("service.password");
+        this.eagleServiceConfig.readTimeoutSeconds = config.getInt("service.readTimeOutSeconds");
 
         LOG.info("Successfully initialized MRHistoryJobConfig");
         LOG.info("zkStateConfig.zkQuorum: " + this.zkStateConfig.zkQuorum);

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2479d327/eagle-jpm/eagle-jpm-mr-history/src/main/resources/META-INF/providers/org.apache.eagle.jpm.mr.history.MRHistoryJobApplicationProvider.xml
----------------------------------------------------------------------
diff --git a/eagle-jpm/eagle-jpm-mr-history/src/main/resources/META-INF/providers/org.apache.eagle.jpm.mr.history.MRHistoryJobApplicationProvider.xml
b/eagle-jpm/eagle-jpm-mr-history/src/main/resources/META-INF/providers/org.apache.eagle.jpm.mr.history.MRHistoryJobApplicationProvider.xml
index 9835411..42f3167 100644
--- a/eagle-jpm/eagle-jpm-mr-history/src/main/resources/META-INF/providers/org.apache.eagle.jpm.mr.history.MRHistoryJobApplicationProvider.xml
+++ b/eagle-jpm/eagle-jpm-mr-history/src/main/resources/META-INF/providers/org.apache.eagle.jpm.mr.history.MRHistoryJobApplicationProvider.xml
@@ -36,40 +36,12 @@
         </property>
 
         <property>
-            <name>zkStateConfig.zkQuorum</name>
-            <displayName>Zookeeper Servers</displayName>
-            <description>list of zookeeper servers to connect to</description>
-            <value>sandbox.hortonworks.com:2181</value>
-            <required>true</required>
-        </property>
-        <property>
-            <name>zkStateConfig.zkRoot</name>
+            <name>zookeeper.zkRoot</name>
             <displayName>Zookeeper Root Path</displayName>
             <description>zkRoot that used to save context for this application</description>
             <value>/mrjobhistory_sandbox</value>
             <required>true</required>
         </property>
-        <property>
-            <name>zkStateConfig.zkSessionTimeoutMs</name>
-            <displayName>Zookeeper Session Timeout</displayName>
-            <description>session timeout</description>
-            <value>15000</value>
-            <required>true</required>
-        </property>
-        <property>
-            <name>zkStateConfig.zkRetryTimes</name>
-            <displayName>Zookeeper Retry Times</displayName>
-            <description>retry policy to use - retry times</description>
-            <value>3</value>
-            <required>true</required>
-        </property>
-        <property>
-            <name>zkStateConfig.zkRetryInterval</name>
-            <displayName>Zookeeper Retry Interval</displayName>
-            <description>retry policy to use - retry interval</description>
-            <value>20000</value>
-            <required>true</required>
-        </property>
 
         <property>
             <name>endpointConfig.timeZone</name>
@@ -122,40 +94,6 @@
             <description>User use -Dkey=value to specify name of a job when submit.
use this to extract job name from job configuration</description>
             <value>eagle.job.name</value>
         </property>
-        <property>
-            <name>eagleService.host</name>
-            <displayName>Eagle Server Host</displayName>
-            <description>eagle server host</description>
-            <value>sandbox.hortonworks.com</value>
-            <required>true</required>
-        </property>
-        <property>
-            <name>eagleService.port</name>
-            <displayName>Eagle Server Port</displayName>
-            <description>eagle server port</description>
-            <value>9099</value>
-            <required>true</required>
-        </property>
-        <property>
-            <name>eagleService.username</name>
-            <displayName>Eagle Server UserName</displayName>
-            <description>eagle server username used to login</description>
-            <value>admin</value>
-            <required>true</required>
-        </property>
-        <property>
-            <name>eagleService.password</name>
-            <displayName>Eagle Server Password</displayName>
-            <description>eagle server password used to login</description>
-            <value>secret</value>
-            <required>true</required>
-        </property>
-        <property>
-            <name>eagleService.readTimeOutSeconds</name>
-            <displayName>Eagle Server Read TimeOut(seconds)</displayName>
-            <description>eagle server read time out(seconds)</description>
-            <value>60</value>
-        </property>
     </configuration>
     <docs>
         <install>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2479d327/eagle-jpm/eagle-jpm-mr-history/src/main/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-jpm/eagle-jpm-mr-history/src/main/resources/application.conf b/eagle-jpm/eagle-jpm-mr-history/src/main/resources/application.conf
index 3f84f0a..0eb287f 100644
--- a/eagle-jpm/eagle-jpm-mr-history/src/main/resources/application.conf
+++ b/eagle-jpm/eagle-jpm-mr-history/src/main/resources/application.conf
@@ -24,7 +24,7 @@
     "mrHistoryJobSpoutTasks" : 6,
   },
 
-  "zkStateConfig" : {
+  "zookeeper" : {
     "zkQuorum" : "sandbox.hortonworks.com:2181",
     "zkRoot" : "/test_mrjobhistory",
     "zkSessionTimeoutMs" : 15000,
@@ -45,7 +45,7 @@
     }
   },
 
-  "eagleService": {
+  "service": {
     "host": "sandbox.hortonworks.com",
     "port": 9099,
     "username": "admin",

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2479d327/eagle-server-assembly/src/main/conf/eagle.conf
----------------------------------------------------------------------
diff --git a/eagle-server-assembly/src/main/conf/eagle.conf b/eagle-server-assembly/src/main/conf/eagle.conf
index 0a3352e..9c804a6 100644
--- a/eagle-server-assembly/src/main/conf/eagle.conf
+++ b/eagle-server-assembly/src/main/conf/eagle.conf
@@ -20,10 +20,20 @@ service {
 	env = "testing"
 	host = "localhost"
 	port = 9090
+	username = "admin"
+	password = "secret"
+	readTimeOutSeconds = 60
 	context = "/rest"
 	timezone = "UTC"
 }
 
+zookeeper {
+	zkQuorum = "localhost:2181"
+	zkSessionTimeoutMs : 15000
+	zkRetryTimes : 3
+	zkRetryInterval : 20000
+}
+
 # ---------------------------------------------
 # Eagle Deep Storage Configuration
 # ---------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2479d327/eagle-server/src/main/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/resources/application.conf b/eagle-server/src/main/resources/application.conf
index f2ec772..557fa00 100644
--- a/eagle-server/src/main/resources/application.conf
+++ b/eagle-server/src/main/resources/application.conf
@@ -20,10 +20,20 @@ service {
   env = "testing"
   host = "localhost"
   port = 9090
+  username = "admin"
+  password = "secret"
+  readTimeOutSeconds = 60
   context = "/rest"
   timezone = "UTC"
 }
 
+zookeeper {
+  zkQuorum = "localhost:2181"
+  zkSessionTimeoutMs : 15000
+  zkRetryTimes : 3
+  zkRetryInterval : 20000
+}
+
 # ---------------------------------------------
 # Eagle Deep Storage Configuration
 # ---------------------------------------------


Mime
View raw message