@InterfaceAudience.Private public class StoreFileInfo extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DELFILE_NAME_REGEX
A non-capture group, for del files, so that this can be embedded.
|
static java.lang.String |
HFILE_NAME_REGEX
A non-capture group, for hfiles, so that this can be embedded.
|
static Log |
LOG |
| Constructor and Description |
|---|
StoreFileInfo(Configuration conf,
FileSystem fs,
FileStatus fileStatus)
Create a Store File Info
|
StoreFileInfo(Configuration conf,
FileSystem fs,
FileStatus fileStatus,
HFileLink link)
Create a Store File Info from an HFileLink
|
StoreFileInfo(Configuration conf,
FileSystem fs,
FileStatus fileStatus,
Reference reference)
Create a Store File Info from an HFileLink
|
StoreFileInfo(Configuration conf,
FileSystem fs,
Path initialPath)
Create a Store File Info
|
| Modifier and Type | Method and Description |
|---|---|
HDFSBlocksDistribution |
computeHDFSBlocksDistribution(FileSystem fs)
Compute the HDFS Block Distribution for this StoreFile
|
boolean |
equals(java.lang.Object that) |
long |
getCreatedTimestamp() |
FileStatus |
getFileStatus() |
HDFSBlocksDistribution |
getHDFSBlockDistribution() |
long |
getModificationTime() |
Path |
getPath() |
Reference |
getReference() |
FileStatus |
getReferencedFileStatus(FileSystem fs)
Get the
FileStatus of the file referenced by this StoreFileInfo |
static Path |
getReferredToFile(Path p) |
int |
hashCode() |
static boolean |
isDelFile(Path path) |
static boolean |
isHFile(Path path) |
boolean |
isLink() |
boolean |
isReference() |
static boolean |
isReference(Path path) |
boolean |
isTopReference() |
static boolean |
isValid(FileStatus fileStatus)
Return if the specified file is a valid store file or not.
|
StoreFile.Reader |
open(FileSystem fs,
CacheConfig cacheConf)
Open a Reader for the StoreFile
|
void |
setRegionCoprocessorHost(RegionCoprocessorHost coprocessorHost)
Sets the region coprocessor env.
|
java.lang.String |
toString() |
static boolean |
validateStoreFileName(java.lang.String fileName)
Validate the store file name.
|
public static final Log LOG
public static final java.lang.String HFILE_NAME_REGEX
public static final java.lang.String DELFILE_NAME_REGEX
public StoreFileInfo(Configuration conf,
FileSystem fs,
Path initialPath)
throws java.io.IOException
conf - the Configuration to usefs - The current file system to use.initialPath - The Path of the filejava.io.IOExceptionpublic StoreFileInfo(Configuration conf,
FileSystem fs,
FileStatus fileStatus)
throws java.io.IOException
conf - the Configuration to usefs - The current file system to use.fileStatus - The FileStatus of the filejava.io.IOExceptionpublic StoreFileInfo(Configuration conf,
FileSystem fs,
FileStatus fileStatus,
HFileLink link)
throws java.io.IOException
conf - the Configuration to usefs - The current file system to use.fileStatus - The FileStatus of the filejava.io.IOExceptionpublic StoreFileInfo(Configuration conf,
FileSystem fs,
FileStatus fileStatus,
Reference reference)
throws java.io.IOException
conf - fs - fileStatus - reference - java.io.IOExceptionpublic void setRegionCoprocessorHost(RegionCoprocessorHost coprocessorHost)
coprocessorHost - public Reference getReference()
public boolean isReference()
public boolean isTopReference()
public boolean isLink()
public HDFSBlocksDistribution getHDFSBlockDistribution()
public StoreFile.Reader open(FileSystem fs, CacheConfig cacheConf) throws java.io.IOException
fs - The current file system to use.cacheConf - The cache configuration and block cache reference.java.io.IOExceptionpublic HDFSBlocksDistribution computeHDFSBlocksDistribution(FileSystem fs) throws java.io.IOException
java.io.IOExceptionpublic FileStatus getReferencedFileStatus(FileSystem fs)
throws java.io.IOException
FileStatus of the file referenced by this StoreFileInfofs - The current file system to use.FileStatus of the file referenced by this StoreFileInfojava.io.IOExceptionpublic Path getPath()
Path of the filepublic FileStatus getFileStatus()
throws java.io.IOException
FileStatus of the filejava.io.IOExceptionpublic long getModificationTime()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic static boolean isHFile(Path path)
path - Path to check.public static boolean isDelFile(Path path)
path - Path to check.public static boolean isReference(Path path)
path - Path to check.public long getCreatedTimestamp()
public static Path getReferredToFile(Path p)
public static boolean validateStoreFileName(java.lang.String fileName)
fileName - name of the file to validatepublic static boolean isValid(FileStatus fileStatus)
throws java.io.IOException
fileStatus - The FileStatus of the filejava.io.IOExceptionpublic boolean equals(java.lang.Object that)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object