public class HBaseStoreManager extends DistributedStoreManager implements KeyColumnValueStoreManager
DistributedStoreManager.Deployment, DistributedStoreManager.MaskedTimestamp
Modifier and Type | Field and Description |
---|---|
static ConfigOption<String> |
COMPAT_CLASS
If this key is present in either the JVM system properties or the process
environment (checked in the listed order, first hit wins), then its value
must be the full package and class name of an implementation of
HBaseCompat that has a no-arg public constructor. |
static ConfigOption<String> |
COMPRESSION |
static String |
COMPRESSION_DEFAULT |
static ConfigNamespace |
HBASE_CONFIGURATION_NAMESPACE |
static ConfigNamespace |
HBASE_NS |
static ConfigOption<String> |
HBASE_SNAPSHOT |
static ConfigOption<String> |
HBASE_SNAPSHOT_RESTORE_DIR |
static ConfigOption<String> |
HBASE_TABLE |
static int |
MIN_REGION_COUNT
Related bug fixed in 0.98.0, 0.94.7, 0.95.0:
https://issues.apache.org/jira/browse/HBASE-8170
|
static int |
PORT_DEFAULT |
static TimestampProviders |
PREFERRED_TIMESTAMPS |
static ConfigOption<Integer> |
REGION_COUNT
The total number of HBase regions to create with JanusGraph's table.
|
static ConfigOption<Integer> |
REGIONS_PER_SERVER
This setting is used only when
REGION_COUNT is unset. |
static ConfigOption<Boolean> |
SHORT_CF_NAMES |
static ConfigOption<Boolean> |
SKIP_SCHEMA_CHECK |
connectionTimeoutMS, hostnames, pageSize, password, port, times, username
batchLoading, storageConfig, transactional
Constructor and Description |
---|
HBaseStoreManager(Configuration config) |
Modifier and Type | Method and Description |
---|---|
StoreTransaction |
beginTransaction(BaseTransactionConfig config) |
void |
clearStorage()
Deletes the specified table with all its columns.
|
void |
close() |
static com.google.common.collect.BiMap<String,String> |
createShortCfMap(Configuration config) |
void |
dumpOpenManagers() |
boolean |
exists() |
DistributedStoreManager.Deployment |
getDeployment() |
StoreFeatures |
getFeatures() |
Object |
getHadoopManager() |
protected org.apache.hadoop.conf.Configuration |
getHBaseConf() |
List<KeyRange> |
getLocalKeyPartition() |
String |
getName() |
void |
mutateMany(Map<String,Map<StaticBuffer,KCVMutation>> mutations,
StoreTransaction txh) |
KeyColumnValueStore |
openDatabase(String longName,
StoreMetaData.Container metaData) |
static String |
shortenCfName(com.google.common.collect.BiMap<String,String> shortCfNameMap,
String longName) |
String |
toString() |
getPageSize, getSingleHostname, getTimestampProvider, hasAuthentication, sleepAfterWrite
getMetaDataSchema, getStorageConfig
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
openDatabase
public static final ConfigNamespace HBASE_NS
public static final ConfigOption<Boolean> SHORT_CF_NAMES
public static final String COMPRESSION_DEFAULT
public static final ConfigOption<String> COMPRESSION
public static final ConfigOption<Boolean> SKIP_SCHEMA_CHECK
public static final ConfigOption<String> HBASE_TABLE
public static final ConfigOption<String> HBASE_SNAPSHOT
public static final ConfigOption<String> HBASE_SNAPSHOT_RESTORE_DIR
public static final int MIN_REGION_COUNT
public static final ConfigOption<Integer> REGION_COUNT
public static final ConfigOption<Integer> REGIONS_PER_SERVER
REGION_COUNT
is unset.
If JanusGraph's HBase table does not exist, then it will be created with total region count = (number of servers reported by ClusterStatus) * (this value).
The Apache HBase manual suggests an order-of-magnitude range of potential values for this setting:
What's the optimal number of pre-split regions to create? Mileage will vary depending upon your application. You could start low with 10 pre-split regions / server and watch as data grows over time. It's better to err on the side of too little regions and rolling split later.
In general, HBase is designed to run with a small (20-200) number of relatively large (5-20Gb) regions per server... Typically you want to keep your region count low on HBase for numerous reasons. Usually right around 100 regions per RegionServer has yielded the best results.
public static final ConfigOption<String> COMPAT_CLASS
HBaseCompat
that has a no-arg public constructor.
When this is not set, JanusGraph attempts to automatically detect the
HBase runtime version by calling VersionInfo.getVersion()
. JanusGraph
then checks the returned version string against a hard-coded list of
supported version prefixes and instantiates the associated compat layer
if a match is found.
When this is set, JanusGraph will not call
VersionInfo.getVersion()
or read its hard-coded list of supported
version prefixes. JanusGraph will instead attempt to instantiate the class
specified (via the no-arg constructor which must exist) and then attempt
to cast it to HBaseCompat and use it as such. JanusGraph will assume the
supplied implementation is compatible with the runtime HBase version and
make no attempt to verify that assumption.
Setting this key incorrectly could cause runtime exceptions at best or
silent data corruption at worst. This setting is intended for users
running exotic HBase implementations that don't support VersionInfo or
implementations which return values from VersionInfo.getVersion()
that are inconsistent with Apache's versioning convention. It may also be
useful to users who want to run against a new release of HBase that JanusGraph
doesn't yet officially support.
public static final int PORT_DEFAULT
public static final TimestampProviders PREFERRED_TIMESTAMPS
public static final ConfigNamespace HBASE_CONFIGURATION_NAMESPACE
public HBaseStoreManager(Configuration config) throws BackendException
BackendException
public static com.google.common.collect.BiMap<String,String> createShortCfMap(Configuration config)
public DistributedStoreManager.Deployment getDeployment()
getDeployment
in class DistributedStoreManager
public String toString()
toString
in class DistributedStoreManager
public void dumpOpenManagers()
public void close()
close
in interface StoreManager
public StoreFeatures getFeatures()
getFeatures
in interface StoreManager
public void mutateMany(Map<String,Map<StaticBuffer,KCVMutation>> mutations, StoreTransaction txh) throws BackendException
mutateMany
in interface KeyColumnValueStoreManager
BackendException
public KeyColumnValueStore openDatabase(String longName, StoreMetaData.Container metaData) throws BackendException
openDatabase
in interface KeyColumnValueStoreManager
BackendException
public StoreTransaction beginTransaction(BaseTransactionConfig config) throws BackendException
beginTransaction
in interface StoreManager
BackendException
public String getName()
getName
in interface StoreManager
public void clearStorage() throws BackendException
clearStorage
in interface StoreManager
BackendException
public boolean exists() throws BackendException
exists
in interface StoreManager
BackendException
public List<KeyRange> getLocalKeyPartition() throws BackendException
getLocalKeyPartition
in interface StoreManager
BackendException
public static String shortenCfName(com.google.common.collect.BiMap<String,String> shortCfNameMap, String longName) throws PermanentBackendException
PermanentBackendException
protected org.apache.hadoop.conf.Configuration getHBaseConf()
public Object getHadoopManager() throws BackendException
getHadoopManager
in interface StoreManager
BackendException
Copyright © 2012–2020. All rights reserved.