hbase创建二级索引

时间:2021-02-11 08:23:50
【文件属性】:

文件名称:hbase创建二级索引

文件大小:5KB

文件格式:TXT

更新时间:2021-02-11 08:23:50

hbase 索引 二级索引 代码

public class IndexBuilder3 extends Configured{ public static class MapperIndex extends TableMapper{ private String tableName; private String columnFamily; private String[] qualifiers; //列为key,索引表表名为value private Map indexs = new HashMap(); @SuppressWarnings("deprecation") @Override protected void map(ImmutableBytesWritable key, Result value, Context context) throws IOException, InterruptedException { //获取所有需要建索引的列 Set keys = indexs.keySet(); for (byte[] k:keys){ // 该列对应的索引表名字


网友评论