code: 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);
      }
docs: do heartbeat and update LocalState