Class GRpcAgentFileStreamServiceImpl
- java.lang.Object
-
- com.netflix.genie.agent.execution.services.impl.grpc.GRpcAgentFileStreamServiceImpl
-
- All Implemented Interfaces:
AgentFileStreamService
public class GRpcAgentFileStreamServiceImpl extends java.lang.Object implements AgentFileStreamService
Implementation ofAgentFileStreamServiceover gRPC. Sets up a persistent 2-way stream ('sync') to push manifest updates and receive file requests. When a file request is received, a creates a new 2 way stream ('transmit') and pushes file chunks, waits for ACK, sends the next chunk, ... until the file range requested is transmitted. Then the stream is shut down.- Since:
- 4.0.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<java.util.concurrent.ScheduledFuture<?>>forceServerSync()Request the service perform an update outside of the regular schedule to make sure the server has the most up-to-date view of local files.voidstart(java.lang.String claimedJobId, java.nio.file.Path jobDirectoryRoot)Start the service.voidstop()Stop the service.
-
-
-
Method Detail
-
start
public void start(java.lang.String claimedJobId, java.nio.file.Path jobDirectoryRoot)Start the service.- Specified by:
startin interfaceAgentFileStreamService- Parameters:
claimedJobId- the claimed job idjobDirectoryRoot- the job directory
-
stop
public void stop()
Stop the service.- Specified by:
stopin interfaceAgentFileStreamService
-
forceServerSync
public java.util.Optional<java.util.concurrent.ScheduledFuture<?>> forceServerSync()
Request the service perform an update outside of the regular schedule to make sure the server has the most up-to-date view of local files.- Specified by:
forceServerSyncin interfaceAgentFileStreamService- Returns:
- a scheduled future optional, which the caller can use to synchronously wait on the operation completion and outcome. The optional is empty if the task was not scheduled (because the service is not running).
-
-