How to use indexing in the hive?

I wrote a custom index handler and wanted to test it. However, the bush does not use it. So I checked with a simple table (pokes (int foo, string bar)) that comes with the distribution of the bushes for testing purposes. Then I created a compact index and set set hive.optimize.index.filter=true; However, after checking the log information, it seems that the hive still does not use the index. So what's the problem? Your query: select foo from pokes WHERE foo=498

Below is the log information I received after issuing the request.

 12/07/26 12:25:17 INFO index.IndexWhereProcessor: Processing predicate for index optimization 12/07/26 12:25:17 INFO index.IndexWhereProcessor: (foo = 498) 12/07/26 12:25:17 INFO metastore.HiveMetaStore: 0: get_table : db=default tbl=pokes_idx 12/07/26 12:25:17 INFO hive.log: DDL: struct pokes_idx { i32 foo, string _bucketname, list<i64> _offsets} 12/07/26 12:25:17 INFO index.IndexWhereProcessor: checking index staleness... 12/07/26 12:25:17 INFO index.IndexWhereProcessor: 1342465077455 12/07/26 12:25:17 INFO index.IndexWhereProcessor: 1342465077455 12/07/26 12:25:17 INFO util.NativeCodeLoader: Loaded the native-hadoop library 12/07/26 12:25:17 WARN snappy.LoadSnappy: Snappy native library not loaded 
+4
source share

All Articles