Enable namespace mapping

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:

  1. Go to the HBase service.
  2. Click the Configuration tab.
  3. Select Scope > (Service-Wide).
  4. 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.
  5. 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

  6. Select Scope > Gateway.
  7. 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.
  8. 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

  9. Enter a Reason for change, and then click Save Changes to commit the changes.
  10. Restart the role and service when Cloudera Manager prompts you to restart.