Class TabletFile

  • All Implemented Interfaces:
    Comparable<TabletFile>
    Direct Known Subclasses:
    ScanServerRefTabletFile, StoredTabletFile

    public class TabletFile
    extends Object
    implements Comparable<TabletFile>
    Object representing a tablet file that may exist in the metadata table. This class is used for reading and opening tablet files. It is also used when inserting new tablet files. When a new file is inserted, the insert() method is called and returns a StoredTabletFile For situations where a tablet file needs to be updated or deleted in the metadata, a StoredTabletFile is required.

    As of 2.1, Tablet file paths should now be only absolute URIs with the removal of relative paths in Upgrader9to10.upgradeRelativePaths()

    • Field Detail

      • metaPath

        protected final org.apache.hadoop.fs.Path metaPath
    • Constructor Detail

      • TabletFile

        public TabletFile​(org.apache.hadoop.fs.Path metaPath)
        Construct new tablet file using a Path. Used in the case where we had to use Path object to qualify an absolute path or create a new file.
    • Method Detail

      • getVolume

        public String getVolume()
      • getTableId

        public TableId getTableId()
      • getTabletDir

        public String getTabletDir()
      • getFileName

        public String getFileName()
      • getPathStr

        public String getPathStr()
        Return a string for opening and reading the tablet file. Doesn't have to be exact string in metadata.
      • getMetaInsert

        public String getMetaInsert()
        Return a string for inserting a new tablet file.
      • getMetaInsertText

        public org.apache.hadoop.io.Text getMetaInsertText()
        Return a new Text object of getMetaInsert()
      • insert

        public StoredTabletFile insert()
        New file was written to metadata so return a StoredTabletFile
      • getPath

        public org.apache.hadoop.fs.Path getPath()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object