phet commented on a change in pull request #3437:
URL: https://github.com/apache/gobblin/pull/3437#discussion_r763560348
##########
File path:
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManager.java
##########
@@ -208,7 +212,8 @@ public DagManager(Config config, JobStatusRetriever
jobStatusRetriever, boolean
}
this.defaultQuota = ConfigUtils.getInt(config, USER_JOB_QUOTA_KEY,
DEFAULT_USER_JOB_QUOTA);
-
+ TimeUnit jobStartTimeunit = TimeUnit.valueOf(ConfigUtils.getString(config,
JOB_START_SLA_UNITS,
ConfigurationKeys.FALLBACK_GOBBLIN_JOB_START_SLA_TIME_UNIT));
+ this.defaultJobStartSlaTime =
jobStartTimeunit.toMillis(ConfigUtils.getLong(config, JOB_START_SLA_TIME,
ConfigurationKeys.FALLBACK_GOBBLIN_JOB_START_SLA_TIME));
Review comment:
I recommend a `Millis` suffix to clarify units through naming.
##########
File path:
gobblin-service/src/test/java/org/apache/gobblin/service/modules/orchestration/DagManagerTest.java
##########
@@ -90,7 +90,7 @@ public void setUp() throws Exception {
MetricContext metricContext =
Instrumented.getMetricContext(ConfigUtils.configToState(ConfigFactory.empty()),
getClass());
this._dagManagerThread = new
DagManager.DagManagerThread(_jobStatusRetriever, _dagStateStore,
failedDagStateStore, queue, cancelQueue,
resumeQueue, true, 5, new HashMap<>(), new HashSet<>(),
metricContext.contextAwareMeter("successMeter"),
- metricContext.contextAwareMeter("failedMeter"));
+ metricContext.contextAwareMeter("failedMeter"), 15L * 60 * 1000);
Review comment:
this is only a test... but still helpful to name magic numbers
##########
File path:
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManager.java
##########
@@ -208,7 +212,8 @@ public DagManager(Config config, JobStatusRetriever
jobStatusRetriever, boolean
}
this.defaultQuota = ConfigUtils.getInt(config, USER_JOB_QUOTA_KEY,
DEFAULT_USER_JOB_QUOTA);
-
+ TimeUnit jobStartTimeunit = TimeUnit.valueOf(ConfigUtils.getString(config,
JOB_START_SLA_UNITS,
ConfigurationKeys.FALLBACK_GOBBLIN_JOB_START_SLA_TIME_UNIT));
Review comment:
minor (oversight?): since snake_case is `TIME_UNIT`, camelCase should be
`TimeUnit` (that is how you spelled it below)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]