<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Oozie Workflow: Get running action name in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Workflow-Get-running-action-name/m-p/34112#M40709</link>
    <description>Could you share a sample request URL and output received?&lt;BR /&gt;&lt;BR /&gt;It seems to work OK for me, for ex. for my WF ID of "0000000-151116211358117-oozie-oozi-W":&lt;BR /&gt;&lt;BR /&gt;~&amp;gt; curl -L 'http://localhost:11000/oozie/v2/job/0000000-151116211358117-oozie-oozi-W' &amp;gt; wf.json&lt;BR /&gt;~&amp;gt; python&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; import json&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; a = json.loads(open('wf.json').read())&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; len(a['actions'])&lt;BR /&gt;2&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; a['actions'][1]['name']&lt;BR /&gt;u'Shell'&lt;BR /&gt;&lt;BR /&gt;FWIW, Hue today uses the same API for its Oozie app dashboards, and it does fetch all actions properly too.&lt;BR /&gt;&lt;BR /&gt;How old is the targeted WF, and are you able to see the list of actions OK in the web UIs?</description>
    <pubDate>Mon, 16 Nov 2015 16:27:20 GMT</pubDate>
    <dc:creator>Harsh J</dc:creator>
    <dc:date>2015-11-16T16:27:20Z</dc:date>
    <item>
      <title>Oozie Workflow: Get running action name</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Workflow-Get-running-action-name/m-p/33951#M40706</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to fetch the name of the running action in a oozie workflow. I know we can get the workflow level details by using a REST Request as given &lt;A href="https://blog.cloudera.com/blog/2013/06/how-to-use-the-apache-oozie-rest-api/" target="_blank"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But i did not have any luck in getting more detailed drilled down info of a workflow.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone please help me out on this ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 09:48:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Workflow-Get-running-action-name/m-p/33951#M40706</guid>
      <dc:creator>chiragvaya</dc:creator>
      <dc:date>2022-09-16T09:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie Workflow: Get running action name</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Workflow-Get-running-action-name/m-p/34084#M40707</link>
      <description>What API end point have you tried, specifically? It appears you are looking for this one &lt;A href="http://archive.cloudera.com/cdh5/cdh/5/oozie/WebServicesAPI.html#Job_Information" target="_blank"&gt;http://archive.cloudera.com/cdh5/cdh/5/oozie/WebServicesAPI.html#Job_Information&lt;/A&gt;</description>
      <pubDate>Sat, 14 Nov 2015 16:56:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Workflow-Get-running-action-name/m-p/34084#M40707</guid>
      <dc:creator>Harsh J</dc:creator>
      <dc:date>2015-11-14T16:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie Workflow: Get running action name</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Workflow-Get-running-action-name/m-p/34103#M40708</link>
      <description>&lt;P&gt;Thanks Harsh.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been using the same Job Information as you mentioned. I guess you are referring to the actions in the JSON returned. But actions is coming as empty for all workflows.&lt;/P&gt;&lt;P&gt;Do i need to do something extra to get action level information ?&lt;/P&gt;&lt;P&gt;Edit: By actions i mean the individual actions that we define in the workflow XML. I am using a normal job.properties file as configuration and not a coordinator.&lt;/P&gt;&lt;P&gt;In other words it can mean the access to Job DAG.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2015 10:19:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Workflow-Get-running-action-name/m-p/34103#M40708</guid>
      <dc:creator>chiragvaya</dc:creator>
      <dc:date>2015-11-16T10:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie Workflow: Get running action name</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Workflow-Get-running-action-name/m-p/34112#M40709</link>
      <description>Could you share a sample request URL and output received?&lt;BR /&gt;&lt;BR /&gt;It seems to work OK for me, for ex. for my WF ID of "0000000-151116211358117-oozie-oozi-W":&lt;BR /&gt;&lt;BR /&gt;~&amp;gt; curl -L 'http://localhost:11000/oozie/v2/job/0000000-151116211358117-oozie-oozi-W' &amp;gt; wf.json&lt;BR /&gt;~&amp;gt; python&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; import json&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; a = json.loads(open('wf.json').read())&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; len(a['actions'])&lt;BR /&gt;2&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; a['actions'][1]['name']&lt;BR /&gt;u'Shell'&lt;BR /&gt;&lt;BR /&gt;FWIW, Hue today uses the same API for its Oozie app dashboards, and it does fetch all actions properly too.&lt;BR /&gt;&lt;BR /&gt;How old is the targeted WF, and are you able to see the list of actions OK in the web UIs?</description>
      <pubDate>Mon, 16 Nov 2015 16:27:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Workflow-Get-running-action-name/m-p/34112#M40709</guid>
      <dc:creator>Harsh J</dc:creator>
      <dc:date>2015-11-16T16:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie Workflow: Get running action name</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Workflow-Get-running-action-name/m-p/34113#M40710</link>
      <description>&lt;P&gt;Here is the sample python code i am using&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;req = urllib2.Request(&lt;SPAN&gt;'http://xx.xx.xxx.xx:11000/oozie/v1/jobs?show=info'&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;PRE&gt;response = urllib2.urlopen(req)&lt;BR /&gt;output = response.read()&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;output1&lt;/SPAN&gt; = json.loads(output)&lt;BR /&gt;&lt;SPAN&gt;print output1&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Output:&lt;/P&gt;&lt;P&gt;{"status": "RUNNING", "run": 0, "startTime": "Mon, 16 Nov 2015 14:40:29 GMT", "appName": "WrkflowGeneratorDemo", "lastModTime": "Mon, 16 Nov 2015 14:43:08 GMT", "actions": [], "acl": null, "appPath": null, "externalId": null, "consoleUrl": "http://ip-xx-xxx-xx-xx:11000/oozie?job=0000096-151104073848042-oozie-hado-W", "conf": null, "parentId": null, "createdTime": "Mon, 16 Nov 2015 14:40:29 GMT", "toString": "Workflow id[0000096-151104073848042-oozie-hado-W] status[RUNNING]", "endTime": null, "id": "0000096-151104073848042-oozie-hado-W", "group": null, "user": "hadoop"}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the req, i have tried specifying the len, offset, jobtype and type. But it always gives the same output&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2015 17:26:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Workflow-Get-running-action-name/m-p/34113#M40710</guid>
      <dc:creator>chiragvaya</dc:creator>
      <dc:date>2015-11-16T17:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie Workflow: Get running action name</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Workflow-Get-running-action-name/m-p/34114#M40711</link>
      <description>Your end point is incorrect - you're trying /jobs/ (which gives a list of WFs with high-level info) and not /job/WFID (gives a specific WF and all details). The latter is what you need.&lt;BR /&gt;&lt;BR /&gt;Do this:&lt;BR /&gt;&lt;BR /&gt;req = urllib2.Request('&lt;A href="http://xx.xx.xxx.xx:11000/oozie/v1/job/0000096-151104073848042-oozie-hado-W')" target="_blank"&gt;http://xx.xx.xxx.xx:11000/oozie/v1/job/0000096-151104073848042-oozie-hado-W')&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;(Or use /jobs to iterate over the list of all WFs, calling /job/ID for each item's id field)</description>
      <pubDate>Mon, 16 Nov 2015 17:38:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Workflow-Get-running-action-name/m-p/34114#M40711</guid>
      <dc:creator>Harsh J</dc:creator>
      <dc:date>2015-11-16T17:38:49Z</dc:date>
    </item>
  </channel>
</rss>

