Search in sources :

Example 1 with WorkerHeartbeat

use of com.alibaba.jstorm.daemon.worker.WorkerHeartbeat in project jstorm by alibaba.

the class WorkerHeartbeatRunable method doHeartbeat.

/**
 * do heartbeat and update LocalState
 */
public void doHeartbeat() throws IOException {
    int curTime = TimeUtils.current_time_secs();
    WorkerHeartbeat hb = new WorkerHeartbeat(curTime, topologyId, taskIds, port);
    LOG.debug("Doing heartbeat:" + workerId + ",port:" + port + ",hb" + hb.toString());
    LocalState state = getWorkerState();
    state.put(Common.LS_WORKER_HEARTBEAT, hb);
}
Also used : WorkerHeartbeat(com.alibaba.jstorm.daemon.worker.WorkerHeartbeat) LocalState(backtype.storm.utils.LocalState)

Aggregations

LocalState (backtype.storm.utils.LocalState)1 WorkerHeartbeat (com.alibaba.jstorm.daemon.worker.WorkerHeartbeat)1