Class TabletFile
- java.lang.Object
-
- org.apache.accumulo.core.metadata.TabletFile
-
- All Implemented Interfaces:
Comparable<TabletFile>
- Direct Known Subclasses:
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, theinsert()method is called and returns aStoredTabletFileFor situations where a tablet file needs to be updated or deleted in the metadata, aStoredTabletFileis required.As of 2.1, Tablet file paths should now be only absolute URIs with the removal of relative paths in Upgrader9to10.upgradeRelativePaths()
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.hadoop.fs.PathmetaPath
-
Constructor Summary
Constructors Constructor Description TabletFile(org.apache.hadoop.fs.Path metaPath)Construct new tablet file using a Path.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(TabletFile o)booleanequals(Object obj)StringgetFileName()StringgetMetaInsert()Return a string for inserting a new tablet file.org.apache.hadoop.io.TextgetMetaInsertText()Return a new Text object ofgetMetaInsert()org.apache.hadoop.fs.PathgetPath()StringgetPathStr()Return a string for opening and reading the tablet file.TableIdgetTableId()StringgetTabletDir()StringgetVolume()inthashCode()StoredTabletFileinsert()New file was written to metadata so return a StoredTabletFileStringtoString()
-
-
-
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 ofgetMetaInsert()
-
insert
public StoredTabletFile insert()
New file was written to metadata so return a StoredTabletFile
-
getPath
public org.apache.hadoop.fs.Path getPath()
-
compareTo
public int compareTo(TabletFile o)
- Specified by:
compareToin interfaceComparable<TabletFile>
-
-