You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by "Hezhiqiang (Ransom)" <ra...@huawei.com> on 2012/05/14 04:10:13 UTC
how to create index on hbase?
Hi all
I want to create index on hbase, but it was faild .
This is the sql. How to create index on HBase?
create index i_hhive on hhive(c1,c2) as "compact" with deferred rebuild STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf1:val,cf1:val2,cf1:val3") TBLPROPERTIES ("hbase.table.name" = "xyz");
When rebuild index,throws exception.
hive> ALTER INDEX i_txt_hhive ON hhive1 REBUILD;
FAILED: Error in semantic analysis: org.apache.hadoop.hive.ql.metadata.HiveException: must specify an InputFormat class
Best regards
Ransom.
Re: how to create index on hbase?
Posted by Abhishek Pratap Singh <ma...@gmail.com>.
Does Hbase support secondary indexes? I don't think so!!! I m not sure you
can create indexes in Hbase even if it is integrated with hive.
Regards,
Abhishek
On Sun, May 13, 2012 at 7:10 PM, Hezhiqiang (Ransom) <
ransom.hezhiqiang@huawei.com> wrote:
> Hi all
> I want to create index on hbase, but it was faild .
> This is the sql. How to create index on HBase?
>
> create index i_hhive on hhive(c1,c2) as "compact" with deferred rebuild
> STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
> WITH SERDEPROPERTIES ("hbase.columns.mapping" =
> ":key,cf1:val,cf1:val2,cf1:val3") TBLPROPERTIES ("hbase.table.name" =
> "xyz");
>
> When rebuild index,throws exception.
> hive> ALTER INDEX i_txt_hhive ON hhive1 REBUILD;
> FAILED: Error in semantic analysis:
> org.apache.hadoop.hive.ql.metadata.HiveException: must specify an
> InputFormat class
>
> Best regards
> Ransom.
>