arvindram03 commented on code in PR #29882:
URL: https://github.com/apache/beam/pull/29882#discussion_r1446531343
##########
runners/core-java/src/main/java/org/apache/beam/runners/core/metrics/SimpleExecutionState.java:
##########
@@ -149,11 +149,40 @@ public String getLullMessage(Thread trackedThread,
Duration millis) {
return message.toString();
}
+ @VisibleForTesting
+ public String getBundleLullMessage(Thread trackedThread, Duration millis) {
+ // TODO(ajamato): Share getBunldeLullMessage code with
DataflowExecutionState.
+ String userStepName =
+
this.labelsMetadata.getOrDefault(MonitoringInfoConstants.Labels.PTRANSFORM,
null);
+ StringBuilder message = new StringBuilder();
+ message.append("Operation ongoing");
+ if (userStepName != null) {
+ message.append(" in bundle ");
+ }
+ message
+ .append(" for at least ")
+ .append(formatDuration(millis))
+ .append(" without outputting or completing ")
+ .append(getStateName());
+ message.append("\n");
+
+ StackTraceElement[] fullTrace = trackedThread.getStackTrace();
+ for (StackTraceElement e : fullTrace) {
+ message.append(" at ").append(e).append("\n");
+ }
+ return message.toString();
+ }
+
@Override
public void reportLull(Thread trackedThread, long millis) {
LOG.warn(getLullMessage(trackedThread, Duration.millis(millis)));
}
+ @Override
+ public void reportBundleLull(Thread trackedThread, String customLogMessage,
long millis) {
Review Comment:
This would trigger a bigger change because the logging is happening at
DataflowExecutionState which is an implementation of ExecutionState.
--
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]