3.如何卸载二级索引?
环境:hadoop2.2+hbase0.94不过同样应该适用于hadoop2.4及hbase0.985,未测试
二级索引可以对单个表建立索引,也可以全局建立索引,也就是对所有表:
1.全局建立索引,可以修改hbase-site.xml文件
<property> <name>hbase.coprocessor.region.classes</name> <value>org.apache.hadoop.hbase.coprocessor.AggregateImplementation</value> </property> 为所有table加载了一个cp class,可以用”,”分割加载多个class
alter 'LogTable', METHOD => 'table_att_unset', NAME => 'coprocessor$1‘3.enable '表名'
alter 'LogTable', METHOD => 'table_att_unset', NAME => 'coprocessor$1‘
alter 'LogTable',METHOD=>'table_att','coprocessor'=>'hdfs:///test.jar|www.aboutyun.com.hbase.HbaseCoprocessor|1001'
查看是否创建成功
HBaseCoprocessor pdf
转载http://www.aboutyun.com/forum.php?mod=viewthread&tid=8857&highlight=hbase%2B%B6%FE%BC%B6