Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1299,6 +1299,17 @@ public DataflowPipelineJob run(Pipeline pipeline) {
if (shouldActAsStreaming(pipeline)) {
options.setStreaming(true);

{
List<String> experiments =
options.getExperiments() == null
? new ArrayList<>()
: new ArrayList<>(options.getExperiments());
// Experiment marking that the harness supports tag encoding v2
// Backend will enable tag encoding v2 only if the harness supports it.
experiments.add("streaming_engine_state_tag_encoding_v2_supported");
options.setExperiments(ImmutableList.copyOf(experiments));
}

if (useUnifiedWorker(options)) {
options.setEnableStreamingEngine(true);
List<String> experiments =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasEntry;
import static org.hamcrest.Matchers.hasItem;
import static org.hamcrest.Matchers.hasItems;
import static org.hamcrest.Matchers.hasKey;
import static org.hamcrest.Matchers.hasProperty;
import static org.hamcrest.Matchers.instanceOf;
Expand Down Expand Up @@ -1791,7 +1792,7 @@ public void testSettingAnyFnApiExperimentEnablesUnifiedWorker() throws Exception
assertFalse(options.isEnableStreamingEngine());
assertThat(
options.getExperiments(),
containsInAnyOrder(
hasItems(
"beam_fn_api", "use_runner_v2", "use_unified_worker", "use_portable_job_submission"));
}

Expand All @@ -1807,7 +1808,7 @@ public void testSettingAnyFnApiExperimentEnablesUnifiedWorker() throws Exception
assertTrue(options.isEnableStreamingEngine());
assertThat(
options.getExperiments(),
containsInAnyOrder(
hasItems(
"beam_fn_api",
"use_runner_v2",
"use_unified_worker",
Expand Down
Loading