hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Furcy Pin <>
Subject Re: How to move tasks under reducer to Mapper phase
Date Sat, 10 Dec 2016 08:41:02 GMT
Hi Mahender,

it's hard to say what happen without seeing the actual query.

Hive has several ways to perform joins. There is a complete description of
how it does it here:
Sadly, the illustrations are broken.

There is also this presentation :

And the corresponding slides :

However, these docs are from the Map-Reduce era and quite old now.
So it is hard to tell if everything works the same way with Tez today.

If all your tables are big, I would say there is not much to optimize
except trying to bucket and sort them before.

Last but not least:

When I get this kind of behavior (reducer stuck during a JOIN), more often
than not,
it is simply because the JOIN clause is incorrect, and the reducer
generates way too much data.

Just imagine what would happen if you did a "JOIN ON 1 = 1"
between two tables with 10^9 records... you can actually kill a cluster
with this,
if you let it run long enough.

On Fri, Dec 9, 2016 at 10:31 PM, Mahender Sarangam <> wrote:

> Hi,
> We are performing left joining on 5-6 larger tables. We see job is hanging
> around 95%. All the mappers completed fast and some of the reducer are also
> completed fast. but some of reducer are hanging state because single task
> is running on large data. Below are the Mapper and Reducer captured.
>    - Is there a way to move task running under Reducer phase to Mapper
>    phase. I mean tweaking with memory settings or modifying the query to have
>    more mapper tasks than reducer task.
>    - Is there a way to know what part of query is taken by task which is
>    running for long time. or what amount of rows this task is running upon (
>    so that i can think of partition or alternate approach)
>    - Any other memory setting to resolve hanging issue. Below is our
>    memory settings
> SET hive.tez.container.size = -1;
> SET hive.execution.engine=tez;
> SET hive.mapjoin.hybridgrace.hashtable=FALSE;
> SET hive.optimize.ppd=true;
> SET hive.cbo.enable =true;
> SET hive.compute.query.using.stats =true;
> SET hive.exec.parallel=true;
> SET hive.vectorized.execution.enabled=true;
> SET hive.exec.dynamic.partition=true;
> SET hive.exec.dynamic.partition.mode=nonstrict;
> SET;
> SET;
> set = "-Xmx3481m";
> set hive.tez.container.size = 4096;
> --SET;
> --SET = -Xmx3000M;
> --SET mapreduce.reduce.memory.mb = 2048;
> --SET = -Xmx1630M;
> SET fs.block.size=67108864;
> Thanks in advance
> -Mahender

View raw message