[ https://issues.apache.org/jira/browse/GOBBLIN-1127?focusedWorklogId=427407&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-427407 ]
ASF GitHub Bot logged work on GOBBLIN-1127: ------------------------------------------- Author: ASF GitHub Bot Created on: 26/Apr/20 22:50 Start Date: 26/Apr/20 22:50 Worklog Time Spent: 10m Work Description: autumnust commented on a change in pull request #2967: URL: https://github.com/apache/incubator-gobblin/pull/2967#discussion_r415419227 ########## File path: gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinTaskRunner.java ########## @@ -309,9 +322,22 @@ public void start() { // Start metric reporting if (this.containerMetrics.isPresent()) { - this.containerMetrics.get() - .startMetricReportingWithFileSuffix(ConfigUtils.configToState(this.clusterConfig), - this.taskRunnerId); + try { + this.containerMetrics.get() + .startMetricReportingWithFileSuffix(ConfigUtils.configToState(this.clusterConfig), this.taskRunnerId); + } catch (MetricReporterException e) { + logger.error("Failed to start {} metric reporter", e.getType().name(), e); + if (this.isMetricReportingFailureFatal) { + logger.error("Failing TaskRunner since metric reporting failure is FATAL."); + Throwables.propagate(e); Review comment: Shall we avoid logging + throwing exception if failure is fatal? This might make the stack trace hard to read. ########## File path: gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/MRCompactor.java ########## @@ -364,7 +366,13 @@ private GobblinMetrics initializeMetrics() { tags.addAll(Tag.fromMap(ClusterNameTags.getClusterNameTags())); GobblinMetrics gobblinMetrics = GobblinMetrics.get(this.state.getProp(ConfigurationKeys.JOB_NAME_KEY), null, tags.build()); - gobblinMetrics.startMetricReporting(this.state.getProperties()); + try { Review comment: Just FYI, this file is deprecated and not being used anywhere internally AFAIK. ########## File path: gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinTaskRunner.java ########## @@ -309,9 +322,22 @@ public void start() { // Start metric reporting if (this.containerMetrics.isPresent()) { Review comment: Can this be packaged into a method like `initMetricReporter` ? And `isMetricReportingFailureFatal `, `isEventReportingFailureFatal ` are all local variables that only relevant to this part. We just need to pass `clusterConfig` to init method. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 427407) Time Spent: 20m (was: 10m) > Provide an option to make metric reporting instantiation failures fatal > ----------------------------------------------------------------------- > > Key: GOBBLIN-1127 > URL: https://issues.apache.org/jira/browse/GOBBLIN-1127 > Project: Apache Gobblin > Issue Type: Improvement > Components: gobblin-cluster > Affects Versions: 0.15.0 > Reporter: Sudarshan Vasudevan > Assignee: Hung Tran > Priority: Major > Fix For: 0.15.0 > > Time Spent: 20m > Remaining Estimate: 0h > > This option allows GobblinTaskRunner to "fail-fast" on metric reporting > instantiation failures. This is particularly sseful in scenarios where > pipeline monitoring depends on metrics and tracking events being emitted. -- This message was sent by Atlassian Jira (v8.3.4#803005)