Namespace Mapping

从4.8.0版本开始,Phoenix支持将模式映射到命名空间,使得带有模式创建的表会映射到HBase对应的命名空间。此特性需在客户端和服务端同时启用,并且一旦启用不可回滚。支持的语法包括创建、使用和删除命名空间。

Namespace Mapping

From v4.8.0 onwards, user can enable to map it’s schema to the namespace so that any table created with schema will be created in the corresponding namespace of HBase

Configuration

Parameters to enable namespace mapping:-

Property

Description

Default

phoenix.schema.isNamespaceMappingEnabled

If it is enabled, then the tables created with schema will be mapped to namespace.This needs to be set at client and server both. if set once, should not be rollback. Old client will not work after this property is enabled.

false

phoenix.schema.mapSystemTablesToNamespace

Enabling this property will take affect when phoenix.connection.isNamespaceMappingEnabled is also set to true. If it is enabled, SYSTEM tables if present will automatically migrated to SYSTEM namespace. And If set to false , then system tables will be created in default namespace only. This needs to be set at client and server both.

true

Grammer Available

Following DDL statements can be used to interact with schema.


   CREATE SCHEMA. IF NOT EXISTS  schemaName










   Use schema

 

 Drop if exists schema name


How to migrate existing tables with schema to namespace

Usage example:

Move table(‘table_name’) to namespace of name ‘schema_name’

$  bin/psql.py <zookeeper> -m <schema_name>.<table_name>


What is namespace and benefits of mapping table to namespace

A namespace is a logical grouping of tables analogous to a database in relation database systems. This abstraction lays the groundwork for upcoming multi-tenancy related features:

  • Quota Management - Restrict the amount of resources (i.e. regions, tables) a namespace can consume.
  • Namespace Security Administration - Provide another level of security administration for tenants.
  • Region server groups - A namespace/table can be pinned onto a subset of RegionServers thus guaranteeing a course level of isolation.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值