Class TabletFile
- java.lang.Object
-
- org.apache.accumulo.core.metadata.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, theinsert()
method is called and returns aStoredTabletFile
For situations where a tablet file needs to be updated or deleted in the metadata, aStoredTabletFile
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 Summary
Fields Modifier and Type Field Description protected org.apache.hadoop.fs.Path
metaPath
-
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 int
compareTo(TabletFile o)
boolean
equals(Object obj)
String
getFileName()
String
getMetaInsert()
Return a string for inserting a new tablet file.org.apache.hadoop.io.Text
getMetaInsertText()
Return a new Text object ofgetMetaInsert()
org.apache.hadoop.fs.Path
getPath()
String
getPathStr()
Return a string for opening and reading the tablet file.TableId
getTableId()
String
getTabletDir()
String
getVolume()
int
hashCode()
StoredTabletFile
insert()
New file was written to metadata so return a StoredTabletFileString
toString()
-
-
-
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:
compareTo
in interfaceComparable<TabletFile>
-
-