ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nate Cole <>
Subject Re: how to get the task-id in the install method of the service
Date Tue, 17 Mar 2015 11:37:49 GMT
Hi Satya,

The task id is available in the command json file itself, so by the time the install() method
is invoked, you can ask for that attribute.  It is at the root element of the json called
“taskId”.  You can inspect the value using something like:

task_id = config[“taskId”]
task_id = default(“/taskId”, None)


On Mar 16, 2015, at 2:57 AM, Satyanarayana Jampa <<>>

i am writing a custom service, where in i need to get the command-<taskid>.json file
path in the "install: method of my custom service.

This file is being generated during install f the service at "/var/lib/ambari-agent/data/"

So, i need the path of this file "/var/lib/ambari-agent/data/command-<TASKID>.json"
or, it would be great if i can get the taskid of the running service in the install method.


View raw message