zoukankan      html  css  js  c++  java
  • 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)

  • 相关阅读:
    第一章 jQuery基础方法回顾
    php无法执行python
    echarts
    logstash配置
    storm结合kafka
    spark中读取elasticsearch数据
    hadoop中读取protobuf数据
    spark1.3.1配置模板
    hadoop2.6.0配置模板
    使用jnetpcap捕获数据包进行流量检测
  • 原文地址:https://www.cnblogs.com/nshuai/p/5805929.html
Copyright © 2011-2022 走看看