[
https://issues.apache.org/jira/browse/SLIDER-924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14659116#comment-14659116
]
Gour Saha commented on SLIDER-924:
----------------------------------
Yong,
The container_id can be accessed as
config['hostLevelParams']['container_id¹] in params.py. Take a look at
this for an example -
https://github.com/apache/incubator-slider/blob/develop/app-packages/comman
d-logger/slider-pkg/package/scripts/params.py
<https://github.com/apache/incubator-slider/blob/develop/app-packages/command-logger/slider-pkg/package/scripts/params.py>
You should be able to use this to configure your metrics2 properties
template.
Let me know if it does not solve your problem.
-Gour
> Support YARN ContainerID as Environment Variable for Slider Application
> Instance
> --------------------------------------------------------------------------------
>
> Key: SLIDER-924
> URL: https://issues.apache.org/jira/browse/SLIDER-924
> Project: Slider
> Issue Type: Improvement
> Components: agent, appmaster
> Affects Versions: Slider 0.80
> Reporter: YONG FENG
>
> When using Slider to manage long running service and Metric2 sink to collect
> metrics of those long running service, user could use metrics attributes of
> AppName, ComponentName and HostName to associate a metric record to an
> service instance.
> It works well if there is only one instance in each host. However if multiple
> instances of the service are running in the same host, the tuple of (AppName,
> ComponentName, Hostname) is not enough to identify an service instance
> uniquely.
> If Slider supports YARN ContainerID as Environment Variable for Slider
> Application Instance just like COMPONENT_NAME, user could configure
> CONTAINER_ID as configuration parameter for Metric2 sink. In that way, the
> metrics attribute of ContainerID could be used to associate a metric record
> to an service instance uniquely.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)