Class MetadataQuerierByFileImpl
- java.lang.Object
-
- org.apache.iotdb.tsfile.read.controller.MetadataQuerierByFileImpl
-
- All Implemented Interfaces:
IMetadataQuerier
public class MetadataQuerierByFileImpl extends java.lang.Object implements IMetadataQuerier
-
-
Constructor Summary
Constructors Constructor Description MetadataQuerierByFileImpl(TsFileSequenceReader tsFileReader)Constructor of MetadataQuerierByFileImpl.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TsFileSequenceReader.LocateStatuscheckLocateStatus(IChunkMetadata chunkMetaData, long spacePartitionStartPos, long spacePartitionEndPos)Check the location of a given chunkGroupMetaData with respect to a space partition constraint.voidclear()clear caches (if used) to release memory.java.util.List<TimeRange>convertSpace2TimePartition(java.util.List<Path> paths, long spacePartitionStartPos, long spacePartitionEndPos)Convert the space partition constraint to the time partition constraint.java.util.List<IChunkMetadata>getChunkMetaDataList(Path timeseriesPath)java.util.Map<Path,java.util.List<IChunkMetadata>>getChunkMetaDataMap(java.util.List<Path> paths)TSDataTypegetDataType(Path path)TsFileMetadatagetWholeFileMetadata()voidloadChunkMetaDatas(java.util.List<Path> paths)this will load all chunk metadata of given paths into cache.
-
-
-
Constructor Detail
-
MetadataQuerierByFileImpl
public MetadataQuerierByFileImpl(TsFileSequenceReader tsFileReader) throws java.io.IOException
Constructor of MetadataQuerierByFileImpl.- Throws:
java.io.IOException
-
-
Method Detail
-
getChunkMetaDataList
public java.util.List<IChunkMetadata> getChunkMetaDataList(Path timeseriesPath) throws java.io.IOException
- Specified by:
getChunkMetaDataListin interfaceIMetadataQuerier- Throws:
java.io.IOException
-
getChunkMetaDataMap
public java.util.Map<Path,java.util.List<IChunkMetadata>> getChunkMetaDataMap(java.util.List<Path> paths) throws java.io.IOException
- Specified by:
getChunkMetaDataMapin interfaceIMetadataQuerier- Throws:
java.io.IOException
-
getWholeFileMetadata
public TsFileMetadata getWholeFileMetadata()
- Specified by:
getWholeFileMetadatain interfaceIMetadataQuerier
-
loadChunkMetaDatas
public void loadChunkMetaDatas(java.util.List<Path> paths) throws java.io.IOException
Description copied from interface:IMetadataQuerierthis will load all chunk metadata of given paths into cache.call this method before calling getChunkMetaDataList() will accelerate the reading of chunk metadata, which will only read TsMetaData once
- Specified by:
loadChunkMetaDatasin interfaceIMetadataQuerier- Throws:
java.io.IOException
-
getDataType
public TSDataType getDataType(Path path) throws java.io.IOException
- Specified by:
getDataTypein interfaceIMetadataQuerier- Returns:
- the corresponding data type.
- Throws:
java.io.IOException
-
convertSpace2TimePartition
public java.util.List<TimeRange> convertSpace2TimePartition(java.util.List<Path> paths, long spacePartitionStartPos, long spacePartitionEndPos) throws java.io.IOException
Description copied from interface:IMetadataQuerierConvert the space partition constraint to the time partition constraint.- Specified by:
convertSpace2TimePartitionin interfaceIMetadataQuerier- Parameters:
paths- selected paths in a query expressionspacePartitionStartPos- the start position of the space partitionspacePartitionEndPos- the end position of the space partition- Returns:
- the converted time partition constraint
- Throws:
java.io.IOException
-
checkLocateStatus
public static TsFileSequenceReader.LocateStatus checkLocateStatus(IChunkMetadata chunkMetaData, long spacePartitionStartPos, long spacePartitionEndPos)
Check the location of a given chunkGroupMetaData with respect to a space partition constraint.- Parameters:
chunkMetaData- the given chunkMetaDataspacePartitionStartPos- the start position of the space partitionspacePartitionEndPos- the end position of the space partition- Returns:
- LocateStatus
-
clear
public void clear()
Description copied from interface:IMetadataQuerierclear caches (if used) to release memory.- Specified by:
clearin interfaceIMetadataQuerier
-
-