Class ExpansionService

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.apache.beam.model.expansion.v1.ExpansionServiceGrpc.AsyncService, org.apache.beam.vendor.grpc.v1p60p1.io.grpc.BindableService

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

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      protected org.apache.beam.sdk.Pipeline createPipeline​(org.apache.beam.sdk.options.PipelineOptions requestOptions)  
      void discoverSchemaTransform​(org.apache.beam.model.expansion.v1.ExpansionApi.DiscoverSchemaTransformRequest request, org.apache.beam.vendor.grpc.v1p60p1.io.grpc.stub.StreamObserver<org.apache.beam.model.expansion.v1.ExpansionApi.DiscoverSchemaTransformResponse> responseObserver)  
      void expand​(org.apache.beam.model.expansion.v1.ExpansionApi.ExpansionRequest request, org.apache.beam.vendor.grpc.v1p60p1.io.grpc.stub.StreamObserver<org.apache.beam.model.expansion.v1.ExpansionApi.ExpansionResponse> responseObserver)  
      static void main​(java.lang.String[] args)  
      static <ConfigT> ConfigT payloadToConfig​(org.apache.beam.model.pipeline.v1.ExternalTransforms.ExternalConfigurationPayload payload, java.lang.Class<ConfigT> configurationClass)
      Attempt to create an instance of ExpansionService from an ExternalTransforms.ExternalConfigurationPayload.
      • Methods inherited from class org.apache.beam.model.expansion.v1.ExpansionServiceGrpc.ExpansionServiceImplBase

        bindService
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ExpansionService

        public ExpansionService()
      • ExpansionService

        public ExpansionService​(java.lang.String[] args)
      • ExpansionService

        public ExpansionService​(org.apache.beam.sdk.options.PipelineOptions opts)
      • ExpansionService

        public ExpansionService​(org.apache.beam.sdk.options.PipelineOptions opts,
                                @Nullable java.lang.String loopbackAddress)
    • Method Detail

      • payloadToConfig

        public static <ConfigT> ConfigT payloadToConfig​(org.apache.beam.model.pipeline.v1.ExternalTransforms.ExternalConfigurationPayload payload,
                                                        java.lang.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 org.apache.beam.sdk.Pipeline createPipeline​(org.apache.beam.sdk.options.PipelineOptions requestOptions)
      • expand

        public void expand​(org.apache.beam.model.expansion.v1.ExpansionApi.ExpansionRequest request,
                           org.apache.beam.vendor.grpc.v1p60p1.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.v1p60p1.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 java.lang.Exception
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.lang.Exception
      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception