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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA registrar that createsTransformProviderinstances fromRunnerApi.FunctionSpecs.static classExposes Java transforms viaExternalTransformRegistrar. -
Constructor Summary
ConstructorsConstructorDescriptionExpansionService(String[] args) ExpansionService(PipelineOptions opts, @Nullable String loopbackAddress) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected PipelinecreatePipeline(PipelineOptions requestOptions) voiddiscoverSchemaTransform(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) voidexpand(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) static voidstatic <ConfigT> ConfigTpayloadToConfig(org.apache.beam.model.pipeline.v1.ExternalTransforms.ExternalConfigurationPayload payload, Class<ConfigT> configurationClass) Attempt to create an instance ofExpansionServicefrom anExternalTransforms.ExternalConfigurationPayload.Methods inherited from class org.apache.beam.model.expansion.v1.ExpansionServiceGrpc.ExpansionServiceImplBase
bindService
-
Constructor Details
-
ExpansionService
public ExpansionService() -
ExpansionService
-
ExpansionService
-
ExpansionService
-
-
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 ofExpansionServicefrom anExternalTransforms.ExternalConfigurationPayload. If a schema is registered forExpansionServicethis method will attempt to ise it. Throws anIllegalArgumentExceptionif the schema inpayloadis notassignable tothe registered schema.If no Schema is registered,
ExpansionServicemust have a zero-argument constructor and setters corresponding to each field in the row encoded bypayload. NoteExpansionServicemay have additional setters not represented in the schema.Exposed for testing only. No backwards compatibility guarantees.
-
createPipeline
-
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:
expandin interfaceorg.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:
discoverSchemaTransformin interfaceorg.apache.beam.model.expansion.v1.ExpansionServiceGrpc.AsyncService
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
main
- Throws:
Exception
-