private void removeDir(File regionDir) {
    if (regionDir.exists()) {
      FileUtils.deleteDirectoryAndEmptyParent(regionDir);
      logger.info("delete {} succeed.", regionDir.getAbsolutePath());
    } else {
      logger.info("delete {} failed, because it does not exist.", regionDir.getAbsolutePath());
    }
  }
Register this DataNode into cluster.

@param isPreCheck do pre-check before formal registration
@throws StartupException if register failed.
@throws IOException if serialize cluster name and datanode id failed.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNode.java