You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Rishi Aggarwal <ri...@hike.in> on 2017/05/21 06:13:50 UTC

How to perform hive moveTask in parallel?

I am running a insert overwrite query on an external table which is
partitioned (192 partitions).

On doing explain I see there are mainly two stage.

   1. MR stage (8 mappers and 10 reducers)
   2. Move Stage

MR stage is completing in 15-20 mins.

Move stage is taking about *3hours*.

On looking further I found, reducers are writing to a temporary location
then in move stage it's moved to target location. Move from temp to target
is happening sequentially. And since I have 192 partitions and 10 reducers.
It's taking 3 hours to move all the files.

Is there a way to do move in parallel?

Hive Version: 1.2.1

Re: How to perform hive moveTask in parallel?

Posted by Rishi Aggarwal <ri...@hike.in>.
Thanks Prasanth Jayachandran!

Will try with hive 2.1.0.

We were using Qubole with hive version 1.2.0, there file move is happening
in parallel. Any idea why it's working in qubole?



On Sun, May 21, 2017 at 11:51 AM, Prasanth Jayachandran <
pjayachandran@hortonworks.com> wrote:

> You are looking for https://issues.apache.org/jira/browse/HIVE-12988
>
> This got added from hive 2.1.0 release onwards.
>
> Thanks
> Prasanth
>
> On May 21, 2017, at 1:13 AM, Rishi Aggarwal <ri...@hike.in> wrote:
>
> I am running a insert overwrite query on an external table which is
> partitioned (192 partitions).
>
> On doing explain I see there are mainly two stage.
>
>    1. MR stage (8 mappers and 10 reducers)
>    2. Move Stage
>
> MR stage is completing in 15-20 mins.
>
> Move stage is taking about *3hours*.
>
> On looking further I found, reducers are writing to a temporary location
> then in move stage it's moved to target location. Move from temp to target
> is happening sequentially. And since I have 192 partitions and 10 reducers.
> It's taking 3 hours to move all the files.
>
> Is there a way to do move in parallel?
>
> Hive Version: 1.2.1
>
>
>

Re: How to perform hive moveTask in parallel?

Posted by Prasanth Jayachandran <pj...@hortonworks.com>.
You are looking for https://issues.apache.org/jira/browse/HIVE-12988

This got added from hive 2.1.0 release onwards.

Thanks
Prasanth

On May 21, 2017, at 1:13 AM, Rishi Aggarwal <ri...@hike.in>> wrote:


I am running a insert overwrite query on an external table which is partitioned (192 partitions).

On doing explain I see there are mainly two stage.

  1.  MR stage (8 mappers and 10 reducers)
  2.  Move Stage

MR stage is completing in 15-20 mins.

Move stage is taking about 3hours.

On looking further I found, reducers are writing to a temporary location then in move stage it's moved to target location. Move from temp to target is happening sequentially. And since I have 192 partitions and 10 reducers. It's taking 3 hours to move all the files.

Is there a way to do move in parallel?

Hive Version: 1.2.1


Re: How to perform hive moveTask in parallel?

Posted by Rishi Aggarwal <ri...@hike.in>.
Sujeet: It's gcs not s3. It might be boost performance, but since my table
is partitioned copying is not straight forward.

With Hive 2.1 files are moving in parallel. But partitioned are still moved
one at a time.

For example if there are 10 partitions and each partition has 100 files
then within a partition 100 files are moved in parallel. But at a time only
one partition is moved.

Is there a way to move partitions in parallel?




On Mon, May 22, 2017 at 11:45 AM, Sujeet Pardeshi <Su...@sas.com>
wrote:

> You should create the partitions in HDFS locally. Then move these
> partitions through a copy command on your external location (is it a S3
> bucket?). You will see a massive gain in performance.
>
>
>
> Regards,
>
> Sujeet Singh Pardeshi
>
> Software Specialist
>
> SAS Research and Development (India) Pvt. Ltd.
>
> Level 2A and Level 3, Cybercity, Magarpatta, Hadapsar  Pune, Maharashtra,
> 411 013
> *o*ff: +91-20-49118448
> [image: Description: untitled]
>
>  *"When the solution is simple, God is answering…" *
>
>
>
> *From:* Rishi Aggarwal [mailto:rishi@hike.in]
> *Sent:* 21 May 2017 AM 11:44
> *To:* user@hive.apache.org
> *Subject:* How to perform hive moveTask in parallel?
>
>
>
> *EXTERNAL*
>
> I am running a insert overwrite query on an external table which is
> partitioned (192 partitions).
>
> On doing explain I see there are mainly two stage.
>
> 1.      MR stage (8 mappers and 10 reducers)
>
> 2.      Move Stage
>
> MR stage is completing in 15-20 mins.
>
> Move stage is taking about *3hours*.
>
> On looking further I found, reducers are writing to a temporary location
> then in move stage it's moved to target location. Move from temp to target
> is happening sequentially. And since I have 192 partitions and 10 reducers.
> It's taking 3 hours to move all the files.
>
> Is there a way to do move in parallel?
>
> Hive Version: 1.2.1
>

RE: How to perform hive moveTask in parallel?

Posted by Sujeet Pardeshi <Su...@sas.com>.
You should create the partitions in HDFS locally. Then move these partitions through a copy command on your external location (is it a S3 bucket?). You will see a massive gain in performance.


Regards,

Sujeet Singh Pardeshi

Software Specialist

SAS Research and Development (India) Pvt. Ltd.
Level 2A and Level 3, Cybercity, Magarpatta, Hadapsar  Pune, Maharashtra, 411 013
off: +91-20-49118448
[Description: untitled]
 "When the solution is simple, God is answering…"

From: Rishi Aggarwal [mailto:rishi@hike.in]
Sent: 21 May 2017 AM 11:44
To: user@hive.apache.org
Subject: How to perform hive moveTask in parallel?


EXTERNAL

I am running a insert overwrite query on an external table which is partitioned (192 partitions).

On doing explain I see there are mainly two stage.
1.      MR stage (8 mappers and 10 reducers)
2.      Move Stage

MR stage is completing in 15-20 mins.

Move stage is taking about 3hours.

On looking further I found, reducers are writing to a temporary location then in move stage it's moved to target location. Move from temp to target is happening sequentially. And since I have 192 partitions and 10 reducers. It's taking 3 hours to move all the files.

Is there a way to do move in parallel?

Hive Version: 1.2.1