Class GRpcAgentFileStreamServiceImpl
java.lang.Object
com.netflix.genie.agent.execution.services.impl.grpc.GRpcAgentFileStreamServiceImpl
- All Implemented Interfaces:
AgentFileStreamService
Implementation of
AgentFileStreamService
over 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
Modifier and TypeMethodDescriptionRequest 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.void
Start the service.void
stop()
Stop the service.
-
Method Details
-
start
Start the service.- Specified by:
start
in interfaceAgentFileStreamService
- Parameters:
claimedJobId
- the claimed job idjobDirectoryRoot
- the job directory
-
stop
public void stop()Stop the service.- Specified by:
stop
in interfaceAgentFileStreamService
-
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:
forceServerSync
in 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).
-