public class BeamFileSystemArtifactStagingService extends org.apache.beam.model.jobmanagement.v1.ArtifactStagingServiceGrpc.ArtifactStagingServiceImplBase implements FnService
ArtifactStagingServiceGrpc.ArtifactStagingServiceImplBase based on beam file system. BeamFileSystemArtifactStagingService requires StagingSessionToken in every me call. The
manifest is put in StagingSessionToken#getBasePath()/StagingSessionToken#getSessionId() and artifacts are put in StagingSessionToken#getBasePath()/StagingSessionToken#getSessionId()/ARTIFACTS.
The returned token is the path to the manifest file.
The manifest file is encoded in ArtifactApi.ProxyManifest.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ARTIFACTS |
static java.lang.String |
MANIFEST |
| Constructor and Description |
|---|
BeamFileSystemArtifactStagingService() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
.
|
void |
commitManifest(org.apache.beam.model.jobmanagement.v1.ArtifactApi.CommitManifestRequest request,
org.apache.beam.vendor.grpc.v1.io.grpc.stub.StreamObserver<org.apache.beam.model.jobmanagement.v1.ArtifactApi.CommitManifestResponse> responseObserver) |
static java.lang.String |
generateStagingSessionToken(java.lang.String sessionId,
java.lang.String basePath)
Generate a stagingSessionToken compatible with
BeamFileSystemArtifactStagingService. |
org.apache.beam.vendor.grpc.v1.io.grpc.stub.StreamObserver<org.apache.beam.model.jobmanagement.v1.ArtifactApi.PutArtifactRequest> |
putArtifact(org.apache.beam.vendor.grpc.v1.io.grpc.stub.StreamObserver<org.apache.beam.model.jobmanagement.v1.ArtifactApi.PutArtifactResponse> responseObserver) |
void |
removeArtifacts(java.lang.String stagingSessionToken) |
bindServicepublic static final java.lang.String MANIFEST
public static final java.lang.String ARTIFACTS
public BeamFileSystemArtifactStagingService()
public org.apache.beam.vendor.grpc.v1.io.grpc.stub.StreamObserver<org.apache.beam.model.jobmanagement.v1.ArtifactApi.PutArtifactRequest> putArtifact(org.apache.beam.vendor.grpc.v1.io.grpc.stub.StreamObserver<org.apache.beam.model.jobmanagement.v1.ArtifactApi.PutArtifactResponse> responseObserver)
putArtifact in class org.apache.beam.model.jobmanagement.v1.ArtifactStagingServiceGrpc.ArtifactStagingServiceImplBasepublic void commitManifest(org.apache.beam.model.jobmanagement.v1.ArtifactApi.CommitManifestRequest request,
org.apache.beam.vendor.grpc.v1.io.grpc.stub.StreamObserver<org.apache.beam.model.jobmanagement.v1.ArtifactApi.CommitManifestResponse> responseObserver)
commitManifest in class org.apache.beam.model.jobmanagement.v1.ArtifactStagingServiceGrpc.ArtifactStagingServiceImplBasepublic void close()
throws java.lang.Exception
FnServiceThere 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 java.lang.String generateStagingSessionToken(java.lang.String sessionId,
java.lang.String basePath)
throws java.lang.Exception
BeamFileSystemArtifactStagingService.sessionId - Unique sessionId for artifact staging.basePath - Base path to upload artifacts.java.lang.Exceptionpublic void removeArtifacts(java.lang.String stagingSessionToken)
throws java.lang.Exception
java.lang.Exception