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: [EAGLE-488] fix not delete finished application path in zk and jobDefId issues
Date Tue, 23 Aug 2016 08:33:41 GMT
Repository: incubator-eagle
Updated Branches:
  refs/heads/develop 4b891ba01 -> 97c5f1ec9


[EAGLE-488] fix not delete finished application path in zk and jobDefId issues

Author: wujinhu <wujinhu920@126.com>

Closes #370 from wujinhu/EAGLE-488.


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

Branch: refs/heads/develop
Commit: 97c5f1ec966c443df37cd997e345ed2cf64ef6c2
Parents: 4b891ba
Author: wujinhu <wujinhu920@126.com>
Authored: Tue Aug 23 16:33:23 2016 +0800
Committer: anyway1021 <mw@apache.org>
Committed: Tue Aug 23 16:33:23 2016 +0800

----------------------------------------------------------------------
 .../org/apache/eagle/jpm/mr/running/parser/MRJobParser.java    | 6 ++++++
 .../apache/eagle/jpm/util/jobrecover/RunningJobManager.java    | 3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/97c5f1ec/eagle-jpm/eagle-jpm-mr-running/src/main/java/org/apache/eagle/jpm/mr/running/parser/MRJobParser.java
----------------------------------------------------------------------
diff --git a/eagle-jpm/eagle-jpm-mr-running/src/main/java/org/apache/eagle/jpm/mr/running/parser/MRJobParser.java
b/eagle-jpm/eagle-jpm-mr-running/src/main/java/org/apache/eagle/jpm/mr/running/parser/MRJobParser.java
index 2accad8..b7de79e 100644
--- a/eagle-jpm/eagle-jpm-mr-running/src/main/java/org/apache/eagle/jpm/mr/running/parser/MRJobParser.java
+++ b/eagle-jpm/eagle-jpm-mr-running/src/main/java/org/apache/eagle/jpm/mr/running/parser/MRJobParser.java
@@ -193,6 +193,12 @@ public class MRJobParser implements Runnable {
             jobExecutionAPIEntity.getTags().put(MRJobTagName.JOB_ID.toString(), id);
             jobExecutionAPIEntity.getTags().put(MRJobTagName.JOB_NAME.toString(), mrJob.getName());
             jobExecutionAPIEntity.getTags().put(MRJobTagName.JOD_DEF_ID.toString(), jobDefId);
+            if (mrJobConfigs.get(id) != null) {
+                JobConfig jobConfig = mrJobConfigs.get(id);
+                if (jobConfig.containsKey(this.configKeys.get(0))) {
+                    jobExecutionAPIEntity.getTags().put(MRJobTagName.JOD_DEF_ID.toString(),
jobConfig.get(this.configKeys.get(0)));
+                }
+            }
             jobExecutionAPIEntity.setTimestamp(app.getStartedTime());
             jobExecutionAPIEntity.setSubmissionTime(app.getStartedTime());
             jobExecutionAPIEntity.setStartTime(mrJob.getStartTime());

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/97c5f1ec/eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/jobrecover/RunningJobManager.java
----------------------------------------------------------------------
diff --git a/eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/jobrecover/RunningJobManager.java
b/eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/jobrecover/RunningJobManager.java
index 9b6a28f..81e2886 100644
--- a/eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/jobrecover/RunningJobManager.java
+++ b/eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/jobrecover/RunningJobManager.java
@@ -198,7 +198,8 @@ public class RunningJobManager implements Serializable {
             if (curator.checkExists().forPath(path) != null) {
                 curator.delete().deletingChildrenIfNeeded().forPath(path);
                 LOG.info("delete job {} for yarn app {}, path {} ", jobId, yarnAppId, path);
-                if (curator.getChildren().forPath(path).size() == 0) {
+                String yarnPath = this.zkRoot + "/" + yarnAppId;
+                if (curator.getChildren().forPath(yarnPath).size() == 0) {
                     delete(yarnAppId);
                 }
             }


Mime
View raw message