Skip to content

Commit

Permalink
Add Data Sampling capability URN to Java SDK (apache#25593)
Browse files Browse the repository at this point in the history
* Add Data Sampling capability URN to Java SDK

* trigger tests

* Update runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/Environments.java

---------

Co-authored-by: Sam Rohde <srohde@google.com>
Co-authored-by: Lukasz Cwik <lcwik@google.com>
  • Loading branch information
3 people authored and ruslan-ikhsan committed Mar 10, 2023
1 parent ed2cc6a commit fd6f732
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ public static Set<String> getJavaCapabilities() {
capabilities.add("beam:version:sdk_base:" + JAVA_SDK_HARNESS_CONTAINER_URL);
capabilities.add(BeamUrns.getUrn(SplittableParDoComponents.TRUNCATE_SIZED_RESTRICTION));
capabilities.add(BeamUrns.getUrn(Primitives.TO_STRING));
capabilities.add(BeamUrns.getUrn(StandardProtocols.Enum.DATA_SAMPLING));
return capabilities.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ public void testCapabilities() {
assertThat(
Environments.getJavaCapabilities(),
hasItem(BeamUrns.getUrn(RunnerApi.StandardProtocols.Enum.STATE_CACHING)));
assertThat(
Environments.getJavaCapabilities(),
hasItem(BeamUrns.getUrn(RunnerApi.StandardProtocols.Enum.DATA_SAMPLING)));
// Check that SDF truncation is supported
assertThat(
Environments.getJavaCapabilities(),
Expand Down

0 comments on commit fd6f732

Please sign in to comment.