public int fillLastQueryMap(
      final PartialPath prefixPath,
      final Map<TableId, Map<IDeviceID, Map<String, Pair<TSDataType, TimeValuePair>>>> mapToFill)
      throws MetadataException {
    final int[] sensorNum = {0};
    try (final EntityUpdater<IMemMNode> updater =
        new EntityUpdater<IMemMNode>(
            rootNode, prefixPath, store, true, SchemaConstant.ALL_MATCH_SCOPE) {

          @Override
          protected void updateEntity(final IDeviceMNode<IMemMNode> node) {
            final Map<String, Pair<TSDataType, TimeValuePair>> measurementMap = new HashMap<>();
            for (final IMemMNode child : node.getChildren().values()) {
              if (child instanceof IMeasurementMNode) {
                measurementMap.put(
                    child.getName(),
                    new Pair<>(((IMeasurementMNode<?>) child).getDataType(), null));
              }
            }
            final IDeviceID deviceID = node.getPartialPath().getIDeviceID();
            mapToFill
                .computeIfAbsent(new TableId(null, deviceID.getTableName()), o -> new HashMap<>())
                .put(deviceID, measurementMap);
            sensorNum[0] += measurementMap.size();
          }
        }) {
      updater.update();
    }
    return sensorNum[0];
  }
Get node by the path

@return last node in given seriesPath
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/mem/MTreeBelowSGMemoryImpl.java