• phoenix创建二级索引


    create table user (id varchar primary key, firstname varchar, lastname varchar); 
    create index user_idx on user (firstname);

    hbase-site.xml中配置

            <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>
    
            <property>
              <name>hbase.coprocessor.regionserver.classes</name>
              <value>org.apache.hadoop.hbase.regionserver.LocalIndexMerger</value> 
            </property>

    否则报错

    Error: ERROR 1029 (42Y88): Mutable secondary indexes must have the hbase.regionserver.wal.codec property set to
    org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec in the hbase-sites.xml of every region server. tableName=LAYER_IDX (state=42Y88,code=1029)

  • 相关阅读:
    springboot启动后执行某些动作
    Virtualbox的nat网络
    xshell6
    day01 K8S
    Nginx的日志文件切割
    virtualbox磁盘空间大小调整
    装修柜子木台面
    mybatis 批量in 多个字段写法
    jenkins shell常用配置
    activiti工作流引擎数据库表结构
  • 原文地址:https://www.cnblogs.com/nshuai/p/5805929.html
Copyright © 2020-2023  润新知