I'm trying out a a YARN service application with Docker on HDP3.0.
I execute a script inside the Docker container, and it completes with status 0 after a while. I want the application to end when this happens.
But YARN keeps spawning a new container whenever a container completes. Is this the intended behavior?
I can see this log in serviceam.log
2018-08-26 04:29:30,193 [Component dispatcher] INFO component.Component - [COMPONENT mycomp] Transitioned from STABLE to FLEXING on CONTAINER_COMPLETED event.
How do I tell YARN that my application has successfully completed?
You can configure a restart policy for each component. Add a field like the following:
The available restart policies are ALWAYS, ON_FAILURE, and NEVER. The default policy is ALWAYS.
View solution in original post