public class RemoteSlotManager extends Object implements SlotManager
MasterSlotManager
.
Communication between the job agents is made on the remote control
port on the master job agent. Make sure that the master slot manager
allows connections from this host by including it's ip address in the
'agent.remotecontrol' setting.
Configuration options for this slot manager:
Modifier and Type | Class and Description |
---|---|
(package private) static class |
RemoteSlotManager.RemoteSlotPinger
Task that is scheduled at regular intervals to send ping commands
to the remote host.
|
Modifier and Type | Field and Description |
---|---|
private Agent |
agent |
private int |
connectTimeout |
private static org.slf4j.Logger |
log |
private TimerTask |
pingerTask |
private String |
remoteHost |
private int |
remotePort |
private Map<String,Slot> |
remoteSlots |
Constructor and Description |
---|
RemoteSlotManager() |
Modifier and Type | Method and Description |
---|---|
void |
close()
This method is called when the job agent is shutting down.
|
Slot |
getSlot(Job job)
Get a slot for the specified job.
|
void |
init(Agent agent)
Initialize the slot manager.
|
(package private) void |
pingRemoteSlots()
Ping the the remote host with all active slots.
|
void |
releaseSlot(Slot slot)
Called by the job agent when the job has finished exeuting.
|
private static final org.slf4j.Logger log
private Agent agent
private String remoteHost
private int remotePort
private int connectTimeout
private TimerTask pingerTask
public void init(Agent agent)
SlotManager
init
in interface SlotManager
agent
- The job agentpublic void close()
SlotManager
close
in interface SlotManager
public Slot getSlot(Job job)
SlotManager
getSlot
in interface SlotManager
job
- The job that the job agent wants to executepublic void releaseSlot(Slot slot)
SlotManager
releaseSlot
in interface SlotManager
slot
- The slot that was assigned to the jobvoid pingRemoteSlots()