This is an automated email from the ASF dual-hosted git repository.
hutran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-gobblin.git
The following commit(s) were added to refs/heads/master by this push:
new fdd39f9 [GOBBLIN-690] Fix the planning job relaunch name match.
fdd39f9 is described below
commit fdd39f90c0ae8af0fe368bf668c41c950920494b
Author: Kuai Yu <[email protected]>
AuthorDate: Mon Feb 25 12:14:31 2019 -0800
[GOBBLIN-690] Fix the planning job relaunch name match.
Closes #2562 from yukuai518/relaunch
---
.../apache/gobblin/cluster/GobblinHelixMultiManager.java | 2 +-
.../cluster/GobblinHelixPlanningJobLauncherMetrics.java | 16 ----------------
2 files changed, 1 insertion(+), 17 deletions(-)
diff --git
a/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixMultiManager.java
b/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixMultiManager.java
index 03ae69f..2ef3b2e 100644
---
a/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixMultiManager.java
+++
b/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixMultiManager.java
@@ -376,7 +376,7 @@ public class GobblinHelixMultiManager implements
StandardMetricsBridge {
for (Map.Entry<String, WorkflowConfig> entry : workflows.entrySet()) {
String workflowName = entry.getKey();
- if
(workflowName.contains(GobblinClusterConfigurationKeys.PLANNING_CONF_PREFIX)
+ if
(workflowName.contains(GobblinClusterConfigurationKeys.PLANNING_JOB_NAME_PREFIX)
||
workflowName.contains(GobblinClusterConfigurationKeys.ACTUAL_JOB_NAME_PREFIX)) {
if (!cleanupDistJobs) {
log.info("Distributed job {} won't be deleted.", workflowName);
diff --git
a/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixPlanningJobLauncherMetrics.java
b/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixPlanningJobLauncherMetrics.java
index 8758c9b..fe9c906 100644
---
a/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixPlanningJobLauncherMetrics.java
+++
b/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixPlanningJobLauncherMetrics.java
@@ -17,25 +17,20 @@
package org.apache.gobblin.cluster;
-import java.io.IOException;
import java.util.concurrent.TimeUnit;
import org.apache.gobblin.instrumented.Instrumented;
import org.apache.gobblin.instrumented.StandardMetricsBridge;
-import org.apache.gobblin.metrics.ContextAwareGauge;
import org.apache.gobblin.metrics.ContextAwareTimer;
import org.apache.gobblin.metrics.MetricContext;
public class GobblinHelixPlanningJobLauncherMetrics extends
StandardMetricsBridge.StandardMetrics {
private final String metricsName;
- private final HelixJobsMapping jobsMapping;
public static final String TIMER_FOR_COMPLETED_PLANNING_JOBS =
"timeForCompletedPlanningJobs";
public static final String TIMER_FOR_FAILED_PLANNING_JOBS =
"timeForFailedPlanningJobs";
- public static final String NUM_ACTIVE_PLANNING_JOBS =
"numActivePlanningJobs";
final ContextAwareTimer timeForCompletedPlanningJobs;
final ContextAwareTimer timeForFailedPlanningJobs;
- final ContextAwareGauge<Integer> numActivePlanningJobs;
public GobblinHelixPlanningJobLauncherMetrics(String metricsName,
final MetricContext metricContext,
@@ -43,21 +38,10 @@ public class GobblinHelixPlanningJobLauncherMetrics extends
StandardMetricsBridg
HelixJobsMapping jobsMapping) {
this.metricsName = metricsName;
- this.jobsMapping = jobsMapping;
this.timeForCompletedPlanningJobs =
metricContext.contextAwareTimer(TIMER_FOR_COMPLETED_PLANNING_JOBS,
windowSizeInMin, TimeUnit.MINUTES);
this.timeForFailedPlanningJobs =
metricContext.contextAwareTimer(TIMER_FOR_FAILED_PLANNING_JOBS,
windowSizeInMin, TimeUnit.MINUTES);
- this.numActivePlanningJobs =
metricContext.newContextAwareGauge(NUM_ACTIVE_PLANNING_JOBS,
()->getNumOfMappings());
this.contextAwareMetrics.add(timeForCompletedPlanningJobs);
this.contextAwareMetrics.add(timeForFailedPlanningJobs);
- this.contextAwareMetrics.add(numActivePlanningJobs);
- }
-
- private int getNumOfMappings() {
- try {
- return this.jobsMapping.getAllStates().size();
- } catch (IOException e) {
- return 0;
- }
}
public void updateTimeForCompletedPlanningJobs(long startTime) {