Class TsFileIdentifier


  • public class TsFileIdentifier
    extends java.lang.Object
    This class record the logical information of files in compaction, which is used to locate file in disk. File identifier includes whether the file is sequence, its storage group name, virtual storage group id, time partition id and file name. This class cannot be initialized directly. We provide some static methods to create instance of this class.
    • Method Detail

      • getFileIdentifierFromFilePath

        public static TsFileIdentifier getFileIdentifierFromFilePath​(java.lang.String filepath)
        This function generates an instance of CompactionFileIdentifier by parsing the path of a tsfile. Notice, the path of the file should include information of its logical storage group, virtual storage group id, time partition, sequence or not and its filename, such as "sequence/root.test.sg/0/0/1-1-0-0.tsfile".
      • getFileIdentifierFromInfoString

        public static TsFileIdentifier getFileIdentifierFromInfoString​(java.lang.String infoString)
        This function generates an instance of CompactionFileIdentifier by parsing the info string of a tsfile(usually recorded in a compaction.log), such as “sequence root.test.sg 0 0 0-0-0-0.tsfile"
      • getFileIdentifierFromOldInfoString

        public static TsFileIdentifier getFileIdentifierFromOldInfoString​(java.lang.String oldInfoString)
        This function generates an instance of CompactionFileIdentifier by parsing the old info string from previous version (<0.13) of a tsfile(usually recorded in a compaction.log). Such as “root.test.sg 0 0 1-1-0-0.tsfile true" from old cross space compaction log and "root.test.sg 0 0 1-1-0-0.tsfile sequence" from old inner space compaction log.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getFileFromDataDirs

        public java.io.File getFileFromDataDirs()
        This method find the File object of current file by searching it in every data directory. If the file is not found, it will return null.
      • getFilename

        public java.lang.String getFilename()
      • getFilePath

        public java.lang.String getFilePath()
      • getLogicalStorageGroupName

        public java.lang.String getLogicalStorageGroupName()
      • getDataRegionId

        public java.lang.String getDataRegionId()
      • getTimePartitionId

        public java.lang.String getTimePartitionId()
      • isSequence

        public boolean isSequence()