arjun4084346 commented on a change in pull request #3439:
URL: https://github.com/apache/gobblin/pull/3439#discussion_r762310579
##########
File path:
gobblin-cluster/src/main/java/org/apache/gobblin/cluster/ClusterEventMetadataGenerator.java
##########
@@ -43,17 +43,21 @@
List<TaskState> taskStates = jobContext.getJobState().getTaskStates();
String taskException =
EventMetadataUtils.getTaskFailureExceptions(taskStates);
String jobException =
EventMetadataUtils.getJobFailureExceptions(jobContext.getJobState());
-
+ Map<String,String> jobMetadata = new HashMap<>();
+ jobMetadata.put(TimingEvent.FlowEventConstants.HIGH_WATERMARK_FIELD,
jobContext.getJobState().getProp(TimingEvent.FlowEventConstants.HIGH_WATERMARK_FIELD,
""));
+ jobMetadata.put(TimingEvent.FlowEventConstants.LOW_WATERMARK_FIELD,
jobContext.getJobState().getProp(TimingEvent.FlowEventConstants.LOW_WATERMARK_FIELD,
""));
switch (eventName) {
case JOB_COMPLETE:
- return ImmutableMap.of(PROCESSED_COUNT_KEY,
Long.toString(EventMetadataUtils.getProcessedCount(taskStates)));
+ jobMetadata.put(PROCESSED_COUNT_KEY,
Long.toString(EventMetadataUtils.getProcessedCount(taskStates)));
Review comment:
You can use ImmutableMap.Builder and keep the returned object Immutable
--
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]