Class GRpcAgentJobKillServiceImpl
- java.lang.Object
-
- com.netflix.genie.agent.execution.services.impl.grpc.GRpcAgentJobKillServiceImpl
-
- All Implemented Interfaces:
AgentJobKillService
public class GRpcAgentJobKillServiceImpl extends java.lang.Object implements AgentJobKillService
Implementation of theAgentJobKillService
, listens for kill coming from server using long-polling.Note: this implementation still suffers from a serious flaw: because it is implemented with a unary call, the server will never realize the client is gone if the connection is broken. This can lead to an accumulation of parked calls on the server. A new protocol (based on a bidirectional stream) is necessary to solve this problem.
- Since:
- 4.0.0
-
-
Constructor Summary
Constructors Constructor Description GRpcAgentJobKillServiceImpl(com.netflix.genie.proto.JobKillServiceGrpc.JobKillServiceFutureStub client, KillService killService, org.springframework.scheduling.TaskScheduler taskScheduler, JobKillServiceProperties properties)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
start(@NotBlank(message="Job id cannot be blank") java.lang.String jobId)
Start listening for job termination notification.void
stop()
Stop the service.
-
-
-
Constructor Detail
-
GRpcAgentJobKillServiceImpl
public GRpcAgentJobKillServiceImpl(com.netflix.genie.proto.JobKillServiceGrpc.JobKillServiceFutureStub client, KillService killService, org.springframework.scheduling.TaskScheduler taskScheduler, JobKillServiceProperties properties)
Constructor.- Parameters:
client
- The gRPC client to use to call the serverkillService
- KillService for killing the agenttaskScheduler
- A task schedulerproperties
- The service properties
-
-
Method Detail
-
start
public void start(@NotBlank(message="Job id cannot be blank") @NotBlank(message="Job id cannot be blank") java.lang.String jobId)
Start listening for job termination notification.- Specified by:
start
in interfaceAgentJobKillService
- Parameters:
jobId
- job id
-
stop
public void stop()
Stop the service.- Specified by:
stop
in interfaceAgentJobKillService
-
-