Repository: incubator-gobblin Updated Branches: refs/heads/master 69c65f842 -> f8d791b6a
[GOBBLIN-654] Fix the argument order of JobStatusRetriever APIs to reflect actual usage.[] Closes #2523 from sv2000/jobStatusRetriever Project: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/commit/f8d791b6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/tree/f8d791b6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/diff/f8d791b6 Branch: refs/heads/master Commit: f8d791b6a6bda46d63279e76cd743895f1e8b394 Parents: 69c65f8 Author: suvasude <[email protected]> Authored: Fri Dec 14 10:47:27 2018 -0800 Committer: Hung Tran <[email protected]> Committed: Fri Dec 14 10:47:27 2018 -0800 ---------------------------------------------------------------------- .../service/monitoring/JobStatusRetriever.java | 2 +- .../modules/orchestration/DagManager.java | 2 +- .../modules/orchestration/DagManagerTest.java | 32 ++++++++++---------- 3 files changed, 18 insertions(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-gobblin/blob/f8d791b6/gobblin-runtime/src/main/java/org/apache/gobblin/service/monitoring/JobStatusRetriever.java ---------------------------------------------------------------------- diff --git a/gobblin-runtime/src/main/java/org/apache/gobblin/service/monitoring/JobStatusRetriever.java b/gobblin-runtime/src/main/java/org/apache/gobblin/service/monitoring/JobStatusRetriever.java index 03a8cf6..f64d136 100644 --- a/gobblin-runtime/src/main/java/org/apache/gobblin/service/monitoring/JobStatusRetriever.java +++ b/gobblin-runtime/src/main/java/org/apache/gobblin/service/monitoring/JobStatusRetriever.java @@ -34,7 +34,7 @@ public abstract class JobStatusRetriever implements LatestFlowExecutionIdTracker long flowExecutionId); public abstract Iterator<JobStatus> getJobStatusesForFlowExecution(String flowName, String flowGroup, - long flowExecutionId, String jobGroup, String jobName); + long flowExecutionId, String jobName, String jobGroup); /** * Get the latest {@link JobStatus}es that belongs to the same latest flow execution. Currently, latest flow execution http://git-wip-us.apache.org/repos/asf/incubator-gobblin/blob/f8d791b6/gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManager.java ---------------------------------------------------------------------- diff --git a/gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManager.java b/gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManager.java index 0c94b36..1494ccf 100644 --- a/gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManager.java +++ b/gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManager.java @@ -349,7 +349,7 @@ public class DagManager extends AbstractIdleService { String jobName = jobConfig.getString(ConfigurationKeys.JOB_NAME_KEY); Iterator<JobStatus> jobStatusIterator = - this.jobStatusRetriever.getJobStatusesForFlowExecution(flowGroup, flowName, flowExecutionId, jobGroup, jobName); + this.jobStatusRetriever.getJobStatusesForFlowExecution(flowName, flowGroup, flowExecutionId, jobName, jobGroup); if (jobStatusIterator.hasNext()) { return jobStatusIterator.next(); } else { http://git-wip-us.apache.org/repos/asf/incubator-gobblin/blob/f8d791b6/gobblin-service/src/test/java/org/apache/gobblin/service/modules/orchestration/DagManagerTest.java ---------------------------------------------------------------------- diff --git a/gobblin-service/src/test/java/org/apache/gobblin/service/modules/orchestration/DagManagerTest.java b/gobblin-service/src/test/java/org/apache/gobblin/service/modules/orchestration/DagManagerTest.java index f23ece1..620c2ee 100644 --- a/gobblin-service/src/test/java/org/apache/gobblin/service/modules/orchestration/DagManagerTest.java +++ b/gobblin-service/src/test/java/org/apache/gobblin/service/modules/orchestration/DagManagerTest.java @@ -142,13 +142,13 @@ public class DagManagerTest { //Add a dag to the queue of dags this.queue.offer(dag); - Iterator<JobStatus> jobStatusIterator1 = getMockJobStatus(flowName, flowGroup, flowExecutionId, flowGroup, jobName0, String.valueOf(ExecutionStatus.RUNNING)); - Iterator<JobStatus> jobStatusIterator2 = getMockJobStatus(flowName, flowGroup, flowExecutionId, flowGroup, jobName0, String.valueOf(ExecutionStatus.COMPLETE)); - Iterator<JobStatus> jobStatusIterator3 = getMockJobStatus(flowName, flowGroup, flowExecutionId, flowGroup, jobName1, String.valueOf(ExecutionStatus.RUNNING)); - Iterator<JobStatus> jobStatusIterator4 = getMockJobStatus(flowName, flowGroup, flowExecutionId, flowGroup, jobName2, String.valueOf(ExecutionStatus.RUNNING)); - Iterator<JobStatus> jobStatusIterator5 = getMockJobStatus(flowName, flowGroup, flowExecutionId, flowGroup, jobName1, String.valueOf(ExecutionStatus.RUNNING)); - Iterator<JobStatus> jobStatusIterator6 = getMockJobStatus(flowName, flowGroup, flowExecutionId, flowGroup, jobName2, String.valueOf(ExecutionStatus.COMPLETE)); - Iterator<JobStatus> jobStatusIterator7 = getMockJobStatus(flowName, flowGroup, flowExecutionId, flowGroup, jobName1, String.valueOf(ExecutionStatus.COMPLETE)); + Iterator<JobStatus> jobStatusIterator1 = getMockJobStatus(flowName, flowGroup, flowExecutionId, jobName0, flowGroup, String.valueOf(ExecutionStatus.RUNNING)); + Iterator<JobStatus> jobStatusIterator2 = getMockJobStatus(flowName, flowGroup, flowExecutionId, jobName0, flowGroup, String.valueOf(ExecutionStatus.COMPLETE)); + Iterator<JobStatus> jobStatusIterator3 = getMockJobStatus(flowName, flowGroup, flowExecutionId, jobName1, flowGroup, String.valueOf(ExecutionStatus.RUNNING)); + Iterator<JobStatus> jobStatusIterator4 = getMockJobStatus(flowName, flowGroup, flowExecutionId, jobName2, flowGroup, String.valueOf(ExecutionStatus.RUNNING)); + Iterator<JobStatus> jobStatusIterator5 = getMockJobStatus(flowName, flowGroup, flowExecutionId, jobName1, flowGroup, String.valueOf(ExecutionStatus.RUNNING)); + Iterator<JobStatus> jobStatusIterator6 = getMockJobStatus(flowName, flowGroup, flowExecutionId, jobName2, flowGroup, String.valueOf(ExecutionStatus.COMPLETE)); + Iterator<JobStatus> jobStatusIterator7 = getMockJobStatus(flowName, flowGroup, flowExecutionId, jobName1, flowGroup, String.valueOf(ExecutionStatus.COMPLETE)); Mockito.when(_jobStatusRetriever.getJobStatusesForFlowExecution(Mockito.anyString(), Mockito.anyString(), Mockito.anyLong(), Mockito.anyString(), Mockito.anyString())). @@ -223,23 +223,23 @@ public class DagManagerTest { //Add a dag to the queue of dags this.queue.offer(dag); Iterator<JobStatus> jobStatusIterator1 = - getMockJobStatus(flowName, flowGroup, flowExecutionId, flowGroup, jobName0, String.valueOf(ExecutionStatus.RUNNING)); + getMockJobStatus(flowName, flowGroup, flowExecutionId, jobName0, flowGroup, String.valueOf(ExecutionStatus.RUNNING)); Iterator<JobStatus> jobStatusIterator2 = - getMockJobStatus(flowName, flowGroup, flowExecutionId, flowGroup, jobName0, String.valueOf(ExecutionStatus.COMPLETE)); + getMockJobStatus(flowName, flowGroup, flowExecutionId, jobName0, flowGroup, String.valueOf(ExecutionStatus.COMPLETE)); Iterator<JobStatus> jobStatusIterator3 = - getMockJobStatus(flowName, flowGroup, flowExecutionId, flowGroup, jobName1, String.valueOf(ExecutionStatus.RUNNING)); + getMockJobStatus(flowName, flowGroup, flowExecutionId, jobName1, flowGroup, String.valueOf(ExecutionStatus.RUNNING)); Iterator<JobStatus> jobStatusIterator4 = - getMockJobStatus(flowName, flowGroup, flowExecutionId, flowGroup, jobName2, String.valueOf(ExecutionStatus.RUNNING)); + getMockJobStatus(flowName, flowGroup, flowExecutionId, jobName2, flowGroup, String.valueOf(ExecutionStatus.RUNNING)); Iterator<JobStatus> jobStatusIterator5 = - getMockJobStatus(flowName, flowGroup, flowExecutionId, flowGroup, jobName1, String.valueOf(ExecutionStatus.RUNNING)); + getMockJobStatus(flowName, flowGroup, flowExecutionId, jobName1, flowGroup, String.valueOf(ExecutionStatus.RUNNING)); Iterator<JobStatus> jobStatusIterator6 = - getMockJobStatus(flowName, flowGroup, flowExecutionId, flowGroup, jobName2, String.valueOf(ExecutionStatus.FAILED)); + getMockJobStatus(flowName, flowGroup, flowExecutionId, jobName2, flowGroup, String.valueOf(ExecutionStatus.FAILED)); Iterator<JobStatus> jobStatusIterator7 = - getMockJobStatus(flowName, flowGroup, flowExecutionId, flowGroup, jobName1, String.valueOf(ExecutionStatus.COMPLETE)); + getMockJobStatus(flowName, flowGroup, flowExecutionId, jobName1, flowGroup, String.valueOf(ExecutionStatus.COMPLETE)); Iterator<JobStatus> jobStatusIterator8 = - getMockJobStatus(flowName, flowGroup, flowExecutionId, flowGroup, jobName1, String.valueOf(ExecutionStatus.RUNNING)); + getMockJobStatus(flowName, flowGroup, flowExecutionId, jobName1, flowGroup, String.valueOf(ExecutionStatus.RUNNING)); Iterator<JobStatus> jobStatusIterator9 = - getMockJobStatus(flowName, flowGroup, flowExecutionId, flowGroup, jobName1, String.valueOf(ExecutionStatus.COMPLETE)); + getMockJobStatus(flowName, flowGroup, flowExecutionId, jobName1, flowGroup, String.valueOf(ExecutionStatus.COMPLETE)); Mockito.when(_jobStatusRetriever
