Modifier and Type | Class and Description |
---|---|
static class |
ArtifactStagingService.ArtifactDestination
A pairing of a newly created artifact type and an ouptut stream that will be readable at that
type.
|
static interface |
ArtifactStagingService.ArtifactDestinationProvider
Provides a concrete location to which artifacts can be staged on retrieval.
|
Constructor and Description |
---|
ArtifactStagingService(ArtifactStagingService.ArtifactDestinationProvider destinationProvider) |
Modifier and Type | Method and Description |
---|---|
static ArtifactStagingService.ArtifactDestinationProvider |
beamFilesystemArtifactDestinationProvider(java.lang.String root)
An ArtifactDestinationProvider that places new artifacts as files in a Beam filesystem.
|
void |
close()
.
|
java.util.Map<java.lang.String,java.util.List<org.apache.beam.model.pipeline.v1.RunnerApi.ArtifactInformation>> |
getStagedArtifacts(java.lang.String stagingToken)
Returns the rewritten artifacts associated with this job, keyed by environment.
|
static void |
offer(ArtifactRetrievalService retrievalService,
org.apache.beam.model.jobmanagement.v1.ArtifactStagingServiceGrpc.ArtifactStagingServiceStub stagingService,
java.lang.String stagingToken)
Lazily stages artifacts by letting an ArtifactStagingService resolve and request artifacts.
|
void |
registerJob(java.lang.String stagingToken,
java.util.Map<java.lang.String,java.util.List<org.apache.beam.model.pipeline.v1.RunnerApi.ArtifactInformation>> artifacts)
Registers a set of artifacts to be staged with this service.
|
void |
removeStagedArtifacts(java.lang.String stagingToken) |
org.apache.beam.vendor.grpc.v1p26p0.io.grpc.stub.StreamObserver<org.apache.beam.model.jobmanagement.v1.ArtifactApi.ArtifactResponseWrapper> |
reverseArtifactRetrievalService(org.apache.beam.vendor.grpc.v1p26p0.io.grpc.stub.StreamObserver<org.apache.beam.model.jobmanagement.v1.ArtifactApi.ArtifactRequestWrapper> responseObserver) |
bindService
public ArtifactStagingService(ArtifactStagingService.ArtifactDestinationProvider destinationProvider)
public void registerJob(java.lang.String stagingToken, java.util.Map<java.lang.String,java.util.List<org.apache.beam.model.pipeline.v1.RunnerApi.ArtifactInformation>> artifacts)
A client (e.g. a Beam SDK) is expected to connect to this service with the given staging token and offer resolution and retrieval of this set of artifacts.
stagingToken
- a staging token for this jobartifacts
- all artifacts to stage, keyed by environmentpublic java.util.Map<java.lang.String,java.util.List<org.apache.beam.model.pipeline.v1.RunnerApi.ArtifactInformation>> getStagedArtifacts(java.lang.String stagingToken)
This should be called after the client has finished offering artifacts.
stagingToken
- a staging token for this jobpublic void removeStagedArtifacts(java.lang.String stagingToken) throws java.io.IOException
java.io.IOException
public static ArtifactStagingService.ArtifactDestinationProvider beamFilesystemArtifactDestinationProvider(java.lang.String root)
root
- the directory in which to place all artifactspublic org.apache.beam.vendor.grpc.v1p26p0.io.grpc.stub.StreamObserver<org.apache.beam.model.jobmanagement.v1.ArtifactApi.ArtifactResponseWrapper> reverseArtifactRetrievalService(org.apache.beam.vendor.grpc.v1p26p0.io.grpc.stub.StreamObserver<org.apache.beam.model.jobmanagement.v1.ArtifactApi.ArtifactRequestWrapper> responseObserver)
reverseArtifactRetrievalService
in class org.apache.beam.model.jobmanagement.v1.ArtifactStagingServiceGrpc.ArtifactStagingServiceImplBase
public void close() throws java.lang.Exception
FnService
There should be no more calls to any service method by the time a call to FnService.close()
begins. Specifically, this means that a Server
that this service is bound to should have
completed a call to the Server.shutdown()
method, and all future incoming calls will be rejected.
public static void offer(ArtifactRetrievalService retrievalService, org.apache.beam.model.jobmanagement.v1.ArtifactStagingServiceGrpc.ArtifactStagingServiceStub stagingService, java.lang.String stagingToken) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
retrievalService
- an ArtifactRetrievalService used to resolve and retrieve artifactsstagingService
- an ArtifactStagingService stub which will request artifactsstagingToken
- the staging token of the job whose artifacts will be retrievedjava.lang.InterruptedException
java.io.IOException
java.util.concurrent.ExecutionException