Hello Brian,

org.apache.hadoop.yarn.api.ApplicationConstants.Environment should have a list 
of all the information set in the environment. 

One of these is the container ID. ApplicationAttemptID can be obtained from a 
container ID object which in turn can be used to get the App Id. 

-- Hitesh

On Jun 11, 2013, at 11:47 AM, Brian C. Huffman wrote:

> How can a YARN container get its own Application ID?
> 
> I tried getting the ApplicationConstants.AM_APP_ATTEMPT_ID_ENV similar to how 
> the Distributed Shell example does for the AppMaster, but that variable 
> doesn't seem to exist in the environment for the container.  Does the App 
> Master have to set it?
> 
> Thanks,
> Brian
> 

Reply via email to