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”] or task_id = default(“/taskId”, None) Thanks, Nate On Mar 16, 2015, at 2:57 AM, Satyanarayana Jampa <[email protected]<mailto:[email protected]>> wrote: 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. Thanks, Satya.
