How does Hive decide when to use map reduce and when not to?

前端 未结 4 685
谎友^
谎友^ 2020-12-09 20:57

As a simple example,

select * from tablename;

DOES NOT kick in map reduce, while

select count(*) from tablename;

4条回答
  •  既然无缘
    2020-12-09 21:44

    In general, any sort of aggregation, such as min/max/count is going to require a MapReduce job. This isn't going to explain everything for you, probably.

    Hive, in the style of many RDBMS, has an EXPLAIN keyword that will outline how your Hive query gets translated into MapReduce jobs. Try running explain on both your example queries and see what it is trying to do behind the scenes.

提交回复
热议问题