For HBase version 1.1 and later, a default database configuration determines whether clients connect to HBase tables or HPE Ezmeral Data Fabric Database tables. You can change the default setting for all HBase clients, or you can set the database for a particular job. This setting is ignored for HBase 0.98.12 client connections.
configure.sh automatically sets the default database for a
node based on the presence of the following mapr packages:mapr-hbase-mastermapr-hbase-regionserverconfigure.sh also provides a parameter that you can use to
set the default database. To explicitly set the default database to either
maprdb or hbase, run
configure.sh with the -defaultdb
parameter. For
example:configure.sh -R -defaultdb maprdbconfigure.sh
commands on the default database setting:
| If ... | And you run
configure.sh with the following
‑defaultdb parameter ... |
||
|---|---|---|---|
No ‑defaultdb parameter
specified |
‑defaultdb hbase |
‑defaultdb maprdb |
|
hbasemaster or
hbaseregionserver is installed on a
node |
The default database is set to
hbase. |
The default database is set to
hbase |
The default database is set to hbase,
and the maprdb setting is ignored. |
hbasemaster and
hbaseregionserver are NOT installed on
a node |
The default database is set to
maprdb. |
The default database is set to hbase.
However, this configuration does not work because HBase is
not running. |
The default database is set to
maprdb. |
For more information about configure.sh, see
configure.sh.
mapr.hbase.default.db property in the
hbase-site.xml to override the default database that is set for
the cluster:Configuration conf = HBaseConfiguration.create();
conf.set("mapr.hbase.default.db", "maprdb");
Connection connection = ConnectionFactory.createConnection(conf);
Table table = connection.getTable(<TABLE_NAME>);Configuration conf = HBaseConfiguration.create();
conf.set("mapr.hbase.default.db","hbase");
Connection connection = ConnectionFactory.createConnection(conf);
Table table = connection.getTable(<TABLE_NAME>);