public int getRegionId(long memtableId) {
    final MemTableInfo info = memTableId2Info.get(memtableId);
    if (info == null) {
      if (memtableId != Long.MIN_VALUE && memtableId != TsFileProcessor.MEMTABLE_NOT_EXIST) {
        logger.warn("memtableId {} not found in MemTableId2Info", memtableId);
      }
      return -1;
    }
    return Integer.parseInt(info.getMemTable().getDataRegionId());
  }
Get total cost of active memTables.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/checkpoint/CheckpointManager.java