Class MetadataQuerierByFileImpl

    • Constructor Detail

      • MetadataQuerierByFileImpl

        public MetadataQuerierByFileImpl​(TsFileSequenceReader tsFileReader)
                                  throws java.io.IOException
        Constructor of MetadataQuerierByFileImpl.
        Throws:
        java.io.IOException
    • Method Detail

      • loadChunkMetaDatas

        public void loadChunkMetaDatas​(java.util.List<Path> paths)
                                throws java.io.IOException
        Description copied from interface: IMetadataQuerier
        this 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:
        loadChunkMetaDatas in interface IMetadataQuerier
        Throws:
        java.io.IOException
      • getDataType

        public TSDataType getDataType​(Path path)
                               throws java.io.IOException
        Specified by:
        getDataType in interface IMetadataQuerier
        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: IMetadataQuerier
        Convert the space partition constraint to the time partition constraint.
        Specified by:
        convertSpace2TimePartition in interface IMetadataQuerier
        Parameters:
        paths - selected paths in a query expression
        spacePartitionStartPos - the start position of the space partition
        spacePartitionEndPos - 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 chunkMetaData
        spacePartitionStartPos - the start position of the space partition
        spacePartitionEndPos - the end position of the space partition
        Returns:
        LocateStatus