Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Hive's taking to much time. It is normal?

Solved Go to solution

Hive's taking to much time. It is normal?

New Contributor

Hi,

I'm trying to do a select count(*) from tweets; using Hive CLI. But as you can see, it is taking to much time (i guess)

It is normal?

Any tip?

10007-hive-sql.png

Regards

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Hive's taking to much time. It is normal?

Contributor

The Tez job has not started: both the mapper and the reducer are in "pending" state and haven't yet been launched. Once launched they would enter "running" state.

Check yarn to ensure there is enough room in your queue to fit the containers (http://sandbox:8088). There isn't much ram in a sandbox, and it could all be taken up by a Spark instance or by the Tez instances of hiveserver2.

14 REPLIES 14

Re: Hive's taking to much time. It is normal?

Contributor

The Tez job has not started: both the mapper and the reducer are in "pending" state and haven't yet been launched. Once launched they would enter "running" state.

Check yarn to ensure there is enough room in your queue to fit the containers (http://sandbox:8088). There isn't much ram in a sandbox, and it could all be taken up by a Spark instance or by the Tez instances of hiveserver2.

Re: Hive's taking to much time. It is normal?

New Contributor

Jean-Phillippe, as you may guess, i am new with the Sandbox. How can i know if there's enough room in my queue to fit containers?

These are my setting.

10008-hive-sql-config.png

Re: Hive's taking to much time. It is normal?

Contributor

Since you are in a sandbox, you need to reduce the amount of memory taken by each component so that they can fit (try running with 12 GB if you can). Reduce the memory footprint as follows:

  • Tez container size = 1024 MB
  • Map join, per Map memory = 256 MB
  • Metastore heap = 512 MB
  • Client heap = 512 MB
  • Tez Client->tez.am.resource.memory.mb = 512

YARN will need to fit at least one Tez AM (512 MB) and a couple Tez containers (512MB *2). You can check how much memory is allocated to YARN on the YARN config page "Memory allocated for all YARN containers on a node".

Highlighted

Re: Hive's taking to much time. It is normal?

New Contributor

Dead Jean-Phillipe.

I tried to follow your instructions. But, as you can see is giving me headaches

"YARN will need to fit at least one Tez AM (512 MB) and a couple Tez containers (512MB *2). You can check how much memory is allocated to YARN on the YARN config page "Memory allocated for all YARN containers on a node"."

Can you please guide me please.

Regards

Re: Hive's taking to much time. It is normal?

Contributor

Hi Cristian, the amount of memory that yarn can allocate is controlled by the setting "Memory allocated for all YARN containers on a node" under YARN. Set this to 3 GB, and that should give enough room for Tez to run (it needs 2.5 GB if you follow the settings above.).

Re: Hive's taking to much time. It is normal?

New Contributor

I've placed more ram, added jar path missing and worked perfect.

Thanks for your help

Re: Hive's taking to much time. It is normal?

New Contributor

Job is not started at all. Please share more info for debugging(cluster size, query, data size, hive log, etc)

Re: Hive's taking to much time. It is normal?

New Contributor

Hi Zyang,

Can you tell me where can i find that information?

Regards

Re: Hive's taking to much time. It is normal?

New Contributor

Cluster size: yarn node -list

Hive log: /tmp/<username>/hive.log

Don't have an account?
Coming from Hortonworks? Activate your account here