0

I don't need "container id" or "App Attempt Id".

On the documentation I see we can put ${samza.log.dir} for the log4j config and this path contain the application id. It's like /foo/log/../application_id_123

MaximeF
  • 4,913
  • 4
  • 37
  • 51

1 Answers1

0

I found a solution, if you know an better solution you can reply.

 final String samzaLogDir = System.getProperty("samza.log.dir");
 final String[] samzaLogDirSplit = samzaLogDir.split("/");
 final String applicationId = samzaLogDirSplit[samzaLogDirSplit.length - 2];
MaximeF
  • 4,913
  • 4
  • 37
  • 51