You can enable namespace mapping by configuring a set of properties using Cloudera
Manager.
After you set the properties to enable the mapping of Phoenix schemas to
HBase namespaces, reverting the property settings renders the Phoenix database
unusable. Test or carefully plan the Phoenix to HBase namespace mappings before
implementing them.
To enable Phoenix schema mapping to a non-default HBase namespace:
Go to the HBase service.
Click the Configuration tab.
Select Scope > (Service-Wide).
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 Scope > Gateway.
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.