Package org.apache.hadoop.hbase.mob
Class MobFileName
java.lang.Object
org.apache.hadoop.hbase.mob.MobFileName
The mob file name. It consists of a md5 of a start key, a date, uuid and encoded region name. It
looks like md5(start) + date + uuid+ "_" + encoded region name.
- characters 0-31: md5 hex string of a start key. Since the length of the start key is not fixed, have to use the md5 instead which has a fix length.
- characters 32-39: a string of a date with format yyyymmdd. The date is the latest timestamp of cells in this file
- the remaining characters: the uuid.
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprivate
MobFileName
(byte[] startKey, String date, String uuid, String regionName) Creates an instance of MobFileNameprivate
MobFileName
(String startKey, String date, String uuid, String regionName) Creates an instance of MobFileName -
Method Summary
Modifier and TypeMethodDescriptionstatic MobFileName
Creates an instance of MobFileNamestatic MobFileName
Creates an instance of MobFileName.static MobFileName
Creates an instance of MobFileNameboolean
getDate()
Gets the date string.static String
getDateFromName
(String fileName) get date from MobFileName.Gets the file name.Gets region nameGets the hex string of the md5 for a start key.static String
getStartKeyFromName
(String fileName) get startKey from MobFileName.int
hashCode()
static boolean
isOldMobFileName
(String name)
-
Field Details
-
date
-
startKey
-
uuid
-
fileName
-
regionName
-
STARTKEY_END_INDEX
- See Also:
-
DATE_END_INDEX
- See Also:
-
UUID_END_INDEX
- See Also:
-
REGION_SEP
- See Also:
-
-
Constructor Details
-
MobFileName
Creates an instance of MobFileName- Parameters:
startKey
- The start key.date
- The string of the latest timestamp of cells in this file, the format is yyyymmdd.uuid
- The uuidregionName
- name of a region, where this file was created during flush or compaction.
-
MobFileName
Creates an instance of MobFileName- Parameters:
startKey
- The md5 hex string of the start key.date
- The string of the latest timestamp of cells in this file, the format is yyyymmdd.uuid
- The uuidregionName
- name of a region, where this file was created during flush or compaction.
-
-
Method Details
-
create
Creates an instance of MobFileName- Parameters:
startKey
- The md5 hex string of the start key.date
- The string of the latest timestamp of cells in this file, the format is yyyymmdd.uuid
- The uuid.regionName
- name of a region, where this file was created during flush or compaction.- Returns:
- An instance of a MobFileName.
-
create
Creates an instance of MobFileName- Parameters:
startKey
- The md5 hex string of the start key.date
- The string of the latest timestamp of cells in this file, the format is yyyymmdd.uuid
- The uuid.regionName
- name of a region, where this file was created during flush or compaction.- Returns:
- An instance of a MobFileName.
-
create
Creates an instance of MobFileName.- Parameters:
fileName
- The string format of a file name.- Returns:
- An instance of a MobFileName.
-
isOldMobFileName
-
getStartKeyFromName
get startKey from MobFileName.- Parameters:
fileName
- file name.
-
getDateFromName
get date from MobFileName.- Parameters:
fileName
- file name.
-
getStartKey
Gets the hex string of the md5 for a start key.- Returns:
- The hex string of the md5 for a start key.
-
getRegionName
Gets region name- Returns:
- name of a region, where this file was created during flush or compaction.
-
getDate
Gets the date string. Its format is yyyymmdd.- Returns:
- The date string.
-
hashCode
-
equals
-
getFileName
Gets the file name.- Returns:
- The file name.
-