blob: b30b13ce9fccb1690f8a2b234988e6d3733544f2 [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 - FalconCLI</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-fluid">
<div id="banner">
<div class="pull-left">
<a href="../index.html" id="bannerLeft">
<img src="images/falcon-logo.png" alt="Apache Falcon" width="200px" height="45px"/>
</a>
</div>
<div class="pull-right"> <a href="http://www.apache.org" id="bannerRight">
<img src="images/apache-feather-tm.gif" alt="Falcon" height="45px"/>
</a>
</div>
<div class="clear"><hr/></div>
</div>
<div id="breadcrumbs">
<ul class="breadcrumb">
<li class="">
<a href="http://www.apache.org" class="externalLink" title="Apache">
Apache</a>
</li>
<li class="divider ">/</li>
<li class="">
<a href="index.html" title="Falcon">
Falcon</a>
</li>
<li class="divider ">/</li>
<li class="">FalconCLI</li>
<li id="publishDate" class="pull-right">Last Published: 2018-03-12</li>
</ul>
</div>
<div class="row-fluid">
<div id="leftColumn" class="span3">
<div class="well sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header">Falcon</li>
<li>
<a href="index.html" title="About">
<i class="none"></i>
About</a>
</li>
<li>
<a href="slides/falcon-overview.html" title="Overview">
<i class="none"></i>
Overview</a>
</li>
<li>
<a href="slides/falcon-user-guide.html" title="User Guide">
<i class="none"></i>
User Guide</a>
</li>
<li>
<a href="GettingStarted.html" title="Getting Started">
<i class="none"></i>
Getting Started</a>
</li>
<li>
<a href="FalconDocumentation.html" title="Architecture">
<i class="none"></i>
Architecture</a>
</li>
<li>
<a href="InstallationSteps.html" title="Installation">
<i class="none"></i>
Installation</a>
</li>
<li>
<a href="OnBoarding.html" title="On Boarding">
<i class="none"></i>
On Boarding</a>
</li>
<li>
<a href="MigrationInstructions.html" title="Migrate to 0.10">
<i class="none"></i>
Migrate to 0.10</a>
</li>
<li>
<a href="Operability.html" title="Operability">
<i class="none"></i>
Operability</a>
</li>
<li>
<a href="EntitySpecification.html" title="Entity Specification">
<i class="none"></i>
Entity Specification</a>
</li>
<li>
<a href="falconcli/FalconCLI.html" title="Client (Falcon CLI)">
<i class="none"></i>
Client (Falcon CLI)</a>
</li>
<li>
<a href="restapi/ResourceList.html" title="Rest API">
<i class="icon-chevron-right"></i>
Rest API</a>
</li>
<li>
<a href="HiveIntegration.html" title="Hive Integration">
<i class="none"></i>
Hive Integration</a>
</li>
<li>
<a href="Extensions.html" title="Server side Extensions">
<i class="none"></i>
Server side Extensions</a>
</li>
<li>
<a href="Security.html" title="Security">
<i class="none"></i>
Security</a>
</li>
<li class="nav-header">Project Information</li>
<li>
<a href="project-info.html" title="Summary">
<i class="none"></i>
Summary</a>
</li>
<li>
<a href="mail-lists.html" title="Mailing Lists">
<i class="none"></i>
Mailing Lists</a>
</li>
<li>
<a href="http://webchat.freenode.net?channels=apachefalcon&uio=d4" class="externalLink" title="IRC">
<i class="none"></i>
IRC</a>
</li>
<li>
<a href="team-list.html" title="Team">
<i class="none"></i>
Team</a>
</li>
<li>
<a href="issue-tracking.html" title="Issue Tracking">
<i class="none"></i>
Issue Tracking</a>
</li>
<li>
<a href="source-repository.html" title="Source Repository">
<i class="none"></i>
Source Repository</a>
</li>
<li>
<a href="https://cwiki.apache.org/confluence/display/FALCON/Index" class="externalLink" title="Wiki">
<i class="none"></i>
Wiki</a>
</li>
<li>
<a href="license.html" title="License">
<i class="none"></i>
License</a>
</li>
<li>
<a href="https://cwiki.apache.org/confluence/display/FALCON/News" class="externalLink" title="News">
<i class="none"></i>
News</a>
</li>
<li>
<a href="https://cwiki.apache.org/confluence/display/FALCON/PoweredBy" class="externalLink" title="Powered by">
<i class="none"></i>
Powered by</a>
</li>
<li>
<a href="https://cwiki.apache.org/confluence/display/FALCON/Acknowledgements" class="externalLink" title="Acknowledgements">
<i class="none"></i>
Acknowledgements</a>
</li>
<li>
<a href="http://blogs.apache.org/falcon/" class="externalLink" title="Blog">
<i class="none"></i>
Blog</a>
</li>
<li class="nav-header">Releases</li>
<li>
<a href="http://www.apache.org/dyn/closer.lua/falcon/0.11" class="externalLink" title="0.11">
<i class="none"></i>
0.11</a>
</li>
<li>
<a href="http://www.apache.org/dyn/closer.lua/falcon/0.10" class="externalLink" title="0.10">
<i class="none"></i>
0.10</a>
</li>
<li>
<a href="http://www.apache.org/dyn/closer.lua/falcon/0.9" class="externalLink" title="0.9">
<i class="none"></i>
0.9</a>
</li>
<li>
<a href="http://www.apache.org/dyn/closer.lua/falcon/0.8" class="externalLink" title="0.8">
<i class="none"></i>
0.8</a>
</li>
<li>
<a href="http://www.apache.org/dyn/closer.lua/falcon/0.7" class="externalLink" title="0.7">
<i class="none"></i>
0.7</a>
</li>
<li>
<a href="http://archive.apache.org/dist/falcon/0.6.1" class="externalLink" title="0.6.1">
<i class="none"></i>
0.6.1</a>
</li>
<li>
<a href="http://archive.apache.org/dist/incubator/falcon/0.6-incubating" class="externalLink" title="0.6-incubating">
<i class="none"></i>
0.6-incubating</a>
</li>
<li>
<a href="http://archive.apache.org/dist/incubator/falcon/0.5-incubating" class="externalLink" title="0.5-incubating">
<i class="none"></i>
0.5-incubating</a>
</li>
<li>
<a href="http://archive.apache.org/dist/incubator/falcon/0.4-incubating" class="externalLink" title="0.4-incubating">
<i class="none"></i>
0.4-incubating</a>
</li>
<li>
<a href="http://archive.apache.org/dist/incubator/falcon/0.3-incubating" class="externalLink" title="0.3-incubating">
<i class="none"></i>
0.3-incubating</a>
</li>
<li>
<a href="https://cwiki.apache.org/confluence/display/FALCON/Roadmap" class="externalLink" title="Coming soon">
<i class="none"></i>
Coming soon</a>
</li>
<li class="nav-header">Documentation</li>
<li>
<a href="0.11/index.html" title="0.11 (Current)">
<i class="none"></i>
0.11 (Current)</a>
</li>
<li>
<a href="0.10/index.html" title="0.10">
<i class="none"></i>
0.10</a>
</li>
<li>
<a href="0.9/index.html" title="0.9">
<i class="none"></i>
0.9</a>
</li>
<li>
<a href="0.8/index.html" title="0.8">
<i class="none"></i>
0.8</a>
</li>
<li>
<a href="0.7/index.html" title="0.7">
<i class="none"></i>
0.7</a>
</li>
<li>
<a href="0.6.1/index.html" title="0.6.1">
<i class="none"></i>
0.6.1</a>
</li>
<li>
<a href="0.6-incubating/index.html" title="0.6-incubating">
<i class="none"></i>
0.6-incubating</a>
</li>
<li>
<a href="0.5-incubating/index.html" title="0.5-incubating">
<i class="none"></i>
0.5-incubating</a>
</li>
<li>
<a href="0.4-incubating/index.html" title="0.4-incubating">
<i class="none"></i>
0.4-incubating</a>
</li>
<li>
<a href="0.3-incubating/index.html" title="0.3-incubating">
<i class="none"></i>
0.3-incubating</a>
</li>
<li class="nav-header">ASF</li>
<li>
<a href="http://www.apache.org/foundation/how-it-works.html" class="externalLink" title="How Apache Works">
<i class="none"></i>
How Apache Works</a>
</li>
<li>
<a href="http://www.apache.org/foundation/" class="externalLink" title="Foundation">
<i class="none"></i>
Foundation</a>
</li>
<li>
<a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsoring Apache">
<i class="none"></i>
Sponsoring Apache</a>
</li>
<li>
<a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks">
<i class="none"></i>
Thanks</a>
</li>
</ul>
<hr class="divider" />
<div id="poweredBy">
<div class="clear"></div>
<div class="clear"></div>
<div class="clear"></div>
<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>
</div>
</div>
</div>
<div id="bodyColumn" class="span9" >
<div class="section">
<h2>FalconCLI<a name="FalconCLI"></a></h2>
<p>FalconCLI is a interface between user and Falcon. It is a command line utility provided by Falcon. FalconCLI supports Entity Management, Instance Management and Admin operations.There is a set of web services that are used by FalconCLI to interact with Falcon.</p></div>
<div class="section">
<h3>Common CLI Options<a name="Common_CLI_Options"></a></h3></div>
<div class="section">
<h4>Falcon URL<a name="Falcon_URL"></a></h4>
<p>Optional -url option indicating the URL of the Falcon system to run the command against can be provided. If not mentioned it will be picked from the system environment variable FALCON_URL. If FALCON_URL is not set then it will be picked from client.properties file. If the option is not provided and also not set in client.properties, Falcon CLI will fail.</p></div>
<div class="section">
<h4>Proxy user support<a name="Proxy_user_support"></a></h4>
<p>The -doAs option allows the current user to impersonate other users when interacting with the Falcon system. The current user must be configured as a proxyuser in the Falcon system. The proxyuser configuration may restrict from which hosts a user may impersonate users, as well as users of which groups can be impersonated.</p>
<p><a href="./FalconDocumentation.html#Proxyuser_support">Proxyuser support described here.</a></p></div>
<div class="section">
<h4>Debug Mode<a name="Debug_Mode"></a></h4>
<p>If you export FALCON_DEBUG=true then the Falcon CLI will output the Web Services API details used by any commands you execute. This is useful for debugging purposes to or see how the Falcon CLI works with the WS API. Alternately, you can specify '-debug' through the CLI arguments to get the debug statements. Example: $FALCON_HOME/bin/falcon entity -submit -type cluster -file /cluster/definition.xml -debug</p></div>
<div class="section">
<h3>Entity Management Operations<a name="Entity_Management_Operations"></a></h3></div>
<div class="section">
<h4>Submit<a name="Submit"></a></h4>
<p>Submit option is used to set up entity definition.</p>
<p>Usage: $FALCON_HOME/bin/falcon entity -submit -type [cluster|datasource|feed|process] -file &lt;entity-definition.xml&gt;</p>
<p>Example: $FALCON_HOME/bin/falcon entity -submit -type cluster -file /cluster/definition.xml</p>
<p>Note: The url option in the above and all subsequent commands is optional. If not mentioned it will be picked from client.properties file. If the option is not provided and also not set in client.properties, Falcon CLI will fail.</p></div>
<div class="section">
<h4>Schedule<a name="Schedule"></a></h4>
<p>Once submitted, an entity can be scheduled using schedule option. Process and feed can only be scheduled.</p>
<p>Usage: $FALCON_HOME/bin/falcon entity -type [process|feed] -name &lt;&lt;name&gt;&gt; -schedule</p>
<p>Optional Arg : -skipDryRun. When this argument is specified, Falcon skips oozie dryrun.</p>
<p>Example: $FALCON_HOME/bin/falcon entity -type process -name sampleProcess -schedule</p></div>
<div class="section">
<h4>Suspend<a name="Suspend"></a></h4>
<p>Suspend on an entity results in suspension of the oozie bundle that was scheduled earlier through the schedule function. No further instances are executed on a suspended entity. Only schedule-able entities(process/feed) can be suspended.</p>
<p>Usage: $FALCON_HOME/bin/falcon entity -type [feed|process] -name &lt;&lt;name&gt;&gt; -suspend</p></div>
<div class="section">
<h4>Resume<a name="Resume"></a></h4>
<p>Puts a suspended process/feed back to active, which in turn resumes applicable oozie bundle.</p>
<p>Usage: $FALCON_HOME/bin/falcon entity -type [feed|process] -name &lt;&lt;name&gt;&gt; -resume</p></div>
<div class="section">
<h4>Delete<a name="Delete"></a></h4>
<p>Delete removes the submitted entity definition for the specified entity and put it into the archive.</p>
<p>Usage: $FALCON_HOME/bin/falcon entity -type [cluster|datasource|feed|process] -name &lt;&lt;name&gt;&gt; -delete</p></div>
<div class="section">
<h4>List<a name="List"></a></h4>
<p>Entities of a particular type can be listed with list sub-command.</p>
<p>Usage: $FALCON_HOME/bin/falcon entity -list</p>
<p>Optional Args : -fields &lt;&lt;field1,field2&gt;&gt; -type &lt;&lt;[cluster|datasource|feed|process],[cluster|datasource|feed|process]&gt;&gt; -nameseq &lt;&lt;namesubsequence&gt;&gt; -tagkeys &lt;&lt;tagkeyword1,tagkeyword2&gt;&gt; -filterBy &lt;&lt;field1:value1,field2:value2&gt;&gt; -tags &lt;&lt;tagkey=tagvalue,tagkey=tagvalue&gt;&gt; -orderBy &lt;&lt;field&gt;&gt; -sortOrder &lt;&lt;sortOrder&gt;&gt; -offset 0 -numResults 10</p>
<p><a href="./Restapi/EntityList.html">Optional params described here.</a></p></div>
<div class="section">
<h4>Summary<a name="Summary"></a></h4>
<p>Summary of entities of a particular type and a cluster will be listed. Entity summary has N most recent instances of entity.</p>
<p>Usage: $FALCON_HOME/bin/falcon entity -type [feed|process] -summary</p>
<p>Optional Args : -start &quot;yyyy-MM-dd'T'HH:mm'Z'&quot; -end &quot;yyyy-MM-dd'T'HH:mm'Z'&quot; -fields &lt;&lt;field1,field2&gt;&gt; -filterBy &lt;&lt;field1:value1,field2:value2&gt;&gt; -tags &lt;&lt;tagkey=tagvalue,tagkey=tagvalue&gt;&gt; -orderBy &lt;&lt;field&gt;&gt; -sortOrder &lt;&lt;sortOrder&gt;&gt; -offset 0 -numResults 10 -numInstances 7</p>
<p><a href="./Restapi/EntitySummary.html">Optional params described here.</a></p></div>
<div class="section">
<h4>Update<a name="Update"></a></h4>
<p>Update operation allows an already submitted/scheduled entity to be updated. Cluster and datasource updates are currently not allowed.</p>
<p>Usage: $FALCON_HOME/bin/falcon entity -type [feed|process] -name &lt;&lt;name&gt;&gt; -update -file &lt;&lt;path_to_file&gt;&gt;</p>
<p>Optional Arg : -skipDryRun. When this argument is specified, Falcon skips oozie dryrun.</p>
<p>Example: $FALCON_HOME/bin/falcon entity -type process -name <a href="./HourlyReportsGenerator.html">HourlyReportsGenerator</a> -update -file /process/definition.xml</p></div>
<div class="section">
<h4>Touch<a name="Touch"></a></h4>
<p>Force Update operation allows an already submitted/scheduled entity to be updated.</p>
<p>Usage: $FALCON_HOME/bin/falcon entity -type [feed|process] -name &lt;&lt;name&gt;&gt; -touch</p>
<p>Optional Arg : -skipDryRun. When this argument is specified, Falcon skips oozie dryrun.</p></div>
<div class="section">
<h4>Status<a name="Status"></a></h4>
<p>Status returns the current status of the entity.</p>
<p>Usage: $FALCON_HOME/bin/falcon entity -type [cluster|datasource|feed|process] -name &lt;&lt;name&gt;&gt; -status</p></div>
<div class="section">
<h4>Dependency<a name="Dependency"></a></h4>
<p>With the use of dependency option, we can list all the entities on which the specified entity is dependent. For example for a feed, dependency return the cluster name and for process it returns all the input feeds, output feeds and cluster names.</p>
<p>Usage: $FALCON_HOME/bin/falcon entity -type [cluster|datasource|feed|process] -name &lt;&lt;name&gt;&gt; -dependency</p></div>
<div class="section">
<h4>Definition<a name="Definition"></a></h4>
<p>Definition option returns the entity definition submitted earlier during submit step.</p>
<p>Usage: $FALCON_HOME/bin/falcon entity -type [cluster|datasource|feed|process] -name &lt;&lt;name&gt;&gt; -definition</p></div>
<div class="section">
<h4>Lookup<a name="Lookup"></a></h4>
<p>Lookup option tells you which feed does a given path belong to. This can be useful in several scenarios e.g. generally you would want to have a single definition for common feeds like metadata with same location otherwise it can result in a problem (different retention durations can result in surprises for one team) If you want to check if there are multiple definitions of same metadata then you can pick an instance of that and run through the lookup command like below.</p>
<p>Usage: $FALCON_HOME/bin/falcon entity -type feed -lookup -path /data/projects/my-hourly/2014/10/10/23/</p>
<p>If you have multiple feeds with location as /data/projects/my-hourly/${YEAR}/${MONTH}/${DAY}/${HOUR} then this command will return all of them.</p></div>
<div class="section">
<h4>SLAAlert<a name="SLAAlert"></a></h4>
<div class="source">
<pre>
Since: 0.8
</pre></div>
<p>This command lists all the feed instances which have missed sla and are still not available. If a feed instance missed sla but is now available, then it will not be reported in results. The purpose of this API is alerting and hence it doesn't return feed instances which missed SLA but are available as they don't require any action.</p>
<p>* Currently sla monitoring is supported only for feeds.</p>
<p>* Option end is optional and will default to current time if missing.</p>
<p>* Option name is optional, if provided only instances of that feed will be considered.</p>
<p>Usage:</p>
<p><b>Example 1</b></p>
<p><b>$FALCON_HOME/bin/falcon entity -type feed -start 2014-09-05T00:00Z -slaAlert -end 2016-05-03T00:00Z -colo local</b></p>
<p>name: out, type: FEED, cluster: local, instanceTime: 2015-09-26T11:59Z, tags: Missed SLA High name: out, type: FEED, cluster: local, instanceTime: 2015-09-26T12:00Z, tags: Missed SLA High name: out, type: FEED, cluster: local, instanceTime: 2015-09-26T12:01Z, tags: Missed SLA High name: out, type: FEED, cluster: local, instanceTime: 2015-09-26T12:02Z, tags: Missed SLA High name: out, type: FEED, cluster: local, instanceTime: 2015-09-26T12:03Z, tags: Missed SLA High name: out, type: FEED, cluster: local, instanceTime: 2015-09-26T12:04Z, tags: Missed SLA High name: out, type: FEED, cluster: local, instanceTime: 2015-09-26T12:05Z, tags: Missed SLA High name: out, type: FEED, cluster: local, instanceTime: 2015-09-26T12:06Z, tags: Missed SLA High name: out, type: FEED, cluster: local, instanceTime: 2015-09-26T12:07Z, tags: Missed SLA High name: out, type: FEED, cluster: local, instanceTime: 2015-09-26T12:08Z, tags: Missed SLA Low</p>
<p>Response: default/Success!</p>
<p>Request Id: default/216978070@qtp-830047511-4 - f5a6c129-ab42-4feb-a2bf-c3baed356248</p>
<p><b>Example 2</b></p>
<p><b>$FALCON_HOME/bin/falcon entity -type feed -start 2014-09-05T00:00Z -slaAlert -end 2016-05-03T00:00Z -colo local -name in</b></p>
<p>name: in, type: FEED, cluster: local, instanceTime: 2015-09-26T06:00Z, tags: Missed SLA High</p>
<p>Response: default/Success!</p>
<p>Request Id: default/1580107885@qtp-830047511-7 - f16cbc51-5070-4551-ad25-28f75e5e4cf2</p></div>
<div class="section">
<h3>Instance Management Options<a name="Instance_Management_Options"></a></h3></div>
<div class="section">
<h4>Kill<a name="Kill"></a></h4>
<p>Kill sub-command is used to kill all the instances of the specified process whose nominal time is between the given start time and end time.</p>
<p>Note: 1. The start time and end time needs to be specified in TZ format. Example: 01 Jan 2012 01:00 =&gt; 2012-01-01T01:00Z</p>
<p>3. Process name is compulsory parameter for each instance management command.</p>
<p>Usage: $FALCON_HOME/bin/falcon instance -type &lt;&lt;feed/process&gt;&gt; -name &lt;&lt;name&gt;&gt; -kill -start &quot;yyyy-MM-dd'T'HH:mm'Z'&quot; -end &quot;yyyy-MM-dd'T'HH:mm'Z'&quot;</p></div>
<div class="section">
<h4>Suspend<a name="Suspend"></a></h4>
<p>Suspend is used to suspend a instance or instances for the given process. This option pauses the parent workflow at the state, which it was in at the time of execution of this command.</p>
<p>Usage: $FALCON_HOME/bin/falcon instance -type &lt;&lt;feed/process&gt;&gt; -name &lt;&lt;name&gt;&gt; -suspend -start &quot;yyyy-MM-dd'T'HH:mm'Z'&quot; -end &quot;yyyy-MM-dd'T'HH:mm'Z'&quot;</p></div>
<div class="section">
<h4>Continue<a name="Continue"></a></h4>
<p>Continue option is used to continue the failed workflow instance. This option is valid only for process instances in terminal state, i.e. KILLED or FAILED.</p>
<p>Usage: $FALCON_HOME/bin/falcon instance -type &lt;&lt;feed/process&gt;&gt; -name &lt;&lt;name&gt;&gt; -continue -start &quot;yyyy-MM-dd'T'HH:mm'Z'&quot; -end &quot;yyyy-MM-dd'T'HH:mm'Z'&quot;</p></div>
<div class="section">
<h4>Rerun<a name="Rerun"></a></h4>
<p>Rerun option is used to rerun instances of a given process. On issuing a rerun, by default the execution resumes from the last failed node in the workflow. This option is valid only for process instances in terminal state, i.e. SUCCEEDED, KILLED or FAILED. If one wants to forcefully rerun the entire workflow, -force should be passed along with -rerun Additionally, you can also specify properties to override via a properties file and this will be prioritized over force option in case of contradiction.</p>
<p>Usage: $FALCON_HOME/bin/falcon instance -type &lt;&lt;feed/process&gt;&gt; -name &lt;&lt;name&gt;&gt; -rerun -start &quot;yyyy-MM-dd'T'HH:mm'Z'&quot; -end &quot;yyyy-MM-dd'T'HH:mm'Z'&quot; [-force] [-file &lt;&lt;properties file&gt;&gt;]</p></div>
<div class="section">
<h4>Resume<a name="Resume"></a></h4>
<p>Resume option is used to resume any instance that is in suspended state.</p>
<p>Usage: $FALCON_HOME/bin/falcon instance -type &lt;&lt;feed/process&gt;&gt; -name &lt;&lt;name&gt;&gt; -resume -start &quot;yyyy-MM-dd'T'HH:mm'Z'&quot; -end &quot;yyyy-MM-dd'T'HH:mm'Z'&quot;</p></div>
<div class="section">
<h4>Status<a name="Status"></a></h4>
<p>Status option via CLI can be used to get the status of a single or multiple instances. If the instance is not yet materialized but is within the process validity range, WAITING is returned as the state. Along with the status of the instance time is also returned. Log location gives the oozie workflow url If the instance is in WAITING state, missing dependencies are listed. The job urls are populated for all actions of user workflow and non-succeeded actions of the main-workflow. The user then need not go to the underlying scheduler to get the job urls when needed to debug an issue in the job.</p>
<p>Example : Suppose a process has 3 instance, one has succeeded,one is in running state and other one is waiting, the expected output is:</p>
<p>{&quot;status&quot;:&quot;SUCCEEDED&quot;,&quot;message&quot;:&quot;getStatus is successful&quot;,&quot;instances&quot;:[{&quot;instance&quot;:&quot;2012-05-07T05:02Z&quot;,&quot;status&quot;:&quot;SUCCEEDED&quot;,&quot;logFile&quot;:&quot;http://oozie-dashboard-url&quot;},{&quot;instance&quot;:&quot;2012-05-07T05:07Z&quot;,&quot;status&quot;:&quot;RUNNING&quot;,&quot;logFile&quot;:&quot;http://oozie-dashboard-url&quot;}, {&quot;instance&quot;:&quot;2010-01-02T11:05Z&quot;,&quot;status&quot;:&quot;WAITING&quot;}]</p>
<p>Usage: $FALCON_HOME/bin/falcon instance -type &lt;&lt;feed/process&gt;&gt; -name &lt;&lt;name&gt;&gt; -status</p>
<p>Optional Args : -start &quot;yyyy-MM-dd'T'HH:mm'Z'&quot; -end &quot;yyyy-MM-dd'T'HH:mm'Z'&quot; -colo &lt;&lt;colo&gt;&gt; -filterBy &lt;&lt;field1:value1,field2:value2&gt;&gt; -lifecycle &lt;&lt;lifecycles&gt;&gt; -orderBy field -sortOrder &lt;&lt;sortOrder&gt;&gt; -offset 0 -numResults 10</p>
<p><a href="./Restapi/InstanceStatus.html"> Optional params described here.</a></p></div>
<div class="section">
<h4>List<a name="List"></a></h4>
<p>List option via CLI can be used to get single or multiple instances. If the instance is not yet materialized but is within the process validity range, WAITING is returned as the state. Instance time is also returned. Log location gives the oozie workflow url If the instance is in WAITING state, missing dependencies are listed</p>
<p>Example : Suppose a process has 3 instance, one has succeeded,one is in running state and other one is waiting, the expected output is:</p>
<p>{&quot;status&quot;:&quot;SUCCEEDED&quot;,&quot;message&quot;:&quot;getStatus is successful&quot;,&quot;instances&quot;:[{&quot;instance&quot;:&quot;2012-05-07T05:02Z&quot;,&quot;status&quot;:&quot;SUCCEEDED&quot;,&quot;logFile&quot;:&quot;http://oozie-dashboard-url&quot;},{&quot;instance&quot;:&quot;2012-05-07T05:07Z&quot;,&quot;status&quot;:&quot;RUNNING&quot;,&quot;logFile&quot;:&quot;http://oozie-dashboard-url&quot;}, {&quot;instance&quot;:&quot;2010-01-02T11:05Z&quot;,&quot;status&quot;:&quot;WAITING&quot;}]}</p>
<p>Usage: $FALCON_HOME/bin/falcon instance -type &lt;&lt;feed/process&gt;&gt; -name &lt;&lt;name&gt;&gt; -list</p>
<p>Optional Args : -start &quot;yyyy-MM-dd'T'HH:mm'Z'&quot; -end &quot;yyyy-MM-dd'T'HH:mm'Z'&quot; -colo &lt;&lt;colo&gt;&gt; -lifecycle &lt;&lt;lifecycles&gt;&gt; -filterBy &lt;&lt;field1:value1,field2:value2&gt;&gt; -orderBy field -sortOrder &lt;&lt;sortOrder&gt;&gt; -offset 0 -numResults 10</p>
<p><a href="./Restapi/InstanceList.html">Optional params described here.</a></p></div>
<div class="section">
<h4>Summary<a name="Summary"></a></h4>
<p>Summary option via CLI can be used to get the consolidated status of the instances between the specified time period. Each status along with the corresponding instance count are listed for each of the applicable colos. The unscheduled instances between the specified time period are included as UNSCHEDULED in the output to provide more clarity.</p>
<p>Example : Suppose a process has 3 instance, one has succeeded,one is in running state and other one is waiting, the expected output is:</p>
<p>{&quot;status&quot;:&quot;SUCCEEDED&quot;,&quot;message&quot;:&quot;getSummary is successful&quot;, instancesSummary:[{&quot;cluster&quot;: &lt;&lt;name&gt;&gt; &quot;map&quot;:[{&quot;SUCCEEDED&quot;:&quot;1&quot;}, {&quot;WAITING&quot;:&quot;1&quot;}, {&quot;RUNNING&quot;:&quot;1&quot;}]}]}</p>
<p>Usage: $FALCON_HOME/bin/falcon instance -type &lt;&lt;feed/process&gt;&gt; -name &lt;&lt;name&gt;&gt; -summary</p>
<p>Optional Args : -start &quot;yyyy-MM-dd'T'HH:mm'Z'&quot; -end &quot;yyyy-MM-dd'T'HH:mm'Z'&quot; -colo &lt;&lt;colo&gt;&gt; -filterBy &lt;&lt;field1:value1,field2:value2&gt;&gt; -lifecycle &lt;&lt;lifecycles&gt;&gt; -orderBy field -sortOrder &lt;&lt;sortOrder&gt;&gt;</p>
<p><a href="./Restapi/InstanceSummary.html">Optional params described here.</a></p></div>
<div class="section">
<h4>Running<a name="Running"></a></h4>
<p>Running option provides all the running instances of the mentioned process.</p>
<p>Usage: $FALCON_HOME/bin/falcon instance -type &lt;&lt;feed/process&gt;&gt; -name &lt;&lt;name&gt;&gt; -running</p>
<p>Optional Args : -colo &lt;&lt;colo&gt;&gt; -lifecycle &lt;&lt;lifecycles&gt;&gt; -filterBy &lt;&lt;field1:value1,field2:value2&gt;&gt; -orderBy &lt;&lt;field&gt;&gt; -sortOrder &lt;&lt;sortOrder&gt;&gt; -offset 0 -numResults 10</p>
<p><a href="./Restapi/InstanceRunning.html">Optional params described here.</a></p></div>
<div class="section">
<h4>FeedInstanceListing<a name="FeedInstanceListing"></a></h4>
<p>Get falcon feed instance availability.</p>
<p>Usage: $FALCON_HOME/bin/falcon instance -type feed -name &lt;&lt;name&gt;&gt; -listing</p>
<p>Optional Args : -start &quot;yyyy-MM-dd'T'HH:mm'Z'&quot; -end &quot;yyyy-MM-dd'T'HH:mm'Z'&quot; -colo &lt;&lt;colo&gt;&gt;</p>
<p><a href="./Restapi/FeedInstanceListing.html">Optional params described here.</a></p></div>
<div class="section">
<h4>Logs<a name="Logs"></a></h4>
<p>Get logs for instance actions</p>
<p>Usage: $FALCON_HOME/bin/falcon instance -type &lt;&lt;feed/process&gt;&gt; -name &lt;&lt;name&gt;&gt; -logs</p>
<p>Optional Args : -start &quot;yyyy-MM-dd'T'HH:mm'Z'&quot; -end &quot;yyyy-MM-dd'T'HH:mm'Z'&quot; -runid &lt;&lt;runid&gt;&gt; -colo &lt;&lt;colo&gt;&gt; -lifecycle &lt;&lt;lifecycles&gt;&gt; -filterBy &lt;&lt;field1:value1,field2:value2&gt;&gt; -orderBy field -sortOrder &lt;&lt;sortOrder&gt;&gt; -offset 0 -numResults 10</p>
<p><a href="./Restapi/InstanceLogs.html">Optional params described here.</a></p></div>
<div class="section">
<h4>LifeCycle<a name="LifeCycle"></a></h4>
<p>Describes list of life cycles of a entity , for feed it can be replication/retention and for process it can be execution. This can be used with instance management options. Default values are replication for feed and execution for process.</p>
<p>Usage: $FALCON_HOME/bin/falcon instance -type &lt;&lt;feed/process&gt;&gt; -name &lt;&lt;name&gt;&gt; -status -lifecycle &lt;&lt;lifecycletype&gt;&gt; -start &quot;yyyy-MM-dd'T'HH:mm'Z'&quot; -end &quot;yyyy-MM-dd'T'HH:mm'Z'&quot;</p></div>
<div class="section">
<h4>Triage<a name="Triage"></a></h4>
<p>Given a feed/process instance this command traces it's ancestors to find what all ancestors have failed. It's useful if lot of instances are failing in a pipeline as it then finds out the root cause of the pipeline being stuck.</p>
<p>Usage: $FALCON_HOME/bin/falcon instance -triage -type &lt;&lt;feed/process&gt;&gt; -name &lt;&lt;name&gt;&gt; -start &quot;yyyy-MM-dd'T'HH:mm'Z'&quot;</p></div>
<div class="section">
<h4>Params<a name="Params"></a></h4>
<p>Displays the workflow params of a given instance. Where start time is considered as nominal time of that instance and end time won't be considered.</p>
<p>Usage: $FALCON_HOME/bin/falcon instance -type &lt;&lt;feed/process&gt;&gt; -name &lt;&lt;name&gt;&gt; -params -start &quot;yyyy-MM-dd'T'HH:mm'Z'&quot;</p></div>
<div class="section">
<h4>Dependency<a name="Dependency"></a></h4>
<p>Display the dependent instances which are dependent on the given instance. For example for a given process instance it will list all the input feed instances(if any) and the output feed instances(if any).</p>
<p>An example use case of this command is as follows: Suppose you find out that the data in a feed instance was incorrect and you need to figure out which all process instances consumed this feed instance so that you can reprocess them after correcting the feed instance. You can give the feed instance and it will tell you which process instance produced this feed and which all process instances consumed this feed.</p>
<p>NOTE: 1. instanceTime must be a valid instanceTime e.g. instanceTime of a feed should be in it's validity range on applicable clusters, and it should be in the range of instances produced by the producer process(if any)</p>
<p>2. For processes with inputs like latest() which vary with time the results are not guaranteed to be correct.</p>
<p>Usage: $FALCON_HOME/bin/falcon instance -type &lt;&lt;feed/process&gt;&gt; -name &lt;&lt;name&gt;&gt; -params -instanceTime &quot;yyyy-MM-dd'T'HH:mm'Z'&quot;</p>
<p>For example: $FALCON_HOME/bin/falcon instance -dependency -type feed -name out -instanceTime 2014-12-15T00:00Z name: producer, type: PROCESS, cluster: local, instanceTime: 2014-12-15T00:00Z, tags: Output name: consumer, type: PROCESS, cluster: local, instanceTime: 2014-12-15T00:03Z, tags: Input name: consumer, type: PROCESS, cluster: local, instanceTime: 2014-12-15T00:04Z, tags: Input name: consumer, type: PROCESS, cluster: local, instanceTime: 2014-12-15T00:02Z, tags: Input name: consumer, type: PROCESS, cluster: local, instanceTime: 2014-12-15T00:05Z, tags: Input</p>
<p>Response: default/Success!</p>
<p>Request Id: default/1125035965@qtp-503156953-7 - 447be0ad-1d38-4dce-b438-20f3de69b172</p>
<p><a href="./Restapi/InstanceDependency.html">Optional params described here.</a></p></div>
<div class="section">
<h3>Metadata Lineage Options<a name="Metadata_Lineage_Options"></a></h3></div>
<div class="section">
<h4>Lineage<a name="Lineage"></a></h4>
<p><a href="http://www.graphviz.org/content/dot-language">dot</a> format. You can use the output and view a graphical representation of DAG using an online graphviz viewer like <a href="http://graphviz-dev.appspot.com/">this</a>.</p>
<p>Usage:</p>
<p>$FALCON_HOME/bin/falcon metadata -lineage -pipeline my-pipeline</p>
<p>pipeline is a mandatory option.</p></div>
<div class="section">
<h4>Vertex<a name="Vertex"></a></h4>
<p>Get the vertex with the specified id.</p>
<p>Usage: $FALCON_HOME/bin/falcon metadata -vertex -id &lt;&lt;id&gt;&gt;</p>
<p>Example: $FALCON_HOME/bin/falcon metadata -vertex -id 4</p></div>
<div class="section">
<h4>Vertices<a name="Vertices"></a></h4>
<p>Get all vertices for a key index given the specified value.</p>
<p>Usage: $FALCON_HOME/bin/falcon metadata -vertices -key &lt;&lt;key&gt;&gt; -value &lt;&lt;value&gt;&gt;</p>
<p>Example: $FALCON_HOME/bin/falcon metadata -vertices -key type -value feed-instance</p></div>
<div class="section">
<h4>Vertex Edges<a name="Vertex_Edges"></a></h4>
<p>Get the adjacent vertices or edges of the vertex with the specified direction.</p>
<p>Usage: $FALCON_HOME/bin/falcon metadata -edges -id &lt;&lt;vertex-id&gt;&gt; -direction &lt;&lt;direction&gt;&gt;</p>
<p>Example: $FALCON_HOME/bin/falcon metadata -edges -id 4 -direction both $FALCON_HOME/bin/falcon metadata -edges -id 4 -direction inE</p></div>
<div class="section">
<h4>Edge<a name="Edge"></a></h4>
<p>Get the edge with the specified id.</p>
<p>Usage: $FALCON_HOME/bin/falcon metadata -edge -id &lt;&lt;id&gt;&gt;</p>
<p>Example: $FALCON_HOME/bin/falcon metadata -edge -id Q9n-Q-5g</p></div>
<div class="section">
<h3>Metadata Discovery Options<a name="Metadata_Discovery_Options"></a></h3></div>
<div class="section">
<h4>List<a name="List"></a></h4>
<p>Lists of all dimensions of given type. If the user provides optional param cluster, only the dimensions related to the cluster are listed. Usage: $FALCON_HOME/bin/falcon metadata -list -type [cluster_entity|datasource_entity|feed_entity|process_entity|user|colo|tags|groups|pipelines|replication_metrics]</p>
<p>Optional Args : -cluster &lt;&lt;cluster name&gt;&gt;</p>
<p>Example: $FALCON_HOME/bin/falcon metadata -list -type process_entity -cluster primary-cluster $FALCON_HOME/bin/falcon metadata -list -type tags</p>
<p>To display replication metrics from recipe based replication process and from feed replication. Usage: $FALCON_HOME/bin/falcon metadata -list -type replication_metrics -process/-feed &lt;entity name&gt; Optional Args : -numResults &lt;&lt;value&gt;&gt;</p>
<p>Example: $FALCON_HOME/bin/falcon metadata -list -type replication_metrics -process hdfs-replication $FALCON_HOME/bin/falcon metadata -list -type replication_metrics -feed fs-replication</p></div>
<div class="section">
<h4>Relations<a name="Relations"></a></h4>
<p>List all dimensions related to specified Dimension identified by dimension-type and dimension-name. Usage: $FALCON_HOME/bin/falcon metadata -relations -type [cluster_entity|feed_entity|process_entity|user|colo|tags|groups|pipelines] -name &lt;&lt;Dimension Name&gt;&gt;</p>
<p>Example: $FALCON_HOME/bin/falcon metadata -relations -type process_entity -name sample-process</p></div>
<div class="section">
<h3>Admin Options<a name="Admin_Options"></a></h3></div>
<div class="section">
<h4>Help<a name="Help"></a></h4>
<p>Usage: $FALCON_HOME/bin/falcon admin -help</p></div>
<div class="section">
<h4>Version<a name="Version"></a></h4>
<p>Version returns the current version of Falcon installed. Usage: $FALCON_HOME/bin/falcon admin -version</p></div>
<div class="section">
<h4>Status<a name="Status"></a></h4>
<p>Status returns the current state of Falcon (running or stopped). Usage: $FALCON_HOME/bin/falcon admin -status</p></div>
<div class="section">
<h3>Recipe Options<a name="Recipe_Options"></a></h3></div>
<div class="section">
<h4>Submit Recipe<a name="Submit_Recipe"></a></h4>
<p>Submit the specified recipe.</p>
<p>Usage: $FALCON_HOME/bin/falcon recipe -name &lt;name&gt; Name of the recipe. User should have defined &lt;name&gt;-template.xml and &lt;name&gt;.properties in the path specified by falcon.recipe.path in client.properties file. falcon.home path is used if its not specified in client.properties file. If its not specified in client.properties file and also if files cannot be found at falcon.home, Falcon CLI will fail.</p>
<p>Optional Args : -tool &lt;recipeToolClassName&gt; Falcon provides a base tool that recipes can override. If this option is not specified the default Recipe Tool RecipeTool defined is used. This option is required if user defines his own recipe tool class.</p>
<p>Example: $FALCON_HOME/bin/falcon recipe -name hdfs-replication</p></div>
</div>
</div>
</div>
<hr/>
<footer>
<div class="container-fluid">
<div class="row span12">Copyright &copy; 2013-2018
<a href="http://www.apache.org">Apache Software Foundation</a>.
All Rights Reserved.
</div>
</div>
</footer>
</body>
</html>