public ITimeSeriesMetadata getTimeSeriesMetadata(IFullPath seriesPath) throws IOException {
    try {
      return pathToTimeSeriesMetadataMap.computeIfAbsent(
          seriesPath,
          k -> {
            if (pathToChunkMetadataListMap.containsKey(k)) {
              try {
                return ResourceByPathUtils.getResourceInstance(seriesPath)
                    .generateTimeSeriesMetadata(
                        pathToReadOnlyMemChunkMap.get(seriesPath),
                        pathToChunkMetadataListMap.get(seriesPath));
              } catch (IOException e) {
                throw new UncheckedIOException(e);
              }
            } else {
              return null;
            }
          });
    } catch (UncheckedIOException e) {
      throw e.getCause();
    }
  }
Get a timeseriesMetadata by path.

@return TimeseriesMetadata or the first ValueTimeseriesMetadata in VectorTimeseriesMetadata
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/TsFileResource.java