code: public FileSystemCommand heartbeat(final long workerId,
        final List<Long> persistedFiles, final FileSystemHeartbeatPOptions options)
        throws IOException {
      return retryRPC(() -> mClient.fileSystemHeartbeat(FileSystemHeartbeatPRequest.newBuilder()
          .setWorkerId(workerId).addAllPersistedFiles(persistedFiles).setOptions(options).build())
          .getCommand());
    }
docs: Heartbeats to the master. It also carries command for the worker to persist the given files.
  
  @param workerId the id of the worker that heartbeats
  @param persistedFiles the files which have been persisted since the last heartbeat
  @param options heartbeat options
  @return the command for file system worker