congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
WindowingStrategyTranslation.toMessageProto
Code IndexAdd Tabnine to your IDE (free)

How to use
toMessageProto
method
in
org.apache.beam.runners.core.construction.WindowingStrategyTranslation

Best Java code snippets using org.apache.beam.runners.core.construction.WindowingStrategyTranslation.toMessageProto (Showing top 2 results out of 315)

origin: org.apache.beam/beam-runners-google-cloud-dataflow-java

private static byte[] serializeWindowingStrategy(WindowingStrategy<?, ?> windowingStrategy) {
 try {
  SdkComponents sdkComponents = SdkComponents.create();
  sdkComponents.registerEnvironment(Environments.JAVA_SDK_HARNESS_ENVIRONMENT);
  return WindowingStrategyTranslation.toMessageProto(windowingStrategy, sdkComponents)
    .toByteArray();
 } catch (Exception e) {
  throw new RuntimeException(
    String.format("Unable to format windowing strategy %s as bytes", windowingStrategy), e);
 }
}
origin: org.apache.beam/beam-runners-core-construction-java

@Test
public void testToProtoAndBack() throws Exception {
 WindowingStrategy<?, ?> windowingStrategy = toProtoAndBackSpec.getWindowingStrategy();
 SdkComponents components = SdkComponents.create();
 components.registerEnvironment(Environments.createDockerEnvironment("java"));
 WindowingStrategy<?, ?> toProtoAndBackWindowingStrategy =
   WindowingStrategyTranslation.fromProto(
     WindowingStrategyTranslation.toMessageProto(windowingStrategy, components));
 assertThat(
   toProtoAndBackWindowingStrategy,
   equalTo((WindowingStrategy) windowingStrategy.fixDefaults()));
}
org.apache.beam.runners.core.constructionWindowingStrategyTranslationtoMessageProto

Javadoc

Converts a WindowingStrategy into a RunnerApi.MessageWithComponents where RunnerApi.MessageWithComponents#getWindowingStrategy() ()} is a RunnerApi.WindowingStrategy for the input WindowingStrategy.

Popular methods of WindowingStrategyTranslation

  • fromProto
    Converts from RunnerApi.WindowingStrategy to the SDK's WindowingStrategy using the provided componen
  • windowFnFromProto
  • toProto
    Converts a WindowingStrategy into a RunnerApi.WindowingStrategy, registering any components in the p
  • timestampCombinerFromProto

Popular in Java

  • Start an intent from android
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • scheduleAtFixedRate (ScheduledExecutorService)
  • findViewById (Activity)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Path (java.nio.file)
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now