Logo Search packages:      
Sourcecode: hbase version File versions  Download package

org::apache::hadoop::hbase::regionserver::Store Class Reference

Inheritance diagram for org::apache::hadoop::hbase::regionserver::Store:

org::apache::hadoop::hbase::HConstants org::apache::hadoop::hbase::io::HeapSize

List of all members.

Detailed Description

A Store holds a column family in a Region. Its a memstore and a set of zero or more StoreFiles, which stretch backwards over time.

There's no reason to consider append-logging at this level; all logging and locking is handled at the HRegion level. Store just provides services to manage sets of StoreFiles. One of the most important of those services is compaction services where files are aggregated once they pass a configurable threshold.

The only thing having to do with logs that Store 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 Store).

Locking and transactions are handled at a higher level. This API should not be called directly but by an HRegion manager.

Definition at line 88 of file Store.java.

Public Types

enum  Modify {

Public Member Functions

void get (Get get, NavigableSet< byte[]> columns, List< KeyValue > result) throws IOException
int getNumberOfstorefiles ()
long getSize ()
StoreFlusher getStoreFlusher (long cacheFlushId)
boolean hasTooManyStoreFiles ()
long heapSize ()
String toString ()
long updateColumnValue (byte[] row, byte[] f, byte[] qualifier, long newValue) throws IOException

Static Public Member Functions

static Path getStoreHomedir (final Path tabledir, final int encodedName, final byte[] family)

Static Public Attributes

static final int ALL_VERSIONS = Integer.MAX_VALUE
static final byte[] CATALOG_FAMILY = Bytes.toBytes(CATALOG_FAMILY_STR)
static final String CATALOG_FAMILY_STR = "info"
static final byte[] CATALOG_HISTORIAN_FAMILY = Bytes.toBytes("historian")
static final String CLUSTER_DISTRIBUTED = "hbase.cluster.distributed"
static final String CLUSTER_IS_DISTRIBUTED = "true"
static final String CLUSTER_IS_LOCAL = "false"
static final long DEEP_OVERHEAD
static final String DEFAULT_HOST = ""
static final int DEFAULT_MASTER_INFOPORT = 60010
static final int DEFAULT_MASTER_PORT = 60000
static final long DEFAULT_MAX_FILE_SIZE = 256 * 1024 * 1024
static final String DEFAULT_REGION_SERVER_CLASS = HRegionInterface.class.getName()
static final int DEFAULT_REGIONSERVER_INFOPORT = 60030
static final int DEFAULT_REGIONSERVER_PORT = 60020
static final int DEFAULT_SIZE_RESERVATION_BLOCK = 1024 * 1024 * 5
static final int DEFAULT_ZOOKEEPER_PAUSE = 2 * 1000
static final int DEFAULT_ZOOKEEPER_RETRIES = 5
static final byte[] EMPTY_BYTE_ARRAY = new byte [0]
static final byte[] EMPTY_END_ROW = EMPTY_START_ROW
static final byte[] EMPTY_START_ROW = EMPTY_BYTE_ARRAY
static final String FILE_SYSTEM_VERSION = "7"
static final long FIXED_OVERHEAD
static final int FOREVER = Integer.MAX_VALUE
static String HBASE_CLIENT_SCANNER_MAX_RESULT_SIZE_KEY = "hbase.client.scanner.max.result.size"
static final String HBASE_DIR = "hbase.rootdir"
static final String HREGION_COMPACTIONDIR_NAME = "compaction.dir"
static final String HREGION_LOGDIR_NAME = ".logs"
static final String HREGION_OLDLOGFILE_NAME = "oldlogfile.log"
static final String IN_MEMORY = "IN_MEMORY"
static final byte[] LAST_ROW = EMPTY_BYTE_ARRAY
static final long LATEST_TIMESTAMP = Long.MAX_VALUE
static final byte[] LATEST_TIMESTAMP_BYTES = Bytes.toBytes(LATEST_TIMESTAMP)
static final String MAJOR_COMPACTION_PERIOD = "hbase.hregion.majorcompaction"
static final String MASTER_PORT = "hbase.master.port"
static final int MAX_ROW_LENGTH = Short.MAX_VALUE
static final int MAXIMUM_VALUE_LENGTH = Integer.MAX_VALUE
static final int META_ROW_DELIMITER = ','
static final byte[] META_TABLE_NAME = Bytes.toBytes(".META.")
static final String NAME = "NAME"
static final String NINES = "99999999999999"
static final String REGION_IMPL = "hbase.hregion.impl"
static final String REGION_SERVER_CLASS = "hbase.regionserver.class"
static final String REGION_SERVER_IMPL = "hbase.regionserver.impl"
static final byte[] REGIONINFO_QUALIFIER = Bytes.toBytes("regioninfo")
static final String REGIONSERVER_PORT = "hbase.regionserver.port"
static int RETRY_BACKOFF [] = { 1, 1, 1, 2, 2, 4, 4, 8, 16, 32 }
static final byte[] ROOT_TABLE_NAME = Bytes.toBytes("-ROOT-")
static final byte[] SERVER_QUALIFIER = Bytes.toBytes("server")
static final byte[] SPLITA_QUALIFIER = Bytes.toBytes("splitA")
static final byte[] SPLITB_QUALIFIER = Bytes.toBytes("splitB")
static final byte[] STARTCODE_QUALIFIER = Bytes.toBytes("serverstartcode")
static final String THREAD_WAKE_FREQUENCY = "hbase.server.thread.wakefrequency"
static final String UTF8_ENCODING = "UTF-8"
static final String VERSION_FILE_NAME = "hbase.version"
static final String VERSIONS = "VERSIONS"
static final int WEEK_IN_SECONDS = 7 * 24 * 3600
static final String ZEROES = "00000000000000"
static final String ZOOKEEPER_CONFIG_NAME = "zoo.cfg"
static final String ZOOKEEPER_PAUSE = "zookeeper.pause"
static final String ZOOKEEPER_QUORUM = "hbase.zookeeper.quorum"
static final String ZOOKEEPER_RETRIES = "zookeeper.retries"

Protected Member Functions

long add (final KeyValue kv)
long delete (final KeyValue kv)
KeyValueScanner getScanner (Scan scan, final NavigableSet< byte[]> targetCols)
 Store (Path basedir, HRegion region, HColumnDescriptor family, FileSystem fs, Path reconstructionLog, HBaseConfiguration conf, final Progressable reporter) throws IOException

Protected Attributes

final MemStore memstore
long ttl

Package Functions

void addChangedReaderObserver (ChangedReadersObserver o)
StoreSize checkSplit (final boolean force)
List< StoreFileclose () throws IOException
StoreSize compact (final boolean mc) throws IOException
void deleteChangedReaderObserver (ChangedReadersObserver o)
HColumnDescriptor getFamily ()
HRegion getHRegion ()
HRegionInfo getHRegionInfo ()
long getMaxSeqIdBeforeLogRecovery ()
long getMaxSequenceId ()
KeyValue getRowKeyAtOrBefore (final KeyValue kv) throws IOException
NavigableMap< Long, StoreFilegetStorefiles ()
int getStorefilesCount ()
long getStorefilesIndexSize ()
long getStorefilesSize ()
HFile.Writer getWriter () throws IOException
boolean isMajorCompaction () throws IOException
void snapshot ()
int versionsToReturn (final int wantedVersions)

Static Package Functions

static void expiredOrDeleted (final Set< KeyValue > set, final KeyValue kv)
static boolean getClosest (final HFileScanner s, final KeyValue kv) throws IOException
static boolean isExpired (final KeyValue key, final long oldestTimestamp)
static boolean matchingColumns (final KeyValue kv, final Set< byte[]> columns)

Package Attributes

final KeyValue.KVComparator comparator
final KeyValue.KVComparator comparatorIgnoringType
final FileSystem fs
final ReentrantReadWriteLock lock = new ReentrantReadWriteLock()
final byte[] storeName

Static Package Attributes

static final Log LOG = LogFactory.getLog(Store.class)
static final Long ZERO_L = Long.valueOf(0L)

Private Member Functions

HFile.Writer compact (final List< StoreFile > filesToCompact, final boolean majorCompaction, final long maxId) throws IOException
StoreFile completeCompaction (final List< StoreFile > compactedFiles, final HFile.Writer compactedFile) throws IOException
long doReconstructionLog (final Path reconstructionLog, final long maxSeqID, final Progressable reporter) throws UnsupportedEncodingException, IOException
StoreFile flushCache (final long logCacheFlushId, SortedSet< KeyValue > snapshot) throws IOException
HFile.Writer getWriter (final Path basedir) throws IOException
boolean hasReferences (Collection< StoreFile > files)
StoreFile internalFlushCache (final SortedSet< KeyValue > set, final long logCacheFlushId) throws IOException
boolean isMajorCompaction (final List< StoreFile > filesToCompact) throws IOException
Map< Long, StoreFileloadStoreFiles () throws IOException
void notifyChangedReadersObservers () throws IOException
void rowAtOrBeforeFromStoreFile (final StoreFile f, final GetClosestRowBeforeTracker state) throws IOException
long runReconstructionLog (final Path reconstructionLog, final long msid, final Progressable reporter) throws IOException
boolean seekToScanner (final HFileScanner scanner, final KeyValue firstOnRow, final KeyValue firstKV) throws IOException
boolean updateStorefiles (final long logCacheFlushId, final StoreFile sf, final SortedSet< KeyValue > set) throws IOException
boolean walkForwardInSingleRow (final HFileScanner scanner, final KeyValue firstOnRow, final GetClosestRowBeforeTracker state) throws IOException

Static Private Member Functions

static long getLowestTimestamp (FileSystem fs, Path dir) throws IOException

Private Attributes

final boolean blockcache
final int blocksize
final CopyOnWriteArraySet
< ChangedReadersObserver
final int compactionThreshold
final Object compactLock = new Object()
final Compression.Algorithm compression
final HBaseConfiguration conf
final long desiredMaxFileSize
final HColumnDescriptor family
final Object flushLock = new Object()
final Path homedir
final boolean inMemory
long majorCompactionTime
int maxFilesToCompact
volatile long maxSeqId = -1
long maxSeqIdBeforeLogRecovery = -1
final HRegion region
final Path regionCompactionDir
final NavigableMap< Long,
final String storeNameStr
volatile long storeSize = 0L


class  StoreFlusherImpl
class  StoreSize

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index