code: public MetaCommand heartbeat(final long masterId) throws IOException {
      return retryRPC(() -> mClient
          .masterHeartbeat(MasterHeartbeatPRequest.newBuilder().setMasterId(masterId).build())
          .getCommand());
    }
docs: Sends a heartbeat to the leader master. Standby masters periodically execute this method
  so that the leader master knows they are still running.
  
  @param masterId the master id
  @return whether this master should re-register