public class HeartBeatHandler extends Object
Constructor and Description |
---|
HeartBeatHandler(Clusters fsm,
ActionQueue aq,
ActionManager am,
com.google.inject.Injector injector) |
Modifier and Type | Method and Description |
---|---|
protected HeartBeatResponse |
createRegisterCommand() |
protected HeartBeatResponse |
createRestartCommand(Long currentResponseId) |
String |
getOsType(String os,
String osRelease) |
HeartBeatResponse |
handleHeartBeat(HeartBeat heartbeat) |
RegistrationResponse |
handleRegistration(Register register) |
protected void |
processCommandReports(HeartBeat heartbeat,
String hostname,
Clusters clusterFsm,
long now) |
protected void |
processHostStatus(HeartBeat heartbeat,
String hostname) |
protected void |
processStatusReports(HeartBeat heartbeat,
String hostname,
Clusters clusterFsm) |
protected void |
sendCommands(String hostname,
HeartBeatResponse response)
Adds commands from action queue to a heartbeat responce
|
void |
start() |
@Inject public HeartBeatHandler(Clusters fsm, ActionQueue aq, ActionManager am, com.google.inject.Injector injector)
public void start()
public HeartBeatResponse handleHeartBeat(HeartBeat heartbeat) throws AmbariException
AmbariException
protected void processHostStatus(HeartBeat heartbeat, String hostname) throws AmbariException
AmbariException
protected void processCommandReports(HeartBeat heartbeat, String hostname, Clusters clusterFsm, long now) throws AmbariException
AmbariException
protected void processStatusReports(HeartBeat heartbeat, String hostname, Clusters clusterFsm) throws AmbariException
AmbariException
protected void sendCommands(String hostname, HeartBeatResponse response) throws AmbariException
AmbariException
protected HeartBeatResponse createRegisterCommand()
protected HeartBeatResponse createRestartCommand(Long currentResponseId)
public RegistrationResponse handleRegistration(Register register) throws InvalidStateTransitionException, AmbariException
Copyright © 2016. All rights reserved.