public static MTreeBelowSGMemoryImpl loadFromSnapshot(
      final File snapshotDir,
      final String storageGroupFullPath,
      final MemSchemaRegionStatistics regionStatistics,
      final SchemaRegionMemMetric metric,
      final Consumer<IMeasurementMNode<IMemMNode>> measurementProcess,
      final Consumer<IDeviceMNode<IMemMNode>> deviceProcess,
      final BiConsumer<IDeviceMNode<IMemMNode>, String> tableDeviceProcess,
      final Function<IMeasurementMNode<IMemMNode>, Map<String, String>> tagGetter,
      final Function<IMeasurementMNode<IMemMNode>, Map<String, String>> attributeGetter)
      throws IOException, IllegalPathException {
    return new MTreeBelowSGMemoryImpl(
        PartialPath.getQualifiedDatabasePartialPath(storageGroupFullPath),
        MemMTreeStore.loadFromSnapshot(
            snapshotDir,
            measurementProcess,
            deviceProcess,
            tableDeviceProcess,
            regionStatistics,
            metric),
        tagGetter,
        attributeGetter,
        regionStatistics);
  }
The hierarchical struct of the Metadata Tree is implemented in this class.

<p>Since there are too many interfaces and methods in this class, we use code region to help
manage code. The code region starts with //region and ends with //endregion. When using Intellij
Idea to develop, it's easy to fold the code region and see code region overview by collapsing
all.

<p>The codes are divided into the following code regions:

<ol>
  <li>MTree initialization, clear and serialization
  <li>Timeseries operation, including create and delete
  <li>Entity/Device operation
  <li>Interfaces and Implementation for metadata info Query
  <li>Interfaces and Implementation for MNode Query
  <li>Interfaces and Implementation for Template check
</ol>
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/mem/MTreeBelowSGMemoryImpl.java