Class ExpansionService

java.lang.Object
org.apache.beam.model.expansion.v1.ExpansionServiceGrpc.ExpansionServiceImplBase
org.apache.beam.sdk.expansion.service.ExpansionService
All Implemented Interfaces:
AutoCloseable, org.apache.beam.model.expansion.v1.ExpansionServiceGrpc.AsyncService, org.apache.beam.vendor.grpc.v1p69p0.io.grpc.BindableService

public class ExpansionService extends org.apache.beam.model.expansion.v1.ExpansionServiceGrpc.ExpansionServiceImplBase implements AutoCloseable
A service that allows pipeline expand transforms from a remote SDK.
  • Constructor Details

    • ExpansionService

      public ExpansionService()
    • ExpansionService

      public ExpansionService(String[] args)
    • ExpansionService

      public ExpansionService(PipelineOptions opts)
    • ExpansionService

      public ExpansionService(PipelineOptions opts, @Nullable String loopbackAddress)
  • Method Details

    • payloadToConfig

      public static <ConfigT> ConfigT payloadToConfig(org.apache.beam.model.pipeline.v1.ExternalTransforms.ExternalConfigurationPayload payload, Class<ConfigT> configurationClass)
      Attempt to create an instance of ExpansionService from an ExternalTransforms.ExternalConfigurationPayload. If a schema is registered for ExpansionService this method will attempt to ise it. Throws an IllegalArgumentException if the schema in payload is not assignable to the registered schema.

      If no Schema is registered, ExpansionService must have a zero-argument constructor and setters corresponding to each field in the row encoded by payload. Note ExpansionService may have additional setters not represented in the schema.

      Exposed for testing only. No backwards compatibility guarantees.

    • createPipeline

      protected Pipeline createPipeline(PipelineOptions requestOptions)
    • expand

      public void expand(org.apache.beam.model.expansion.v1.ExpansionApi.ExpansionRequest request, org.apache.beam.vendor.grpc.v1p69p0.io.grpc.stub.StreamObserver<org.apache.beam.model.expansion.v1.ExpansionApi.ExpansionResponse> responseObserver)
      Specified by:
      expand in interface org.apache.beam.model.expansion.v1.ExpansionServiceGrpc.AsyncService
    • discoverSchemaTransform

      public void discoverSchemaTransform(org.apache.beam.model.expansion.v1.ExpansionApi.DiscoverSchemaTransformRequest request, org.apache.beam.vendor.grpc.v1p69p0.io.grpc.stub.StreamObserver<org.apache.beam.model.expansion.v1.ExpansionApi.DiscoverSchemaTransformResponse> responseObserver)
      Specified by:
      discoverSchemaTransform in interface org.apache.beam.model.expansion.v1.ExpansionServiceGrpc.AsyncService
    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception
    • main

      public static void main(String[] args) throws Exception
      Throws:
      Exception