zoukankan      html  css  js  c++  java
  • hive索引表

    create table index_tmp(id int,name string,dt string) row format delimited fields terminated by ',' stored as textfile;


    load data local inpath '/usr/local/hivelog/index.txt' into table index_tmp;

     partition模式为不严谨

    set hive.exec.dynamic.partition.mode=nonstrict;

    打开动态partition

    set hive.exec.dynamic.partition=true;

    insert overwrite table index_test partition(dt) select id,name,dt from index_tmp;

        创建索引表

    create index index_dom01 on table index_test(id) as 'org.apache.hadoop.hive.ql.index.compact.CompactIndexHandler' with deferred rebuild;

    alter index index_dom01  on index_test rebuild;
                    查看索引
    show index on index_test; 
                    删除索引
     drop index index_dom01 on index_test;  

  • 相关阅读:
    js自动小轮播
    js字符串
    工资
    可是姑娘,你为什么要编程呢?
    程序猿媳妇儿注意事项
    js勾选时显示相应内容
    js点击显示隐藏
    js选项卡
    js数组
    js旋转V字俄罗斯方块
  • 原文地址:https://www.cnblogs.com/yaohaitao/p/5857205.html
Copyright © 2011-2022 走看看