kennknowles commented on code in PR #38430:
URL: https://github.com/apache/beam/pull/38430#discussion_r3305987079
##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/StreamingModeExecutionContext.java:
##########
@@ -270,6 +277,17 @@ public void start(
}
}
+ public void finishKey() {
+ checkState(!finishKeyCalled, "finishKey was already called");
+ checkNotNull(workExecutor, "workExecutor must be set before calling
finishKey()");
Review Comment:
use `checkStateNotNull` from `sdk.util.Preconditions`
##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/util/common/worker/ParDoOperation.java:
##########
@@ -46,12 +46,17 @@ public void process(Object elem) throws Exception {
}
@Override
- public void finish() throws Exception {
+ // Batch mode does not use this method and instead relies on
BatchModeUngroupingParDoFn
Review Comment:
nit: put the comment outside the `@Override` so the annotation is next to
the method. Also, it isn't super obvious to me why someone reading this method
is going to want the information in the comment. It does seem like useful
information, but I wonder where someone needs to know it?
--
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]