<?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: Need additional documentation for rest API - replication status in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Need-additional-documentation-for-rest-API-replication/m-p/58993#M66718</link>
    <description>&lt;P&gt;Michalis thanks for the nice workaround!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 18 Aug 2017 07:07:26 GMT</pubDate>
    <dc:creator>parnigot</dc:creator>
    <dc:date>2017-08-18T07:07:26Z</dc:date>
    <item>
      <title>Need additional documentation for rest API - replication status</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Need-additional-documentation-for-rest-API-replication/m-p/58904#M66714</link>
      <description>&lt;P&gt;I'm writing a small script to monitor the status of BDR jobs with the REST apis.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having some issue with an endpoint that takes a long time to respond (from my limited testing it scales lineary with the number of jobs and the depth of the history for each job):&lt;/P&gt;&lt;P&gt;&lt;A href="https://cloudera.github.io/cm_api/apidocs/v17/path__clusters_-clusterName-_services_-serviceName-_replications.html" target="_blank"&gt;https://cloudera.github.io/cm_api/apidocs/v17/path__clusters_-clusterName-_services_-serviceName-_replications.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the linked documentation it appears that the api accepts a &lt;EM&gt;limits&lt;/EM&gt; parameter but It's not very well documented: what arguments does it accept? Maybe something to limit the history size?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 13:44:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Need-additional-documentation-for-rest-API-replication/m-p/58904#M66714</guid>
      <dc:creator>parnigot</dc:creator>
      <dc:date>2017-08-16T13:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Need additional documentation for rest API - replication status</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Need-additional-documentation-for-rest-API-replication/m-p/58926#M66715</link>
      <description>&lt;P&gt;The link you provided will list all your replication schedules and their job result history.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you know the replication schedule id (eg. below is id=5) perhaps&amp;nbsp;using the replication/{id}/history endpoint [0] may help you. You can limit the history size by doing so.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;http://cm-host.cloudera.com:7180/api/v17/clusters/Cluster%201/services/HDFS-1/replications/&lt;STRONG&gt;5&lt;/STRONG&gt;/history?limit=1&amp;amp;offset=0&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[0]&amp;nbsp;&lt;A href="https://cloudera.github.io/cm_api/apidocs/v17/path__clusters_-clusterName-_services_-serviceName-_replications_-scheduleId-_history.html" target="_blank"&gt;https://cloudera.github.io/cm_api/apidocs/v17/path__clusters_-clusterName-_services_-serviceName-_replications_-scheduleId-_history.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 20:42:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Need-additional-documentation-for-rest-API-replication/m-p/58926#M66715</guid>
      <dc:creator>michalis</dc:creator>
      <dc:date>2017-08-16T20:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: Need additional documentation for rest API - replication status</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Need-additional-documentation-for-rest-API-replication/m-p/58944#M66716</link>
      <description>&lt;P&gt;Thank you Michalis&lt;BR /&gt;&lt;BR /&gt;And if I don't know the id of the jobs in advance? Any way to limit the response from the main uri &lt;EM&gt;/api/vXX/clusters/{cluster_name}/services/{service_name}/replications&lt;/EM&gt;?&lt;BR /&gt;What I'm trying to do is just get the list of all defined jobs and get the state of the last execution (failed/succeded)&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2017 07:04:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Need-additional-documentation-for-rest-API-replication/m-p/58944#M66716</guid>
      <dc:creator>parnigot</dc:creator>
      <dc:date>2017-08-17T07:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: Need additional documentation for rest API - replication status</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Need-additional-documentation-for-rest-API-replication/m-p/58951#M66717</link>
      <description>&lt;P&gt;If your objective: "..&lt;SPAN&gt;get the state of the last execution (failed/succeded)", and&amp;nbsp;if I remember correctly&lt;/SPAN&gt;&amp;nbsp;each replication job generates an AUDIT event [0], a&amp;nbsp;workaround would be to filter the Events [1].&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On you CM&amp;gt; Diagnostics&amp;gt; Events filter;&lt;/P&gt;&lt;P&gt;Category: AUDIT_EVENT&lt;/P&gt;&lt;P&gt;Event Code:&amp;nbsp;&lt;SPAN&gt;EV_HDFS_DISTCP&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;parsing the&amp;nbsp;COMMAND_ARGS&amp;nbsp;you can get the scheduleId&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Then you can group the results (by COMMAND_ID) to get the execution flow&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;COMMAND_STATUS will contain when it STARTED, FAILED, SUCCEEDED, ABORTED&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[0]&amp;nbsp;&lt;A href="https://cloudera.github.io/cm_api/apidocs/v17/path__events.html" target="_blank"&gt;https://cloudera.github.io/cm_api/apidocs/v17/path__events.html&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[1]&amp;nbsp;&lt;A href="http://cm.cloudera.com:7180/api/v12/events?query=category==AUDIT_EVENT;attributes.eventcode==EV_HDFS_DISTCP" target="_blank"&gt;http://cm.cloudera.com:7180/api/v12/events?query=category==AUDIT_EVENT;attributes.eventcode==EV_HDFS_DISTCP&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2017 09:15:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Need-additional-documentation-for-rest-API-replication/m-p/58951#M66717</guid>
      <dc:creator>michalis</dc:creator>
      <dc:date>2017-08-17T09:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Need additional documentation for rest API - replication status</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Need-additional-documentation-for-rest-API-replication/m-p/58993#M66718</link>
      <description>&lt;P&gt;Michalis thanks for the nice workaround!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 07:07:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Need-additional-documentation-for-rest-API-replication/m-p/58993#M66718</guid>
      <dc:creator>parnigot</dc:creator>
      <dc:date>2017-08-18T07:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: Need additional documentation for rest API - replication status</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Need-additional-documentation-for-rest-API-replication/m-p/292051#M66719</link>
      <description>&lt;P&gt;I'm using rest curl to extract BDP jobs status from history, and calculating the total data volume and avg replication time for each job, its talking over 9 hours to complete with huge file. Is it possible to have filter to extract last 24 hours BDP jobs only to reduce time and file size?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2020 16:25:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Need-additional-documentation-for-rest-API-replication/m-p/292051#M66719</guid>
      <dc:creator>scottwong</dc:creator>
      <dc:date>2020-03-18T16:25:12Z</dc:date>
    </item>
  </channel>
</rss>

