samza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Riccomini <criccom...@apache.org>
Subject Re: How to get Container ID from configuration
Date Fri, 06 Mar 2015 01:08:10 GMT
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 <metacret@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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message