public void init() {
    schemaEngine
        .getAllSchemaRegions()
        .forEach(
            schemaRegion ->
                schemaRegionLockMap.put(
                    schemaRegion.getSchemaRegionId(), new ReentrantReadWriteLock(false)));

    storageEngine
        .getAllDataRegionIds()
        .forEach(
            dataRegionId -> dataRegionLockMap.put(dataRegionId, new ReentrantReadWriteLock(false)));
  }
This class takes the responsibility of managing regions, executing PlanNode of write type on
according regions and controlling the execution concurrency.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/DataNodeRegionManager.java