You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/01/17 20:45:41 UTC
[GitHub] [beam] lukecwik commented on a change in pull request #16537: [BEAM-13015] Calculate exception for closing BeamFnDataInboundObserver2 statically
lukecwik commented on a change in pull request #16537:
URL: https://github.com/apache/beam/pull/16537#discussion_r786281423
##########
File path: sdks/java/fn-execution/src/main/java/org/apache/beam/sdk/fn/data/BeamFnDataInboundObserver2.java
##########
@@ -62,6 +62,9 @@ public static BeamFnDataInboundObserver2 forConsumers(
private final Map<String, Map<String, EndpointStatus<TimerEndpoint<?>>>>
transformIdToTimerFamilyIdToTimerEndpoint;
private final CancellableQueue<BeamFnApi.Elements> queue;
+ // Share an exception used for close as constructing exception stack traces is expensive.
+ private static final Exception closeException =
Review comment:
This will confuse people if we keep the original stack trace since it will be bound to the construction of this instance.
We'll want to create an exception type or find an a suitable alternative that passes false for `writeableStackTrace`:
https://docs.oracle.com/javase/7/docs/api/java/lang/RuntimeException.html#RuntimeException(java.lang.String,%20java.lang.Throwable,%20boolean,%20boolean)
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org