|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.regionserver.StoreFile
public class StoreFile
A Store data file. Stores usually have one or more of these files. They
are produced by flushing the memstore to disk. To
create, call getWriter(FileSystem, Path)
and append data. Be
sure to add any metadata before calling close on the Writer
(Use the appendMetadata convenience methods). On close, a StoreFile is
sitting in the Filesystem. To refer to it, create a StoreFile instance
passing filesystem and path. To read, call getReader()
.
StoreFiles may also reference store files in another Store.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.HConstants |
---|
HConstants.Modify |
Field Summary |
---|
Method Summary | |
---|---|
static void |
appendMetadata(HFile.Writer w,
long maxSequenceId,
boolean mc)
Writes metadata. |
void |
close()
|
void |
delete()
Delete this file |
BlockCache |
getBlockCache()
|
static BlockCache |
getBlockCache(HBaseConfiguration conf)
Returns the block cache or null in case none should be used. |
long |
getMaxSequenceId()
|
HFile.Reader |
getReader()
|
static HFile.Writer |
getWriter(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path dir)
Get a store file writer. |
static HFile.Writer |
getWriter(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path dir,
int blocksize,
Compression.Algorithm algorithm,
KeyValue.KeyComparator c)
Get a store file writer. |
static boolean |
isReference(org.apache.hadoop.fs.Path p)
|
static boolean |
isReference(org.apache.hadoop.fs.Path p,
Matcher m)
|
protected HFile.Reader |
open()
Opens reader on this store file. |
static org.apache.hadoop.fs.Path |
rename(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path tgt)
Utility to help with rename. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static boolean isReference(org.apache.hadoop.fs.Path p)
p
- Path to check.
public static boolean isReference(org.apache.hadoop.fs.Path p, Matcher m)
p
- Path to check.m
- Matcher to use.
public long getMaxSequenceId()
public static BlockCache getBlockCache(HBaseConfiguration conf)
null
in case none should be used.
conf
- The current configuration.
null
.public BlockCache getBlockCache()
protected HFile.Reader open() throws IOException
IOException
close()
public HFile.Reader getReader()
public void close() throws IOException
IOException
public String toString()
toString
in class Object
public void delete() throws IOException
IOException
public static org.apache.hadoop.fs.Path rename(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path src, org.apache.hadoop.fs.Path tgt) throws IOException
fs
- src
- tgt
-
IOException
public static HFile.Writer getWriter(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path dir) throws IOException
appendMetadata(org.apache.hadoop.hbase.io.hfile.HFile.Writer, long)
.
fs
- dir
- Path to family directory. Makes the directory if doesn't exist.
Creates a file with a unique name in this directory.
IOException
public static HFile.Writer getWriter(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path dir, int blocksize, Compression.Algorithm algorithm, KeyValue.KeyComparator c) throws IOException
appendMetadata(org.apache.hadoop.hbase.io.hfile.HFile.Writer, long)
.
fs
- dir
- Path to family directory. Makes the directory if doesn't exist.
Creates a file with a unique name in this directory.blocksize
- algorithm
- Pass null to get default.c
- Pass null to get default.
IOException
public static void appendMetadata(HFile.Writer w, long maxSequenceId, boolean mc) throws IOException
w
since its written
as metadata to that file.
maxSequenceId
- Maximum sequence id.mc
- True if this file is product of a major compaction
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |