|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.regionserver.HStore
public class HStore
HStore maintains a bunch of data files. It is responsible for maintaining the memory/file hierarchy and for periodic flushes to disk and compacting edits to the file. Locking and transactions are handled at a higher level. This API should not be called directly by any writer, but rather by an HRegion manager.
Field Summary | |
---|---|
protected org.apache.hadoop.hbase.regionserver.Memcache |
memcache
|
protected long |
ttl
|
Constructor Summary | |
---|---|
protected |
HStore(org.apache.hadoop.fs.Path basedir,
HRegionInfo info,
HColumnDescriptor family,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path reconstructionLog,
HBaseConfiguration conf,
org.apache.hadoop.util.Progressable reporter)
An HStore is a set of zero or more MapFiles, which stretch backwards over time. |
Method Summary | |
---|---|
protected long |
add(HStoreKey key,
byte[] value)
Adds a value to the memcache |
protected InternalScanner |
getScanner(long timestamp,
byte[][] targetCols,
byte[] firstRow,
RowFilterInterface filter)
Return a scanner for both the memcache and the HStore files |
long |
getSize()
|
static boolean |
isReference(org.apache.hadoop.fs.Path p)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final org.apache.hadoop.hbase.regionserver.Memcache memcache
protected long ttl
Constructor Detail |
---|
protected HStore(org.apache.hadoop.fs.Path basedir, HRegionInfo info, HColumnDescriptor family, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path reconstructionLog, HBaseConfiguration conf, org.apache.hadoop.util.Progressable reporter) throws IOException
The HRegion starts writing to its set of HStores when the HRegion's memcache is flushed. This results in a round of new MapFiles, one for each HStore.
There's no reason to consider append-logging at this level; all logging and locking is handled at the HRegion level. HStore just provides services to manage sets of MapFiles. One of the most important of those services is MapFile-compaction services.
The only thing having to do with logs that HStore needs to deal with is the reconstructionLog. This is a segment of an HRegion's log that might NOT be present upon startup. If the param is NULL, there's nothing to do. If the param is non-NULL, we need to process the log to reconstruct a TreeMap that might not have been written to disk before the process died.
It's assumed that after this constructor returns, the reconstructionLog file will be deleted (by whoever has instantiated the HStore).
basedir
- qualified path under which the region directory livesinfo
- HRegionInfo for this regionfamily
- HColumnDescriptor for this columnfs
- file system objectreconstructionLog
- existing log file to apply if anyconf
- configuration objectreporter
- Call on a period so hosting server can report we're
making progress to master -- otherwise master might think region deploy
failed. Can be null.
IOException
Method Detail |
---|
protected long add(HStoreKey key, byte[] value)
key
- value
-
public long getSize()
protected InternalScanner getScanner(long timestamp, byte[][] targetCols, byte[] firstRow, RowFilterInterface filter) throws IOException
IOException
public String toString()
toString
in class Object
public static boolean isReference(org.apache.hadoop.fs.Path p)
p
- Path to check.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |