Package org.apache.hadoop.hbase

Provides Hbase, the Hadoop simple database.

See:
          Description

Interface Summary
CacheFlushListener Implementors of this interface want to be notified when an HRegion determines that a cache flush is needed.
HConnection  
HConstants HConstants holds a bunch of HBase-related constants
HInternalScannerInterface Internally, we need to be able to determine if the scanner is doing wildcard column matches (when only a column family is specified or if a column regex is specified) or if multiple members of the same column family were specified.
HMasterInterface Clients interact with the HMasterInterface to gain access to meta-level HBase functionality, like finding an HRegionServer and creating/destroying tables.
HMasterRegionInterface HRegionServers interact with the HMasterRegionInterface to report on local goings-on and to obtain data-handling instructions from the HMaster.
HRegionInterface Clients interact with HRegionServers using a handle to the HRegionInterface.
HScannerInterface HScannerInterface iterates through a set of rows.
LeaseListener LeaseListener is an interface meant to be implemented by users of the Leases class.
LogRollListener Mechanism by which the HLog requests a log roll
RegionUnavailableListener Used as a callback mechanism so that an HRegion can notify the HRegionServer of the different stages making an HRegion unavailable.
 

Class Summary
BloomFilterDescriptor Supplied as a parameter to HColumnDescriptor to specify what kind of bloom filter to use for a column, and its configuration parameters.
Chore Chore is a task performed on a period in hbase.
HAbstractScanner Abstract base class that implements the HScannerInterface.
HBaseAdmin Provides administrative functions for HBase
HBaseConfiguration Adds HBase configuration files to a Configuration
HColumnDescriptor An HColumnDescriptor contains information about a column family such as the number of versions, compression settings, etc.
HConnectionManager A non-instantiable class that manages connections to multiple tables in multiple HBase instances
HLog HLog stores all the edits to the HStore.
HLogEdit A log value.
HLogKey A Key for an entry in the change log.
HMaster HMaster is the "master server" for a HBase.
HMaster.MetaRegion Describes a meta region and its server
HMsg HMsg is for communicating instructions between the HMaster and the HRegionServers.
HRegion HRegion stores data for a certain region of a table.
HRegionInfo HRegion information.
HRegionLocation Contains the HRegionInfo for the region and the HServerAddress for the HRegionServer serving the region
HRegionServer HRegionServer makes a set of HRegions available to clients.
HServerAddress HServerAddress is a "label" for a HBase server that combines the host name and port number.
HServerInfo HServerInfo contains metainfo about an HRegionServer, Currently it only contains the server start code.
HServerLoad This class encapsulates metrics for determining the load on a HRegionServer
HStore HStore maintains a bunch of data files.
HStoreFile A HStore data file.
HStoreKey A Key for a stored row
HTable Used to communicate with a single HBase table
HTableDescriptor HTableDescriptor contains the name of an HTable, and its column families.
Leases Leases There are several server classes in HBase that need to track external clients that occasionally send heartbeats.
LocalHBaseCluster This class creates a single process HBase cluster.
LocalHBaseCluster.RegionServerThread runs region servers
RemoteExceptionHandler An immutable class which contains a static method for handling org.apache.hadoop.ipc.RemoteException exceptions.
Shell An hbase shell.
 

Enum Summary
BloomFilterDescriptor.BloomFilterType The type of bloom filter
HColumnDescriptor.CompressionType The type of compression.
HStoreFile.Range For split HStoreFiles, specifies if the file covers the lower half or the upper half of the key range
 

Exception Summary
DroppedSnapshotException Thrown during flush if the possibility snapshot content was not properly persisted into store files.
InvalidColumnNameException Thrown when an invalid column name is encountered
LockException Thrown when a locking error is encountered
MasterNotRunningException Thrown if the master is not running
NoServerForRegionException Thrown when no region server can be found for a region
NotServingRegionException Thrown by a region server if it is sent a request for a region it is not serving.
RegionServerRunningException Thrown if the region server log directory exists (which indicates another region server is running at the same address)
TableExistsException Thrown when a table exists but should not
TableNotDisabledException Thrown if a table should be offline but is not
TableNotFoundException Thrown when a table can not be located
UnknownScannerException Thrown if a region server is passed an unknown scanner id
WrongRegionException Thrown when a request contains a key which is not part of this region
 

Package org.apache.hadoop.hbase Description

Provides Hbase, the Hadoop simple database.

Requirements

Getting Started

What follows presumes you are installing hbase for the first time. If upgrading your hbase instance, see Upgrading.

Start by defining the following directory variables for your convenience:

If you are running a standalone operation, proceed to Running and Confirming Your Installation. If you are running a distributed operation, continue below.

Distributed Operation

Make sure you have followed Hadoop's instructions for running a distributed operation. Configuring Hbase for a distributed operation requires modification of the following two files: ${HBASE_HOME}/conf/hbase-site.xml and ${HBASE_HOME}/conf/regionservers.

hbase-site.xml allows the user to override the properties defined in ${HBASE_HOME}/conf/hbase-default.xml (hbase-default.xml itself should never be modified). At a minimum the hbase.master property should be redefined in hbase-site.xml to define the host:port pair on which to run the HMaster (read about the Hbase master, regionservers, etc):

<configuration>

  <property>
    <name>hbase.master</name>
    <value>[YOUR_HOST]:[PORT]</value>
    <description>The host and port that the Hbase master runs at.
    </description>
  </property>

</configuration>

The regionserver file lists all the hosts running HRegionServers, one host per line (This file is synonymous to the slaves file at ${HADOOP_HOME}/conf/slaves).

Additional Notes on Distributed Operation

Running and Confirming Your Installation

If you are running in standalone, non-distributed mode, hbase by default uses the local filesystem.

If you are running a distributed cluster you will need to start the Hadoop DFS daemons before starting Hbase and stop the daemons after Hbase has shut down. Start and stop the Hadoop DFS daemons as per the Hadoop instructions. Hbase does not normally use the mapreduce daemons. These do not need to be started.

Start Hbase with the following command:

${HBASE_HOME}/bin/start-hbase.sh

Once Hbase has started, enter ${HBASE_HOME}/bin/hbase shell to obtain a shell against Hbase from which you can execute Hbase commands. In the Hbase shell, type help; to see a list of supported commands. Note that all commands in the Hbase shell must end with ;. Test your installation by creating, viewing, and dropping a table, as per the help instructions. Be patient with the create and drop operations as they may each take 10 seconds or more. To stop hbase, exit the Hbase shell and enter:

${HBASE_HOME}/bin/stop-hbase.sh

If you are running a distributed operation, be sure to wait until Hbase has shut down completely before stopping the Hadoop daemons.

The default location for logs is ${HADOOP_HOME}/logs.

Hbase also puts up a UI listing vital attributes. By default its deployed on the master host at port 60010.

Upgrading

After installing the new hbase, before starting your cluster, run the ${HBASE_DIR}/bin/hbase migrate migration script. It will make any adjustments to the filesystem data under hbase.rootdir necessary to run the hbase version.

Related Documentation



Copyright © 2006 The Apache Software Foundation