Mapping Phoenix Schemas to HBase Namespaces
You can map a Phoenix schema to an HBase namespace to gain multitenancy features in Phoenix.
HBase, the underlying storage engine for Phoenix, has namespaces to support multi-tenancy features. Multitenancy helps an HBase user or administrator to perform access control and quota management tasks. Also, namespaces enable tighter control of where a particular data set is stored on RegionsServers.
Enabling Namespace Mapping
Minimum Required Role: Configurator (also provided by Cluster Administrator, Full Administrator)
You can enable namespace mapping by configuring a set of properties using Cloudera Manager.
To enable Phoenix schema mapping to a non-default HBase namespace:
- Go to the HBase service.
- Click the Configuration tab.
- Select .
- Locate the HBase Service Advanced Configuration Snippet (Safety Valve) for hbase-site.xml property or search for it by typing its name in the Search box.
- Add the following property values:
Name: phoenix.schema.isNamespaceMappingEnabled
Description: Enables mapping of tables of a Phoenix schema to a non-default HBase namespace. To enable mapping of a schema to a non-default namespace, set the value of this property to true. The default setting for this property is false.
Value: true
Name: phoenix.schema.mapSystemTablesToNamespace
Description: With true setting (default): After namespace mapping is enabled with the other property, all system tables, if any, are migrated to a namespace called system.With false setting: System tables are associated with the default namespace.
Value: true.
- Select .
- Locate the HBase Client Advanced Configuration Snippet (Safety Valve) for hbase-site.xml property or search for it by typing its name in the Search box.
- Add the following property values:
Name: phoenix.schema.isNamespaceMappingEnabled
Description: Enables mapping of tables of a Phoenix schema to a non-default HBase namespace. To enable mapping of the schema to a non-default namespace, set the value of this property to true. The default setting for this property is false.
Value: true
Name: phoenix.schema.mapSystemTablesToNamespace
Description: With true setting (default): After namespace mapping is enabled with the other property, all system tables, if any, are migrated to a namespace called system.With false setting: System tables are associated with the default namespace.
Value: true.
- Enter a Reason for change, and then click Save Changes to commit the changes.
- Restart the role and service when Cloudera Manager prompts you to restart.