boyuanzz commented on a change in pull request #13893:
URL: https://github.com/apache/beam/pull/13893#discussion_r572298177
##########
File path:
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/control/ProcessBundleHandler.java
##########
@@ -705,6 +718,17 @@ void reset() throws Exception {
resetFunction.run();
}
}
+
+ void shutdown() {
+ for (ThrowingRunnable tearDownFunction : getTearDownFunctions()) {
+ LOG.debug("Tearing down function {}", tearDownFunction);
+ try {
+ tearDownFunction.run();
+ } catch (Exception e) {
+ LOG.error("Failed to call teardown function: {}", e);
Review comment:
> For example some runners may choose to execute some steps directly
even if they support portability.
I don't think that's the case. Would you like to share some examples in your
mind?
##########
File path:
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/control/ProcessBundleHandler.java
##########
@@ -705,6 +718,17 @@ void reset() throws Exception {
resetFunction.run();
}
}
+
+ void shutdown() {
+ for (ThrowingRunnable tearDownFunction : getTearDownFunctions()) {
+ LOG.debug("Tearing down function {}", tearDownFunction);
+ try {
+ tearDownFunction.run();
+ } catch (Exception e) {
+ LOG.error("Failed to call teardown function: {}", e);
Review comment:
> For example some runners may choose to execute some steps directly
even if they support portability.
I don't think that's the case. Would you like to share some examples in your
mind?
----------------------------------------------------------------
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:
[email protected]