You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by min zou <zo...@gmail.com> on 2017/01/19 09:34:55 UTC
hive query plain has not index description
hi, i have created a table hive_hbase_visitor2 in hive, and created an
index on the table,but when i execute the query plan about *select ** from
hive_hbase_visitor2 where name='knlf', the description of index was not
found, did the index not succeed?
*create index hive_hbase_visitor2_index on table hive_hbase_visitor2(name)
as 'org.apache.hadoop.hive.ql.index.compact.CompactIndexHandler' WITH
DEFERRED REBUILD in table hive_index_table;*
*alter index hive_hbase_visitor2_index on hive_hbase_visitor2 rebuild;*
*hive> explain select * from hive_hbase_visitor2 where name='knlf';*
*OK*
*STAGE DEPENDENCIES:*
* Stage-1 is a root stage*
* Stage-0 depends on stages: Stage-1*
*STAGE PLANS:*
* Stage: Stage-1*
* Map Reduce*
* Map Operator Tree:*
* TableScan*
* alias: hive_hbase_visitor2*
* Statistics: Num rows: 33082940 Data size: 661658800 Basic
stats: COMPLETE Column stats: NONE*
* Filter Operator*
* predicate: (name = 'knlf') (type: boolean)*
* Statistics: Num rows: 16541470 Data size: 330829400 Basic
stats: COMPLETE Column stats: NONE*
* Select Operator*
* expressions: id (type: string), 'knlf' (type: string), age
(type: int), sex (type: string)*
* outputColumnNames: _col0, _col1, _col2, _col3*
* Statistics: Num rows: 16541470 Data size: 330829400 Basic
stats: COMPLETE Column stats: NONE*
* File Output Operator*
* compressed: false*
* Statistics: Num rows: 16541470 Data size: 330829400
Basic stats: COMPLETE Column stats: NONE*
* table:*
* input format:
org.apache.hadoop.mapred.TextInputFormat*
* output format: org.apache.hadoop.hive.ql.io
<http://org.apache.hadoop.hive.ql.io>.HiveIgnoreKeyTextOutputFormat*
* serde:
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe*
* Stage: Stage-0*
* Fetch Operator*
* limit: -1*
* Processor Tree:*
* ListSink*
*Time taken: 0.173 seconds, Fetched: 32 row(s)*
Re: hive query plain has not index description
Posted by min zou <zo...@gmail.com>.
it's fixed, as the params were not work.
2017-01-19 17:34 GMT+08:00 min zou <zo...@gmail.com>:
> hi, i have created a table hive_hbase_visitor2 in hive, and created an
> index on the table,but when i execute the query plan about *select ** from
> hive_hbase_visitor2 where name='knlf', the description of index was not
> found, did the index not succeed?
>
> *create index hive_hbase_visitor2_index on table
> hive_hbase_visitor2(name) as
> 'org.apache.hadoop.hive.ql.index.compact.CompactIndexHandler' WITH DEFERRED
> REBUILD in table hive_index_table;*
> *alter index hive_hbase_visitor2_index on hive_hbase_visitor2 rebuild;*
>
>
> *hive> explain select * from hive_hbase_visitor2 where name='knlf';*
> *OK*
> *STAGE DEPENDENCIES:*
> * Stage-1 is a root stage*
> * Stage-0 depends on stages: Stage-1*
>
> *STAGE PLANS:*
> * Stage: Stage-1*
> * Map Reduce*
> * Map Operator Tree:*
> * TableScan*
> * alias: hive_hbase_visitor2*
> * Statistics: Num rows: 33082940 Data size: 661658800 Basic
> stats: COMPLETE Column stats: NONE*
> * Filter Operator*
> * predicate: (name = 'knlf') (type: boolean)*
> * Statistics: Num rows: 16541470 Data size: 330829400 Basic
> stats: COMPLETE Column stats: NONE*
> * Select Operator*
> * expressions: id (type: string), 'knlf' (type: string),
> age (type: int), sex (type: string)*
> * outputColumnNames: _col0, _col1, _col2, _col3*
> * Statistics: Num rows: 16541470 Data size: 330829400 Basic
> stats: COMPLETE Column stats: NONE*
> * File Output Operator*
> * compressed: false*
> * Statistics: Num rows: 16541470 Data size: 330829400
> Basic stats: COMPLETE Column stats: NONE*
> * table:*
> * input format:
> org.apache.hadoop.mapred.TextInputFormat*
> * output format: org.apache.hadoop.hive.ql.io
> <http://org.apache.hadoop.hive.ql.io>.HiveIgnoreKeyTextOutputFormat*
> * serde:
> org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe*
>
> * Stage: Stage-0*
> * Fetch Operator*
> * limit: -1*
> * Processor Tree:*
> * ListSink*
>
> *Time taken: 0.173 seconds, Fetched: 32 row(s)*
>