chamikaramj commented on a change in pull request #11911:
URL: https://github.com/apache/beam/pull/11911#discussion_r445156490
##########
File path:
sdks/java/harness/src/test/java/org/apache/beam/fn/harness/control/ProcessBundleHandlerTest.java
##########
@@ -260,6 +260,46 @@ BundleProcessor get(
}
}
+ @Test
+ public void testTrySplitBeforeBundleDoesNotFail() {
+ ProcessBundleHandler handler =
+ new ProcessBundleHandler(
+ PipelineOptionsFactory.create(),
+ null,
+ beamFnDataClient,
+ null /* beamFnStateClient */,
+ null /* finalizeBundleHandler */,
+ ImmutableMap.of(),
+ new BundleProcessorCache());
+
+ handler.trySplit(
Review comment:
Done.
##########
File path:
sdks/java/harness/src/test/java/org/apache/beam/fn/harness/control/ProcessBundleHandlerTest.java
##########
@@ -260,6 +260,46 @@ BundleProcessor get(
}
}
+ @Test
+ public void testTrySplitBeforeBundleDoesNotFail() {
+ ProcessBundleHandler handler =
+ new ProcessBundleHandler(
+ PipelineOptionsFactory.create(),
+ null,
+ beamFnDataClient,
+ null /* beamFnStateClient */,
+ null /* finalizeBundleHandler */,
+ ImmutableMap.of(),
+ new BundleProcessorCache());
+
+ handler.trySplit(
+ BeamFnApi.InstructionRequest.newBuilder()
+ .setInstructionId("999L")
+ .setProcessBundleSplit(
+
BeamFnApi.ProcessBundleSplitRequest.newBuilder().setInstructionId("unknown-id"))
+ .build());
+ }
+
+ @Test
+ public void testProgressBeforeBundleDoesNotFail() throws Exception {
+ ProcessBundleHandler handler =
+ new ProcessBundleHandler(
+ PipelineOptionsFactory.create(),
+ null,
+ beamFnDataClient,
+ null /* beamFnStateClient */,
+ null /* finalizeBundleHandler */,
+ ImmutableMap.of(),
+ new BundleProcessorCache());
+
+ handler.progress(
Review comment:
Done.
##########
File path:
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/control/ProcessBundleHandler.java
##########
@@ -341,53 +341,52 @@ private void
createRunnerAndConsumersForPTransformRecursively(
throws Exception {
BundleProcessor bundleProcessor =
bundleProcessorCache.find(request.getProcessBundleProgress().getInstructionId());
- if (bundleProcessor == null) {
Review comment:
Done.
----------------------------------------------------------------
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]