blob: f1dfd3e38d72172037dd54771ddb87b4f669bebf [file] [log] [blame]
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia at 2018-03-12
| Rendered using Apache Maven Fluido Skin 1.3.0
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20180312" />
<meta http-equiv="Content-Language" content="en" />
<title>Falcon - POST /api/entities/schedule/:entity-type/:entity-name</title>
<link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
<link rel="stylesheet" href="../css/site.css" />
<link rel="stylesheet" href="../css/print.css" media="print" />
<script type="text/javascript" src="../js/apache-maven-fluido-1.3.0.min.js"></script>
<script type="text/javascript">$( document ).ready( function() { $( '.carousel' ).carousel( { interval: 3500 } ) } );</script>
</head>
<body class="topBarDisabled">
<div class="container">
<div id="banner">
<div class="pull-left">
<div id="bannerLeft">
<img src="../images/falcon-logo.png" alt="Apache Falcon" width="200px" height="45px"/>
</div>
</div>
<div class="pull-right"> </div>
<div class="clear"><hr/></div>
</div>
<div id="breadcrumbs">
<ul class="breadcrumb">
<li class="">
<a href="../index.html" title="Falcon">
Falcon</a>
</li>
<li class="divider ">/</li>
<li class="">POST /api/entities/schedule/:entity-type/:entity-name</li>
<li id="publishDate" class="pull-right">Last Published: 2018-03-12</li> <li class="divider pull-right">|</li>
<li id="projectVersion" class="pull-right">Version: 0.11</li>
</ul>
</div>
<div id="bodyColumn" >
<div class="section">
<h3>POST /api/entities/schedule/:entity-type/:entity-name<a name="POST_apientitiesschedule:entity-type:entity-name"></a></h3>
<p></p>
<ul>
<li><a href="#Description">Description</a></li>
<li><a href="#Parameters">Parameters</a></li>
<li><a href="#Results">Results</a></li>
<li><a href="#Examples">Examples</a></li></ul></div>
<div class="section">
<h3>Description<a name="Description"></a></h3>
<p>Schedule an entity.</p></div>
<div class="section">
<h3>Parameters<a name="Parameters"></a></h3>
<p></p>
<ul>
<li>:entity-type can either be a feed or a process.</li>
<li>:entity-name is name of the entity.</li>
<li>skipDryRun : Optional query param, Falcon skips oozie dryrun when value is set to true.</li>
<li>doAs &lt;optional query param&gt; allows the current user to impersonate the user passed in doAs when interacting with the Falcon system.</li>
<li>properties &lt;key1:val1,...,keyN:valN&gt; : Optional query param, supplies a set of key-value pairs that will be available to the entity in the coordinator configuration. These values will not override properties with the same name predefined in the entity specification. For example, to change the scheduler used for scheduling the entity you would set the property <i>falcon.scheduler</i> in the properties parameter to <i>native</i> to use the Falcon Scheduler or to <i>oozie</i> to use the Oozie Scheduler.</li></ul></div>
<div class="section">
<h3>Results<a name="Results"></a></h3>
<p>Result of the schedule command.</p></div>
<div class="section">
<h3>Examples<a name="Examples"></a></h3></div>
<div class="section">
<h4>Oozie Workflow<a name="Oozie_Workflow"></a></h4>
<div class="source">
<pre>
&lt;workflow-app xmlns=&quot;uri:oozie:workflow:0.4&quot; name=&quot;aggregator-wf&quot;&gt;
&lt;start to=&quot;aggregator&quot; /&gt;
&lt;action name=&quot;aggregator&quot;&gt;
&lt;java&gt;
&lt;job-tracker&gt;${jobTracker}&lt;/job-tracker&gt;
&lt;name-node&gt;${nameNode}&lt;/name-node&gt;
&lt;configuration&gt;
&lt;property&gt;
&lt;name&gt;mapred.job.queue.name&lt;/name&gt;
&lt;value&gt;${queueName}&lt;/value&gt;
&lt;/property&gt;
&lt;/configuration&gt;
&lt;main-class&gt;com.company.hadoop.AggregatorJob&lt;/main-class&gt;
&lt;java-opts&gt;-Dframework.instrumentation.host=${instrumentationServer}&lt;/java-opts&gt;
&lt;arg&gt;--input.path=${inputBasePath}&lt;/arg&gt;
&lt;arg&gt;--output.path=${outputBasePath}&lt;/arg&gt;
&lt;/java&gt;
&lt;ok to=&quot;end&quot; /&gt;
&lt;error to=&quot;fail&quot; /&gt;
&lt;/action&gt;
&lt;kill name=&quot;fail&quot;&gt;
&lt;message&gt;Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]&lt;/message&gt;
&lt;/kill&gt;
&lt;/workflow-app&gt;
</pre></div></div>
<div class="section">
<h4>Submitted Process<a name="Submitted_Process"></a></h4>
<div class="source">
<pre>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;!-- Daily sample process. Runs at 6th hour every day. Input - last day's hourly data. Generates output for yesterday --&gt;
&lt;process xmlns=&quot;uri:falcon:process:0.1&quot; name=&quot;SampleProcess&quot; &gt;
&lt;clusters&gt;
&lt;cluster name=&quot;primary-cluster&quot;&gt;
&lt;validity start=&quot;2012-04-03T06:00Z&quot; end=&quot;2022-12-30T00:00Z&quot; /&gt;
&lt;/cluster&gt;
&lt;/clusters&gt;
&lt;parallel&gt;1&lt;/parallel&gt;
&lt;order&gt;FIFO&lt;/order&gt;
&lt;frequency&gt;hours(1)&lt;/frequency&gt;
&lt;inputs&gt;
&lt;input name=&quot;input&quot; feed=&quot;SampleInput&quot; start=&quot;yesterday(0,0)&quot; end=&quot;today(-1,0)&quot; /&gt;
&lt;/inputs&gt;
&lt;outputs&gt;
&lt;output name=&quot;output&quot; feed=&quot;SampleOutput&quot; instance=&quot;yesterday(0,0)&quot; /&gt;
&lt;/outputs&gt;
&lt;properties&gt;
&lt;property name=&quot;queueName&quot; value=&quot;default&quot; /&gt;
&lt;property name=&quot;ssh.host&quot; value=&quot;localhost&quot; /&gt;
&lt;property name=&quot;fileTimestamp&quot; value=&quot;${coord:formatTime(coord:nominalTime(), 'yyyy-MM-dd')}&quot; /&gt;
&lt;property name=&quot;instrumentationServer&quot; value=&quot;${coord:conf('instrumentation.host')}&quot; /&gt;
&lt;/properties&gt;
&lt;workflow engine=&quot;oozie&quot; path=&quot;/examples/apps/aggregator&quot; /&gt;
&lt;retry policy=&quot;exp-backoff&quot; delay=&quot;minutes(5)&quot; attempts=&quot;3&quot; /&gt;
&lt;late-process policy=&quot;exp-backoff&quot; delay=&quot;hours(1)&quot;&gt;
&lt;late-input input=&quot;input&quot; workflow-path=&quot;/projects/bootcamp/workflow/lateinput&quot; /&gt;
&lt;/late-process&gt;
&lt;/process&gt;
</pre></div></div>
<div class="section">
<h4>Rest Call<a name="Rest_Call"></a></h4>
<div class="source">
<pre>
POST http://localhost:15000/api/entities/schedule/process/SampleProcess?skipDryRun=false&amp;doAs=joe&amp;properties=instrumentation.host:intrumentation.localdomain
</pre></div></div>
<div class="section">
<h4>Result<a name="Result"></a></h4>
<div class="source">
<pre>
{
&quot;requestId&quot;: &quot;default\/ee735c95-98bd-41b8-a705-2e78bcfcdcd9\n&quot;,
&quot;message&quot;: &quot;default\/SampleProcess(process) scheduled successfully\n&quot;,
&quot;status&quot;: &quot;SUCCEEDED&quot;
}
</pre></div></div>
<div class="section">
<h4>Notes<a name="Notes"></a></h4>
<p>In this example, the value of <i>framework.instrumentation.host</i> in the Oozie workflow will be <i>intrumentation.localdomain</i> which is the property passed when the process is scheduled.</p></div>
</div>
</div>
<hr/>
<footer>
<div class="container">
<div class="row span12">Copyright &copy; 2013-2018
<a href="http://www.apache.org">Apache Software Foundation</a>.
All Rights Reserved.
</div>
<p id="poweredBy" class="pull-right">
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
<img class="builtBy" alt="Built by Maven" src="../images/logos/maven-feather.png" />
</a>
</p>
</div>
</footer>
</body>
</html>