public boolean loadAll(
      String uuid,
      boolean isGeneratedByPipe,
      Map<TTimePartitionSlot, ProgressIndex> timePartitionProgressIndexMap)
      throws IOException, LoadFileException {
    if (!uuid2WriterManager.containsKey(uuid)) {
      return false;
    }

    final Optional<CleanupTask> cleanupTask = Optional.of(uuid2CleanupTask.get(uuid));
    cleanupTask.ifPresent(CleanupTask::markLoadTaskRunning);
    try {
      uuid2WriterManager.get(uuid).loadAll(isGeneratedByPipe, timePartitionProgressIndexMap);
    } finally {
      cleanupTask.ifPresent(CleanupTask::markLoadTaskNotRunning);
    }

    clean(uuid);
    return true;
  }
{@link LoadTsFileManager} is used for dealing with {@link LoadTsFilePieceNode} and {@link
LoadCommand}. This class turn the content of a piece of loading TsFile into a new TsFile. When
DataNode finish transfer pieces, this class will flush all TsFile and load them into IoTDB, or
delete all.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/LoadTsFileManager.java