资源介绍
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){
// 该列对应的索引表名字
- 上一篇: HBase二级索引
- 下一篇: HBase二级索引实现方案