private void active() throws StartupException {
    try {
      processPid();
      setUp();
    } catch (StartupException e) {
      logger.error("Meet error while starting up.", e);
      throw new StartupException("Error in activating IoTDB DataNode.");
    }
    logger.info("IoTDB DataNode has started.");

    try {
      long startTime = System.currentTimeMillis();
      SchemaRegionConsensusImpl.getInstance().start();
      long schemaRegionEndTime = System.currentTimeMillis();
      logger.info(
          "SchemaRegion consensus start successfully, which takes {} ms.",
          (schemaRegionEndTime - startTime));
      schemaRegionConsensusStarted = true;
      if (!isUsingPipeConsensus()) {
        DataRegionConsensusImpl.getInstance().start();
        long dataRegionEndTime = System.currentTimeMillis();
        logger.info(
            "DataRegion consensus start successfully, which takes {} ms.",
            (dataRegionEndTime - schemaRegionEndTime));
        dataRegionConsensusStarted = true;
      }
    } catch (IOException e) {
      throw new StartupException(e);
    }
  }
Register services and set up DataNode.

@throws StartupException if start up failed.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNode.java