Hey Jae,

We expose this in SamzaContainerContext. Unfortunately, this class never
gets exposed to the StreamTask. The plan was to expose this class via
TaskContext, but we haven't done that yet.

Have you tried using System.getProperty("samza.container.id")?

Cheers,
Chris

On Thu, Mar 5, 2015 at 4:41 PM, Bae, Jae Hyeon <metac...@gmail.com> wrote:

> Hi Samza devs
>
> How can I get container id such as 0, 1, 2, ... up to yarn.container.count?
>
> I tried to get some environment variable but it didn't work well.
>
> If it's not easy to get the container id, I have to use process id to
> distinguish containers from the same job running in the same machine but
> container id will be more useful than process id.
>
> Thank you
> Best, Jae
>

Reply via email to