From b4e8321056b9db2fb04fc14e69a20b2a32a7ba26 Mon Sep 17 00:00:00 2001 From: bchen Date: Wed, 31 Jul 2013 08:13:55 +0000 Subject: [PATCH] Fix Backlog Task TDI-26834 : provide rate of progress of the group https://jira.talendforge.org/browse/TDI-26834 add new mrJobIDInGroup for GUI to display rate of progress git-svn-id: http://talendforge.org/svn/tos/trunk@106030 f6f1c999-d317-4740-80b0-e6d1abc6f99e --- .../core/model/process/AbstractNode.java | 21 +++++++++++++++++++ .../java/routines/system/MRRunStat.java | 20 +++++++++--------- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/org.talend.core.runtime/src/main/java/org/talend/core/model/process/AbstractNode.java b/org.talend.core.runtime/src/main/java/org/talend/core/model/process/AbstractNode.java index fcf324c0c5..1bb48ed4e0 100644 --- a/org.talend.core.runtime/src/main/java/org/talend/core/model/process/AbstractNode.java +++ b/org.talend.core.runtime/src/main/java/org/talend/core/model/process/AbstractNode.java @@ -95,6 +95,9 @@ public abstract class AbstractNode implements INode { // for the component which will generate multiple mapreduce jobs, count the size of mapreduce jobs. private Integer mrJobInGroupCount; + // for the component which will generate multiple mapreduce jobs + private Integer mrJobIDInGroup; + public String getComponentName() { return componentName; } @@ -1053,4 +1056,22 @@ public abstract class AbstractNode implements INode { this.mrJobInGroupCount = mrJobInGroupCount; } + /** + * Getter for mrJobIDInGroup. + * + * @return the mrJobIDInGroup + */ + public Integer getMrJobIDInGroup() { + return mrJobIDInGroup; + } + + /** + * Sets the mrJobIDInGroup. + * + * @param mrJobIDInGroup the mrJobIDInGroup to set + */ + public void setMrJobIDInGroup(Integer mrJobIDInGroup) { + this.mrJobIDInGroup = mrJobIDInGroup; + } + } diff --git a/org.talend.librariesmanager/resources/java/routines/system/MRRunStat.java b/org.talend.librariesmanager/resources/java/routines/system/MRRunStat.java index 4a4766edeb..b3dfe4acfc 100644 --- a/org.talend.librariesmanager/resources/java/routines/system/MRRunStat.java +++ b/org.talend.librariesmanager/resources/java/routines/system/MRRunStat.java @@ -37,7 +37,7 @@ public class MRRunStat implements Runnable { private int groupID; - private String masterCID; + private int mrJobID; private float mapProgress; @@ -62,21 +62,21 @@ public class MRRunStat implements Runnable { } /** - * Getter for masterCID. + * Getter for mrJobID. * - * @return the masterCID + * @return the mrJobID */ - public String getMasterCID() { - return this.masterCID; + public int getMRJobID() { + return this.mrJobID; } /** - * Sets the masterCID. + * Sets the mrJobID. * - * @param masterCID the masterCID to set + * @param mrJobID the mrJobID to set */ - public void setMasterCID(String masterCID) { - this.masterCID = masterCID; + public void setMRJobID(int mrJobID) { + this.mrJobID = mrJobID; } /** @@ -121,7 +121,7 @@ public class MRRunStat implements Runnable { * @return */ public String toStatFormat() { - return this.groupID + "|" + this.masterCID + "|" + this.mapProgress + "|" + this.reduceProgress; + return this.groupID + "|" + this.mrJobID + "|" + this.mapProgress + "|" + this.reduceProgress; } }