创建二级索引(需要分发给所有机器)
--------------------------------------------------1.修改配置(每台机器的hbase-site.xml 都需要修改)
根据不同的phoenix版本进行不同配置 以下配置 仅针对phoenix版本在4.8 及以上版本 配置使用<property> <name>hbase.regionserver.wal.codec</name> <value>org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec</value> </property> <property> <name>hbase.region.server.rpc.scheduler.factory.class</name> <value>org.apache.hadoop.hbase.ipc.PhoenixRpcSchedulerFactory</value> <description>Factory to create the Phoenix RPC Scheduler that uses separate queues for index and Metadata updates</description> </property> <property> <name>hbase.rpc.controllerfactory.class</name> <value>org.apache.hadoop.hbase.ipc.controller.ServerRpcControllerFactory</value> <description>Factory to create the Phoenix RPC Scheduler that uses separate queues for index and Metadata updates</description> </property>
----------------------------------------
2.重启hbase集群
3.进入sqlline.py
创建索引(如果索引带特殊字符,需用“”) create index "idx_ns1.test_name" on ns1.test(name) ; 删除索引 drop index IDX_NS1_TEST_NAME on ns1.test ; client 通过jdbc方式访问phoenix ---------------------------------- 1.创建模块引入pom.xml
.png)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。