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 interface
A registrar that createsTransformProvider
instances fromRunnerApi.FunctionSpec
s.static class
Exposes Java transforms viaExternalTransformRegistrar
. -
Constructor Summary
ConstructorsConstructorDescriptionExpansionService
(String[] args) ExpansionService
(PipelineOptions opts, @Nullable String loopbackAddress) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected Pipeline
createPipeline
(PipelineOptions requestOptions) 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) 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) static void
static <ConfigT> ConfigT
payloadToConfig
(org.apache.beam.model.pipeline.v1.ExternalTransforms.ExternalConfigurationPayload payload, Class<ConfigT> configurationClass) Attempt to create an instance ofExpansionService
from 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 ofExpansionService
from anExternalTransforms.ExternalConfigurationPayload
. If a schema is registered forExpansionService
this method will attempt to ise it. Throws anIllegalArgumentException
if the schema inpayload
is notassignable 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 bypayload
. NoteExpansionService
may 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:
expand
in 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:
discoverSchemaTransform
in interfaceorg.apache.beam.model.expansion.v1.ExpansionServiceGrpc.AsyncService
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
main
- Throws:
Exception
-