You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by Sajid Syed <sa...@gmail.com> on 2014/12/18 05:13:39 UTC

How to handle Container crash in YARN

Hello,

Can any please explain me how to handle/Resolve the Container crash in YARN
Hadoop.

Thanks
Sajid Syed

RE: How to handle Container crash in YARN

Posted by Rahul Chhiber <ra...@cumulus-systems.com>.
Sajid,

Check the logs for your container at $HADOOP_INSTALL_DIR/logs/userlogs/<application_id>/<container_id>. Note that these will be present on the node where your Application Master is running.

If the container was not able to start, you might get something by printing the stack trace in onStartContainerError(ContainerId containerId, Throwable t) callback method in the NMClientAsync.CallbackHandler interface.

You should always be capturing the exit status of the container inside onContainersCompleted(List<ContainerStatus> completedContainers) callback method of AMRMClientAsync.CallbackHandler interface.

Please see the source of Distributed Shell application on github for an example of how this is done - https://github.com/apache/hadoop-common/tree/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell

Regards,
Rahul Chhiber

From: Sajid Syed [mailto:sajidmca@gmail.com]
Sent: Thursday, December 18, 2014 9:44 AM
To: user@hadoop.apache.org
Subject: How to handle Container crash in YARN

Hello,

Can any please explain me how to handle/Resolve the Container crash in YARN Hadoop.

Thanks
Sajid Syed

RE: How to handle Container crash in YARN

Posted by Rahul Chhiber <ra...@cumulus-systems.com>.
Sajid,

Check the logs for your container at $HADOOP_INSTALL_DIR/logs/userlogs/<application_id>/<container_id>. Note that these will be present on the node where your Application Master is running.

If the container was not able to start, you might get something by printing the stack trace in onStartContainerError(ContainerId containerId, Throwable t) callback method in the NMClientAsync.CallbackHandler interface.

You should always be capturing the exit status of the container inside onContainersCompleted(List<ContainerStatus> completedContainers) callback method of AMRMClientAsync.CallbackHandler interface.

Please see the source of Distributed Shell application on github for an example of how this is done - https://github.com/apache/hadoop-common/tree/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell

Regards,
Rahul Chhiber

From: Sajid Syed [mailto:sajidmca@gmail.com]
Sent: Thursday, December 18, 2014 9:44 AM
To: user@hadoop.apache.org
Subject: How to handle Container crash in YARN

Hello,

Can any please explain me how to handle/Resolve the Container crash in YARN Hadoop.

Thanks
Sajid Syed

RE: How to handle Container crash in YARN

Posted by Rahul Chhiber <ra...@cumulus-systems.com>.
Sajid,

Check the logs for your container at $HADOOP_INSTALL_DIR/logs/userlogs/<application_id>/<container_id>. Note that these will be present on the node where your Application Master is running.

If the container was not able to start, you might get something by printing the stack trace in onStartContainerError(ContainerId containerId, Throwable t) callback method in the NMClientAsync.CallbackHandler interface.

You should always be capturing the exit status of the container inside onContainersCompleted(List<ContainerStatus> completedContainers) callback method of AMRMClientAsync.CallbackHandler interface.

Please see the source of Distributed Shell application on github for an example of how this is done - https://github.com/apache/hadoop-common/tree/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell

Regards,
Rahul Chhiber

From: Sajid Syed [mailto:sajidmca@gmail.com]
Sent: Thursday, December 18, 2014 9:44 AM
To: user@hadoop.apache.org
Subject: How to handle Container crash in YARN

Hello,

Can any please explain me how to handle/Resolve the Container crash in YARN Hadoop.

Thanks
Sajid Syed

RE: How to handle Container crash in YARN

Posted by Rahul Chhiber <ra...@cumulus-systems.com>.
Sajid,

Check the logs for your container at $HADOOP_INSTALL_DIR/logs/userlogs/<application_id>/<container_id>. Note that these will be present on the node where your Application Master is running.

If the container was not able to start, you might get something by printing the stack trace in onStartContainerError(ContainerId containerId, Throwable t) callback method in the NMClientAsync.CallbackHandler interface.

You should always be capturing the exit status of the container inside onContainersCompleted(List<ContainerStatus> completedContainers) callback method of AMRMClientAsync.CallbackHandler interface.

Please see the source of Distributed Shell application on github for an example of how this is done - https://github.com/apache/hadoop-common/tree/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell

Regards,
Rahul Chhiber

From: Sajid Syed [mailto:sajidmca@gmail.com]
Sent: Thursday, December 18, 2014 9:44 AM
To: user@hadoop.apache.org
Subject: How to handle Container crash in YARN

Hello,

Can any please explain me how to handle/Resolve the Container crash in YARN Hadoop.

Thanks
Sajid Syed