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.

How do I stop beeline holding onto YARN containers after a job (performing a hive insert into) has successfully run?

Solved Go to solution
Highlighted

How do I stop beeline holding onto YARN containers after a job (performing a hive insert into) has successfully run?

Contributor

Hi,

When I run an insert into command through beeline Hive/Tez requests 2 containers. Once beeline reports that the row was successfully inserted in to the table I see that the job created (seen in the YARN Manager UI) is still running and holds on to one of the two containers, when I terminate beeline the job listed in the Manager UI then lists as completed.

Why is this happening and how can I change my hadoop configuration to stop this happening?

Thanks,

Mike

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: How do I stop beeline holding onto YARN containers after a job (performing a hive insert into) has successfully run?

Super Guru

@mike harding check if you have tez reuse container turned on

tez.am.container.reuse.enabled=true
Configuration that specifies whether a container should be reused.

This allow other application to reuse tez containers to increase performance. turn it off if you are not interested in that functinoality.

View solution in original post

5 REPLIES 5
Highlighted

Re: How do I stop beeline holding onto YARN containers after a job (performing a hive insert into) has successfully run?

Super Guru

@mike harding check if you have tez reuse container turned on

tez.am.container.reuse.enabled=true
Configuration that specifies whether a container should be reused.

This allow other application to reuse tez containers to increase performance. turn it off if you are not interested in that functinoality.

View solution in original post

Highlighted

Re: How do I stop beeline holding onto YARN containers after a job (performing a hive insert into) has successfully run?

Super Guru

what is

tez.am.session.min.held-containers

set to?

Highlighted

Re: How do I stop beeline holding onto YARN containers after a job (performing a hive insert into) has successfully run?

Contributor

..I found that in my ambari settings this was not specified - on setting this to 0 and setting tez.session.am.dag.submit.timeout.secs to a smaller amount gave me the behaviour i was looking for.

Highlighted

Re: How do I stop beeline holding onto YARN containers after a job (performing a hive insert into) has successfully run?

Contributor

@Sunile Manjee I checked this and it is false. The remaining container seems to be the application master. When I run the Hive jobs via MapReduce2 they complete fine, its just when they are run in Tez I see this behaviour.

Highlighted

Re: How do I stop beeline holding onto YARN containers after a job (performing a hive insert into) has successfully run?

Rising Star

@mike harding to add to this, Tez by default first initializes an AM whereas MapReduce does so at submission only. This is the reason you see the behavior you describe. The tez container has a timeout setting as you stated and that will determine how long lived that initial AM is

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