Return-Path: X-Original-To: apmail-falcon-commits-archive@minotaur.apache.org Delivered-To: apmail-falcon-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 035B210E8A for ; Thu, 6 Feb 2014 07:39:19 +0000 (UTC) Received: (qmail 11744 invoked by uid 500); 6 Feb 2014 07:39:18 -0000 Delivered-To: apmail-falcon-commits-archive@falcon.apache.org Received: (qmail 11696 invoked by uid 500); 6 Feb 2014 07:39:16 -0000 Mailing-List: contact commits-help@falcon.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@falcon.incubator.apache.org Delivered-To: mailing list commits@falcon.incubator.apache.org Received: (qmail 11687 invoked by uid 99); 6 Feb 2014 07:39:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Feb 2014 07:39:15 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Feb 2014 07:39:03 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id C56DF2388C74; Thu, 6 Feb 2014 07:38:10 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r1565098 [14/15] - in /incubator/falcon: site/ site/0.3-incubating/ site/0.3-incubating/docs/ site/0.3-incubating/docs/restapi/ site/0.4-incubating/ site/0.4-incubating/css/ site/0.4-incubating/docs/ site/0.4-incubating/docs/restapi/ site/0... Date: Thu, 06 Feb 2014 07:38:02 -0000 To: commits@falcon.incubator.apache.org From: sriksun@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140206073810.C56DF2388C74@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/FalconCLI.twiki URL: http://svn.apache.org/viewvc/incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/FalconCLI.twiki?rev=1565098&view=auto ============================================================================== --- incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/FalconCLI.twiki (added) +++ incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/FalconCLI.twiki Thu Feb 6 07:37:58 2014 @@ -0,0 +1,166 @@ +---+FalconCLI + +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. + +---++Entity Management Operations + +---+++Submit + +Submit option is used to set up entity definition. + +Example: +$FALCON_HOME/bin/falcon entity -submit -type cluster -file /cluster/definition.xml + +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. + +---+++Schedule + +Once submitted, an entity can be scheduled using schedule option. Process and feed can only be scheduled. + +Usage: +$FALCON_HOME/bin/falcon entity -type [process|feed] -name <> -schedule + +Example: +$FALCON_HOME/bin/falcon entity -type process -name sampleProcess -schedule + +---+++Suspend + +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 schedulable entities(process/feed) can be suspended. + +Usage: +$FALCON_HOME/bin/falcon entity -type [feed|process] -name <> -suspend + +---+++Resume + +Puts a suspended process/feed back to active, which in turn resumes applicable oozie bundle. + +Usage: + $FALCON_HOME/bin/falcon entity -type [feed|process] -name <> -resume + +---+++Delete + +Delete removes the submitted entity definition for the specified entity and put it into the archive. + +Usage: +$FALCON_HOME/bin/falcon entity -type [cluster|feed|process] -name <> -delete + +---+++List + +Entities of a particular type can be listed with list sub-command. + +Usage: +$FALCON_HOME/bin/falcon entity -type [cluster|feed|process] -list + +---+++Update + +Update operation allows an already submitted/scheduled entity to be updated. Cluster update is currently +not allowed. + +Usage: +$FALCON_HOME/bin/falcon entity -type [feed|process] -name <> -update + +---+++Status + +Status returns the current status of the entity. + +Usage: +$FALCON_HOME/bin/falcon entity -type [cluster|feed|process] -name <> -status + +---+++Dependency + +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. + +Usage: +$FALCON_HOME/bin/falcon entity -type [cluster|feed|process] -name <> -dependency + +---+++Definition + +Definition option returns the entity definition submitted earlier during submit step. + +Usage: +$FALCON_HOME/bin/falcon entity -type [cluster|feed|process] -name <> -definition + +---++Instance Management Options + +---+++Kill + +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. + +Note: +1. For all the instance management sub-commands, if end time is not specified, Falcon will perform the actions on all the instances whose instance time falls after the start time. + +2. The start time and end time needs to be specified in TZ format. +Example: 01 Jan 2012 01:00 => 2012-01-01T01:00Z + +3. Process name is compulsory parameter for each instance management command. + +Usage: +$FALCON_HOME/bin/falcon instance -type <> -name <> -kill -start "yyyy-MM-dd'T'HH:mm'Z'" -end "yyyy-MM-dd'T'HH:mm'Z'" + +---+++Suspend + +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. + +Usage: +$FALCON_HOME/bin/falcon instance -type <> -name <> -suspend -start "yyyy-MM-dd'T'HH:mm'Z'" -end "yyyy-MM-dd'T'HH:mm'Z'" + +---+++Continue + +Continue option is used to continue the failed workflow instance. This option is valid only for process instances in terminal state, i.e. SUCCEDDED, KILLED or FAILED. + +Usage: +$FALCON_HOME/bin/falcon instance -type <> -name <> -re-run -start "yyyy-MM-dd'T'HH:mm'Z'" -end "yyyy-MM-dd'T'HH:mm'Z'" + +---+++Rerun + +Rerun option is used to rerun instances of a given process. This option is valid only for process instances in terminal state, i.e. SUCCEDDED, KILLED or FAILED. Optionally, you can specify the properties to override. + +Usage: +$FALCON_HOME/bin/falcon instance -type <> -name <> -re-run -start "yyyy-MM-dd'T'HH:mm'Z'" -end "yyyy-MM-dd'T'HH:mm'Z'" [-file <>] + +---+++Resume + +Resume option is used to resume any instance that is in suspended state. + +Usage: +$FALCON_HOME/bin/falcon instance -type <> -name <> -resume -start "yyyy-MM-dd'T'HH:mm'Z'" -end "yyyy-MM-dd'T'HH:mm'Z'" + +---+++Status + +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 + +Example : Suppose a process has 3 instance, one has succeeded,one is in running state and other one is waiting, the expected output is: + +{"status":"SUCCEEDED","message":"getStatus is successful","instances":[{"instance":"2012-05-07T05:02Z","status":"SUCCEEDED","logFile":"http://oozie-dashboard-url"},{"instance":"2012-05-07T05:07Z","status":"RUNNING","logFile":"http://oozie-dashboard-url"}, {"instance":"2010-01-02T11:05Z","status":"WAITING"}] + +Usage: +$FALCON_HOME/bin/falcon instance -type <> -name <> -status -start "yyyy-MM-dd'T'HH:mm'Z'" -end "yyyy-MM-dd'T'HH:mm'Z'" + +---+++Running + +Running option provides all the running instances of the mentioned process. + +Usage: +$FALCON_HOME/bin/falcon instance -type <> -name <> -running + +---+++Logs + +Get logs for instance actions + +Usage: +$FALCON_HOME/bin/falcon instance -type <> -name <> -logs -start "yyyy-MM-dd'T'HH:mm'Z'" [-end "yyyy-MM-dd'T'HH:mm'Z'"] [-runid <>] + + +---++Admin Options + +---+++Help + +Usage: +$FALCON_HOME/bin/falcon admin -version + +---+++Version + +Version returns the current verion of Falcon installed. +Usage: +$FALCON_HOME/bin/falcon admin -help Added: incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/HiveIntegration.twiki URL: http://svn.apache.org/viewvc/incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/HiveIntegration.twiki?rev=1565098&view=auto ============================================================================== --- incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/HiveIntegration.twiki (added) +++ incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/HiveIntegration.twiki Thu Feb 6 07:37:58 2014 @@ -0,0 +1,342 @@ +---+ Hive Integration + +---++ Overview +Falcon provides data management functions for feeds declaratively. It allows users to represent feed locations as +time-based partition directories on HDFS containing files. + +Hive provides a simple and familiar database like tabular model of data management to its users, +which are backed by HDFS. It supports two classes of tables, managed tables and external tables. + +Falcon allows users to represent feed location as Hive tables. Falcon supports both managed and external tables +and provide data management services for tables such as replication, eviction, archival, etc. Falcon will notify +HCatalog as a side effect of either acquiring, replicating or evicting a data set instance and adds the +missing capability of HCatalog table replication. + +In the near future, Falcon will allow users to express pipeline processing in Hive scripts +apart from Pig and Oozie workflows. + + +---++ Assumptions + * Date is a mandatory first-level partition for Hive tables + * Data availability triggers are based on date pattern in Oozie + * Tables must be created in Hive prior to adding it as a Feed in Falcon. + * Duplicating this in Falcon will create confusion on the real source of truth. Also propagating schema changes + between systems is a hard problem. + * Falcon does not know about the encoding of the data and data should be in HCatalog supported format. + +---++ Configuration +Falcon provides a system level option to enable Hive integration. Falcon must be configured with an implementation +for the catalog registry. The default implementation for Hive is shipped with Falcon. + + +catalog.service.impl=org.apache.falcon.catalog.HiveCatalogService + + + +---++ Incompatible changes +Falcon depends heavily on data-availability triggers for scheduling Falcon workflows. Oozie must support +data-availability triggers based on HCatalog partition availability. This is only available in oozie 4.x. + +Hence, Falcon for Hive support needs Oozie 4.x. + + +---++ Oozie Shared Library setup +Falcon post Hive integration depends heavily on the [[http://oozie.apache.org/docs/4.0.0/WorkflowFunctionalSpec.html#a17_HDFS_Share_Libraries_for_Workflow_Applications_since_Oozie_2.3][shared library feature of Oozie]]. +Since the sheer number of jars for HCatalog, Pig and Hive are in the many 10s in numbers, its quite daunting to +redistribute the dependent jars from Falcon. + +[[http://oozie.apache.org/docs/4.0.0/DG_QuickStart.html#Oozie_Share_Lib_Installation][This is a one time effort in Oozie setup and is quite straightforward.]] + + +---++ Approach + +---+++ Entity Changes + + * Cluster DSL will have an additional registry-interface section, specifying the endpoint for the +HCatalog server. If this is absent, no HCatalog publication will be done from Falcon for this cluster. + thrift://hcatalog-server:port + * Feed DSL will allow users to specify the URI (location) for HCatalog tables as: + catalog:database_name:table_name#partitions(key=value?)* + * Failure to publish to HCatalog will be retried (configurable # of retires) with back off. Permanent failures + after all the retries are exhausted will fail the Falcon workflow + +---+++ Eviction + + * Falcon will construct DDL statements to filter candidate partitions eligible for eviction drop partitions + * Falcon will construct DDL statements to drop the eligible partitions + * Additionally, Falcon will nuke the data on HDFS for external tables + + +---+++ Replication + + * Falcon will use HCatalog (Hive) API to export the data for a given table and the partition, +which will result in a data collection that includes metadata on the data's storage format, the schema, +how the data is sorted, what table the data came from, and values of any partition keys from that table. + * Falcon will use DistCp tool to copy the exported data collection into the secondary cluster into a staging +directory used by Falcon. + * Falcon will then import the data into HCatalog (Hive) using the HCatalog (Hive) API. If the specified table does +not yet exist, Falcon will create it, using the information in the imported metadata to set defaults for the +table such as schema, storage format, etc. + * The partition is not complete and hence not visible to users until all the data is committed on the secondary +cluster, (no dirty reads) + * Data collection is staged by Falcon and retries for copy continues from where it left off. + * Failure to register with Hive will be retired. After all the attempts are exhausted, +the data will be cleaned up by Falcon. + + +---+++ Security +The user owns all data managed by Falcon. Falcon runs as the user who submitted the feed. Falcon will authenticate +with HCatalog as the end user who owns the entity and the data. + +For Hive managed tables, the table may be owned by the end user or “hive”. For “hive” owned tables, +user will have to configure the feed as “hive”. + + +---++ Load on HCatalog from Falcon +It generally depends on the frequency of the feeds configured in Falcon and how often data is ingested, replicated, +or processed. + + +---++ User Impact + * There should not be any impact to user due to this integration + * Falcon will be fully backwards compatible + * Users have a choice to either choose storage based on files on HDFS as they do today or use HCatalog for +accessing the data in tables + + +---++ Known Limitations + +---+++ Oozie + + * Falcon with Hadoop 1.x requires copying guava jars manually to sharelib in oozie. Hadoop 2.x ships this. + * hcatalog-pig-adapter needs to be copied manually to oozie sharelib. + +bin/hadoop dfs -copyFromLocal $LFS/share/lib/hcatalog/hcatalog-pig-adapter-0.5.0-incubating.jar share/lib/hcatalog + + +---+++ Hive + + * [[https://issues.apache.org/jira/browse/HIVE-5550][Hive table import fails for tables created with default text and sequence file formats using HCatalog API]] +For some arcane reason, hive substitutes the output format for text and sequence to be prefixed with Hive. +Hive table import fails since it compares against the input and output formats of the source table and they are +different. Say, a table was created with out specifying the file format, it defaults to: + +fileFormat=TextFile, inputformat=org.apache.hadoop.mapred.TextInputFormat, outputformat=org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat + + +But, when hive fetches the table from the metastore, it replaces the output format with org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat +and the comparison between source and target table fails. + +org.apache.hadoop.hive.ql.parse.ImportSemanticAnalyzer#checkTable + // check IF/OF/Serde + String existingifc = table.getInputFormatClass().getName(); + String importedifc = tableDesc.getInputFormat(); + String existingofc = table.getOutputFormatClass().getName(); + String importedofc = tableDesc.getOutputFormat(); + if ((!existingifc.equals(importedifc)) + || (!existingofc.equals(importedofc))) { + throw new SemanticException( + ErrorMsg.INCOMPATIBLE_SCHEMA + .getMsg(" Table inputformat/outputformats do not match")); + } + + + +---++ Hive Examples +Following is an example entity configuration for lifecycle management functions for tables in Hive. + +---+++ Hive Table Lifecycle Management - Replication and Retention + +---++++ Primary Cluster + + + + + + + + + + + + + + + + + + + + + +---++++ BCP Cluster + + + + + + + + + + + + + + + + + + + + + +---++++ Feed with replication and eviction policy + + + + + + hours(1) + UTC + + + + + + + + + + + + + + +
+ + + + + + + +---+++ Hive Table used in Processing Pipelines + +---++++ Primary Cluster +The cluster definition from the lifecycle example can be used. + +---++++ Input Feed + + + + + online,bi + hours(1) + UTC + + + + + + + + +
+ + + + + + + +---++++ Output Feed + + + + + online,bi + hours(1) + UTC + + + + + + + + +
+ + + + + + + +---++++ Process + + + + + + + + + + + 1 + FIFO + days(1) + UTC + + + + + + + + + + + + + + + + + + + + +---++++ Pig Script + + +A = load '$input_database.$input_table' using org.apache.hcatalog.pig.HCatLoader(); +B = FILTER A BY $input_filter; +C = foreach B generate id, value; +store C into '$output_database.$output_table' USING org.apache.hcatalog.pig.HCatStorer('$output_dataout_partitions'); + Added: incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/InstallationSteps.twiki URL: http://svn.apache.org/viewvc/incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/InstallationSteps.twiki?rev=1565098&view=auto ============================================================================== --- incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/InstallationSteps.twiki (added) +++ incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/InstallationSteps.twiki Thu Feb 6 07:37:58 2014 @@ -0,0 +1,260 @@ +---++ Building & Installing Falcon + + +---+++ Building Falcon + + +git clone https://git-wip-us.apache.org/repos/asf/incubator-falcon.git falcon + +cd falcon + +export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m" && mvn clean install [For hadoop 1] +export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m" && mvn clean install -Dhadoop.profile=2 [For hadoop 2] + +[optionally -Dhadoop.version=<> can be appended to build for a specific version of hadoop] + + + +Once the build successfully completes, artifacts can be packaged for deployment. The package can be built in embedded or distributed mode. + +*Embedded Mode* + + +mvn clean assembly:assembly -DskipTests -DskipCheck=true [For hadoop 1] +mvn clean assembly:assembly -DskipTests -DskipCheck=true -Dhadoop.profile=2 [For hadoop 2] + + + +Tar can be found in {project dir}/target/falcon-${project.version}-bin.tar.gz + +Tar is structured as follows + + + +|- bin + |- falcon + |- falcon-start + |- falcon-stop + |- falcon-config.sh + |- service-start.sh + |- service-stop.sh +|- conf + |- startup.properties + |- runtime.properties + |- client.properties + |- log4j.xml + |- falcon-env.sh +|- docs +|- client + |- lib (client support libs) +|- server + |- webapp + |- falcon.war +|- hadooplibs +|- README +|- NOTICE.txt +|- LICENSE.txt +|- DISCLAIMER.txt +|- CHANGES.txt + + +*Distributed Mode* + + + +mvn clean assembly:assembly -DskipTests -DskipCheck=true -P distributed -Dhadoop.profile=1 [For hadoop 1] +mvn clean assembly:assembly -DskipTests -DskipCheck=true -P distributed -Dhadoop.profile=2 [For hadoop 2] + + + +Tar can be found in {project dir}/target/falcon-distributed-${project.version}-server.tar.gz + +Tar is structured as follows + + + +|- bin + |- falcon + |- falcon-start + |- falcon-stop + |- falcon-config.sh + |- service-start.sh + |- service-stop.sh + |- prism-stop + |- prism-start +|- conf + |- startup.properties + |- runtime.properties + |- client.properties + |- log4j.xml + |- falcon-env.sh +|- docs +|- client + |- lib (client support libs) +|- server + |- webapp + |- falcon.war + |- prism.war +|- hadooplibs +|- README +|- NOTICE.txt +|- LICENSE.txt +|- DISCLAIMER.txt +|- CHANGES.txt + + +---+++ Installing & running Falcon + +*Installing falcon* + +tar -xzvf {falcon package} +cd falcon-distributed-${project.version} or falcon-${project.version} + + +*Configuring Falcon* + +By default config directory used by faclon is {package dir}/conf. To override this set environemnt variable FALCON_CONF to the path of the conf dir. + +falcon-env.sh has been added to the falcon conf. This file can be used to set various enviornment variables that you need for you services. In addition you can set any other environment variables you might need. This file will be sourced by falcon scripts before any commands are exectuted. The following enviornment variables are available to set. + + +# The java implementation to use. If JAVA_HOME is not found we expect java and jar to be in path +#export JAVA_HOME= + +# any additional java opts you want to set. This will apply to both client and server operations +#export FALCON_OPTS= + +# any additional java opts that you want to set for client only +#export FALCON_CLIENT_OPTS= + +# java heap size we want to set for the client. Default is 1024MB +#export FALCON_CLIENT_HEAP= + +# any additional opts you want to set for prisim service. +#export FALCON_PRISM_OPTS= + +# java heap size we want to set for the prisim service. Default is 1024MB +#export FALCON_PRISM_HEAP= + +# any additional opts you want to set for falcon service. +#export FALCON_SERVER_OPTS= + +# java heap size we want to set for the falcon server. Default is 1024MB +#export FALCON_SERVER_HEAP= + +# What is is considered as falcon home dir. Default is the base locaion of the installed software +#export FALCON_HOME_DIR= + +# Where log files are stored. Defatult is logs directory under the base install location +#export FALCON_LOG_DIR= + +# Where pid files are stored. Defatult is logs directory under the base install location +#export FALCON_PID_DIR= + +# where the falcon active mq data is stored. Defatult is logs/data directory under the base install location +#export FALCON_DATA_DIR= + +# Where do you want to expand the war file. By Default it is in /server/webapp dir under the base install dir. +#export FALCON_EXPANDED_WEBAPP_DIR= + + +*Starting Falcon Server* + +bin/falcon-start [-port ] + + +By default, +* falcon server starts at port 15000. To change the port, use -port option +* falcon server starts embedded active mq. To control this behaviour, set the following system properties using -D option in environment variable FALCON_OPTS: + * falcon.embeddedmq= - Should server start embedded active mq, default true + * falcon.emeddedmq.port= - Port for embedded active mq, default 61616 + * falcon.embeddedmq.data= - Data path for embedded active mq, default {package dir}/logs/data +* falcon server starts with conf from {package dir}/conf. To override this (to use the same conf with multiple falcon upgrades), set environment variable FALCON_CONF to the path of conf dir + +__Adding Extension Libraries__ +Library extensions allows users to add custom libraries to entity lifecycles such as feed retention, feed replication and process execution. This is useful for usecases such as adding filesystem extensions. To enable this, add the following configs to startup.properties: +*.libext.paths= +*.libext.feed.paths= +*.libext.feed.retentions.paths= +*.libext.feed.replication.paths= +*.libext.process.paths= + +The configured jars are added to falcon classpath and the corresponding workflows + + +*Starting Prism* + +bin/prism-start [-port ] + + +By default, +* falcon server starts at port 16000. To change the port, use -port option +* prism starts with conf from {package dir}/conf. To override this (to use the same conf with multiple prism upgrades), set environment variable FALCON_CONF to the path of conf dir + +*Using Falcon* + +bin/falcon admin -version +Falcon server build version: {Version:"0.3-SNAPSHOT-rd7e2be9afa2a5dc96acd1ec9e325f39c6b2f17f7",Mode:"embedded"} + +---- + +bin/falcon help +(for more details about falcon cli usage) + + +*Dashboard* + +Once falcon / prism is started, you can view the status of falcon entities using the Web-based dashboard. The web UI works in both distributed and embedded mode. You can open your browser at the corresponding port to use the web UI. + +*Stopping Falcon Server* + +bin/falcon-stop + + +*Stopping Prism* + +bin/prism-stop + + +---+++ Running Examples using embedded package + +bin/falcon-start + +Make sure the hadoop and oozie endpoints are according to your setup in examples/entity/standalone-cluster.xml + +bin/falcon entity -submit -type cluster -file examples/entity/standalone-cluster.xml + +Submit input and output feeds: + +bin/falcon entity -submit -type feed -file examples/entity/in-feed.xml +bin/falcon entity -submit -type feed -file examples/entity/out-feed.xml + +Set-up workflow for the process: + +hadoop fs -put examples/app / + +Submit and schedule the process: + +bin/falcon entity -submitAndSchedule -type process -file examples/entity/oozie-mr-process.xml +bin/falcon entity -submitAndSchedule -type process -file examples/entity/pig-process.xml + +Generate input data: + +examples/data/generate.sh <> + +Get status of instances: + +bin/falcon instance -status -type process -name oozie-mr-process -start 2013-11-15T00:05Z -end 2013-11-15T01:00Z + + + + +---+++ Preparing oozie bundle for use with Falcon + +cd <> +mkdir target/package +src/bin/pacakge.sh <> + +>> ex. src/bin/pacakge.sh 1.1.2 or src/bin/pacakge.sh 0.20.2-cdh3u5 +>> oozie bundle available in target/package/oozie-4.0.0/distro/target/oozie-4.0.0-distro.tar.gz + Added: incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/OnBoarding.twiki URL: http://svn.apache.org/viewvc/incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/OnBoarding.twiki?rev=1565098&view=auto ============================================================================== --- incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/OnBoarding.twiki (added) +++ incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/OnBoarding.twiki Thu Feb 6 07:37:58 2014 @@ -0,0 +1,265 @@ +---++ Contents + * Onboarding Steps + * Sample Pipeline + * [[HiveIntegration][Hive Examples]] + +---+++ Onboarding Steps + * Create cluster definition for the cluster, specifying name node, job tracker, workflow engine endpoint, messaging endpoint. Refer to [[EntitySpecification][cluster definition]] for details. + * Create Feed definitions for each of the input and output specifying frequency, data path, ownership. Refer to [[EntitySpecification][feed definition]] for details. + * Create Process definition for your job. Process defines configuration for the workflow job. Important attributes are frequency, inputs/outputs and workflow path. Refer to [[EntitySpecification][process definition]] for process details. + * Define workflow for your job using the workflow engine(only oozie is supported as of now). Refer [[http://incubator.apache.org/oozie/docs/3.1.3/docs/WorkflowFunctionalSpec.html][Oozie Workflow Specification]]. The libraries required for the workflow should be available in lib folder in workflow path. + * Set-up workflow definition, libraries and referenced scripts on hadoop. + * Submit cluster definition + * Submit and schedule feed and process definitions + + +---+++ Sample Pipeline +---++++ Cluster +Cluster definition that contains end points for name node, job tracker, oozie and jms server: + + + + + + + + + + + + + + + + + + + + + + + + +---++++ Input Feed +Hourly feed that defines feed path, frequency, ownership and validity: + + + + + + group + + hours(1) + + + + + + + + + + + + + + + + + + + + + + +---++++ Output Feed +Daily feed that defines feed path, frequency, ownership and validity: + + + + + + group + + days(1) + + + + + + + + + + + + + + + + + + + + + + +---++++ Process +Sample process which runs daily at 6th hour on corp cluster. It takes one input - SampleInput for the previous day(24 instances). It generates one output - SampleOutput for previous day. The workflow is defined at /projects/bootcamp/workflow/workflow.xml. Any libraries available for the workflow should be at /projects/bootcamp/workflow/lib. The process also defines properties queueName, ssh.host, and fileTimestamp which are passed to the workflow. In addition, Falcon exposes the following properties to the workflow: nameNode, jobTracker(hadoop properties), input and output(Input/Output properties). + + + + + + + + days(1) + + + + + + + + + + + + + + + + + + + + + + + + + + + +---++++ Oozie Workflow +The sample user workflow contains 3 actions: + * Pig action - Executes pig script /projects/bootcamp/workflow/script.pig + * concatenator - Java action that concatenates part files and generates a single file + * file upload - ssh action that gets the concatenated file from hadoop and sends the file to a remote host + + + + + + + + ${jobTracker} + ${nameNode} + + + + + + mapred.job.queue.name + ${queueName} + + + mapreduce.fileoutputcommitter.marksuccessfuljobs + true + + + + input=${input} + output=${output} + lib/dependent.jar + + + + + + + + ${jobTracker} + ${nameNode} + + + + + + mapred.job.queue.name + ${queueName} + + + com.wf.Concatenator + ${output} + ${nameNode}/projects/bootcamp/concat/data-${fileTimestamp}.csv + + + + + + + + localhost + /tmp/fileupload.sh + ${nameNode}/projects/bootcamp/concat/data-${fileTimestamp}.csv + ${wf:conf("ssh.host")} + + + + + + + + + + ${wf:actionData('fileupload')['output'] == '0'} + + + + + + + Workflow failed, error message[${wf:errorMessage(wf:lastErrorNode())}] + + + + + + +---++++ File Upload Script +The script gets the file from hadoop, rsyncs the file to /tmp on remote host and deletes the file from hadoop + +#!/bin/bash + +trap 'echo "output=$?"; exit $?' ERR INT TERM + +echo "Arguments: $@" +SRCFILE=$1 +DESTHOST=$3 + +FILENAME=`basename $SRCFILE` +rm -f /tmp/$FILENAME +hadoop fs -copyToLocal $SRCFILE /tmp/ +echo "Copied $SRCFILE to /tmp" + +rsync -ztv --rsh=ssh --stats /tmp/$FILENAME $DESTHOST:/tmp +echo "rsynced $FILENAME to $DESTUSER@$DESTHOST:$DESTFILE" + +hadoop fs -rmr $SRCFILE +echo "Deleted $SRCFILE" + +rm -f /tmp/$FILENAME +echo "output=0" + Added: incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/AdminConfig.twiki URL: http://svn.apache.org/viewvc/incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/AdminConfig.twiki?rev=1565098&view=auto ============================================================================== --- incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/AdminConfig.twiki (added) +++ incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/AdminConfig.twiki Thu Feb 6 07:37:58 2014 @@ -0,0 +1,36 @@ +---++ GET /api/admin/config/:config-type + * Description + * Parameters + * Results + * Examples + +---++ Description +Get configuration information of the falcon server. + +---++ Parameters + * :config-type can be build, deploy, startup or runtime + +---++ Results +Configuration information of the server. + +---++ Examples +---+++ Rest Call + +GET http://localhost:15000/api/admin/config/deploy +Remote-User: rgautam + +---+++ Result + +{ + "properties": [ + { + "value": "embedded", + "key": "deploy.mode" + }, + { + "value": "all", + "key": "domain" + } + ] +} + Added: incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/AdminStack.twiki URL: http://svn.apache.org/viewvc/incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/AdminStack.twiki?rev=1565098&view=auto ============================================================================== --- incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/AdminStack.twiki (added) +++ incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/AdminStack.twiki Thu Feb 6 07:37:58 2014 @@ -0,0 +1,40 @@ +---++ GET /api/admin/stack + * Description + * Parameters + * Results + * Examples + +---++ Description +Get stack trace of the falcon server. + +---++ Parameters +None. +---++ Results +Stack trace of the server. + +---++ Examples +---+++ Rest Call + +GET http://localhost:15000/api/admin/stack +Remote-User: rgautam + +---+++ Result + +Reference Handler +State: WAITING +java.lang.Object.wait(Native Method) +java.lang.Object.wait(Object.java:485) +java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)Finalizer + +... + +State: TIMED_WAITING +sun.misc.Unsafe.park(Native Method) +java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:196) +java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:424) +java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:323) +java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:874) +java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:955) +java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:917) +java.lang.Thread.run(Thread.java:695) + Added: incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/AdminVersion.twiki URL: http://svn.apache.org/viewvc/incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/AdminVersion.twiki?rev=1565098&view=auto ============================================================================== --- incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/AdminVersion.twiki (added) +++ incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/AdminVersion.twiki Thu Feb 6 07:37:58 2014 @@ -0,0 +1,35 @@ +---++ GET /api/admin/version + * Description + * Parameters + * Results + * Examples + +---++ Description +Get version of the falcon server. + +---++ Parameters +None. +---++ Results +Version of the server. + +---++ Examples +---+++ Rest Call + +GET http://localhost:15000/api/admin/version +Remote-User: rgautam + +---+++ Result + +{ + "properties":[ + { + "key":"Version", + "value":"0.4-incubating-SNAPSHOT-rb47788d1112fcf949c22a3860934167237b395b0" + }, + { + "key":"Mode", + "value":"embedded" + } + ] +} + Added: incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityDefinition.twiki URL: http://svn.apache.org/viewvc/incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityDefinition.twiki?rev=1565098&view=auto ============================================================================== --- incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityDefinition.twiki (added) +++ incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityDefinition.twiki Thu Feb 6 07:37:58 2014 @@ -0,0 +1,53 @@ +---++ GET /api/entities/definition/:entity-type/:entity-name + * Description + * Parameters + * Results + * Examples + +---++ Description +Get definition of the entity. + +---++ Parameters + * :entity-type can be cluster, feed or process. + * :entity-name is name of the entity. + +---++ Results +Definition of the entity. + +---++ Examples +---+++ Rest Call + +GET http://localhost:15000/api/entities/definition/process/SampleProcess +Remote-User: rgautam + +---+++ Result + + + + + + + + + 1 + FIFO + hours(1) + UTC + + + + + + + + + + + + + + + + + + Added: incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityDelete.twiki URL: http://svn.apache.org/viewvc/incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityDelete.twiki?rev=1565098&view=auto ============================================================================== --- incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityDelete.twiki (added) +++ incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityDelete.twiki Thu Feb 6 07:37:58 2014 @@ -0,0 +1,31 @@ +---++ DELETE /api/entities/delete/:entity-type/:entity-name + * Description + * Parameters + * Results + * Examples + +---++ Description +Delete the specified entity. + +---++ Parameters + * :entity-type can be feed or process. + * :entity-name is name of the feed or process. + +---++ Results +Results of the delete operation. + +---++ Examples +---+++ Rest Call + +DELETE http://localhost:15000/api/entities/delete/cluster/SampleProcess +Remote-User: rgautam + +---+++ Result + +{ + "requestId": "falcon\/17ff6ca6-1c8a-459f-9ba8-8fec480e384a\n", + "message": "falcon\/SampleProcess(cluster) removed successfully\n", + "status": "SUCCEEDED" +} + + Added: incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityDependencies.twiki URL: http://svn.apache.org/viewvc/incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityDependencies.twiki?rev=1565098&view=auto ============================================================================== --- incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityDependencies.twiki (added) +++ incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityDependencies.twiki Thu Feb 6 07:37:58 2014 @@ -0,0 +1,41 @@ +---++ GET /api/entities/dependencies/:entity-type/:entity-name + * Description + * Parameters + * Results + * Examples + +---++ Description +Get dependencies of the entity. + +---++ Parameters + * :entity-type can be cluster, feed or process. + * :entity-name is name of the entity. + +---++ Results +Dependenciess of the entity. + +---++ Examples +---+++ Rest Call + +GET http://localhost:15000/api/entities/dependencies/process/SampleProcess +Remote-User: rgautam + +---+++ Result + +{ + "entity": [ + { + "name": "SampleInput", + "type": "feed" + }, + { + "name": "SampleOutput", + "type": "feed" + }, + { + "name": "primary-cluster", + "type": "cluster" + } + ] +} + Added: incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityList.twiki URL: http://svn.apache.org/viewvc/incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityList.twiki?rev=1565098&view=auto ============================================================================== --- incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityList.twiki (added) +++ incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityList.twiki Thu Feb 6 07:37:58 2014 @@ -0,0 +1,62 @@ +---++ GET /api/entities/list/:entity-type?fields=:fields + * Description + * Parameters + * Results + * Examples + +---++ Description +Get list of the entities. + +---++ Parameters + * :entity-type can be cluster, feed or process. + * :fields (optional) additional fields that the client are interested in, separated by commas. + Currently falcon only support status as a valid field. + +---++ Results +List of the entities. + +---++ Examples +---+++ Rest Call + +GET http://localhost:15000/api/entities/list/feed +Remote-User: rgautam + +---+++ Result + +{ + "entity": [ + { + "name": "SampleOutput", + "type": "feed" + }, + { + "name": "SampleInput", + "type": "feed" + } + ] +} + + +---+++ Rest Call + +GET http://localhost:15000/api/entities/list/feed?fields=status +Remote-User: rgautam + +---+++ Result + +{ + "entity": [ + { + "name" : "SampleOutput", + "type" : "feed", + "status": "RUNNING" + }, + { + "name": "SampleInput", + "type": "feed", + "status": "RUNNING" + } + ] +} + + Added: incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityResume.twiki URL: http://svn.apache.org/viewvc/incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityResume.twiki?rev=1565098&view=auto ============================================================================== --- incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityResume.twiki (added) +++ incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityResume.twiki Thu Feb 6 07:37:58 2014 @@ -0,0 +1,30 @@ +---++ POST /api/entities/resume/:entity-type/:entity-name + * Description + * Parameters + * Results + * Examples + +---++ Description +Resume a supended entity. + +---++ Parameters + * :entity-type can either be a feed or a process. + * :entity-name is name of the entity. + +---++ Results +Result of the resume command. + +---++ Examples +---+++ Rest Call + +POST http://localhost:15000/api/entities/resume/process/SampleProcess +Remote-User: rgautam + +---+++ Result + +{ + "requestId": "default\/106582a9-130f-4903-8b8f-f95d7b286c30\n", + "message": "default\/SampleProcess(process) resumed successfully\n", + "status": "SUCCEEDED" +} + Added: incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntitySchedule.twiki URL: http://svn.apache.org/viewvc/incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntitySchedule.twiki?rev=1565098&view=auto ============================================================================== --- incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntitySchedule.twiki (added) +++ incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntitySchedule.twiki Thu Feb 6 07:37:58 2014 @@ -0,0 +1,30 @@ +---++ POST /api/entities/schedule/:entity-type/:entity-name + * Description + * Parameters + * Results + * Examples + +---++ Description +Schedule an entity. + +---++ Parameters + * :entity-type can either be a feed or a process. + * :entity-name is name of the entity. + +---++ Results +Result of the schedule command. + +---++ Examples +---+++ Rest Call + +POST http://localhost:15000/api/entities/schedule/process/SampleProcess +Remote-User: rgautam + +---+++ Result + +{ + "requestId": "default\/ee735c95-98bd-41b8-a705-2e78bcfcdcd9\n", + "message": "default\/SampleProcess(process) scheduled successfully\n", + "status": "SUCCEEDED" +} + Added: incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityStatus.twiki URL: http://svn.apache.org/viewvc/incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityStatus.twiki?rev=1565098&view=auto ============================================================================== --- incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityStatus.twiki (added) +++ incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityStatus.twiki Thu Feb 6 07:37:58 2014 @@ -0,0 +1,30 @@ +---++ GET /api/entities/status/:entity-type/:entity-name + * Description + * Parameters + * Results + * Examples + +---++ Description +Get status of the entity. + +---++ Parameters + * :entity-type can be cluster, feed or process. + * :entity-name is name of the entity. + +---++ Results +Status of the entity. + +---++ Examples +---+++ Rest Call + +GET http://localhost:15000/api/entities/status/process/SampleProcess +Remote-User: rgautam + +---+++ Result + +{ + "requestId": "default\/4d35b382-852a-4bc7-9972-b9db3493322a\n", + "message": "default\/SUBMITTED\n", + "status": "SUCCEEDED" +} + Added: incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntitySubmit.twiki URL: http://svn.apache.org/viewvc/incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntitySubmit.twiki?rev=1565098&view=auto ============================================================================== --- incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntitySubmit.twiki (added) +++ incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntitySubmit.twiki Thu Feb 6 07:37:58 2014 @@ -0,0 +1,106 @@ +---++ POST api/entities/submit/:entity-type + * Description + * Parameters + * Results + * Examples + +---++ Description +Submit the given entity. + +---++ Parameters +:entity-type can be cluster, feed or process. + +---++ Results +Result of the submission. + +---++ Examples +---+++ Rest Call + +POST http://localhost:15000/api/entities/submit/feed +Remote-User: rgautam + + + + + group + hours(1) + + + + + + + + + + + + + + + + + + + + + +---+++ Result + +{ + "requestId": "default\/d72a41f7-6420-487b-8199-62d66e492e35\n", + "message": "default\/Submit successful (feed) SampleInput\n", + "status": "SUCCEEDED" +} + + +---+++ Rest Call + +POST http://localhost:15000/api/entities/submit/process +Remote-User: rgautam + + + + + + + + + + 1 + FIFO + hours(1) + + + + + + + + + + + + + + + + + + + + + + + + +---+++ Result + +{ + "requestId": "default\/e5cc8230-f356-4566-9b65-536abdff8aa3\n", + "message": "default\/Submit successful (process) SampleProcess\n", + "status": "SUCCEEDED" +} + \ No newline at end of file Added: incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntitySubmitAndSchedule.twiki URL: http://svn.apache.org/viewvc/incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntitySubmitAndSchedule.twiki?rev=1565098&view=auto ============================================================================== --- incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntitySubmitAndSchedule.twiki (added) +++ incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntitySubmitAndSchedule.twiki Thu Feb 6 07:37:58 2014 @@ -0,0 +1,63 @@ +---++ POST /api/entities/submitAndSchedule/:entity-type + * Description + * Parameters + * Results + * Examples + +---++ Description +Submits and schedules an entity. + +---++ Parameters + * :entity-type can either be a feed or a process. + +---++ Results +Result of the submit and schedule command. + +---++ Examples +---+++ Rest Call + +POST http://localhost:15000/api/entities/submitAndSchedule/process +Remote-User: rgautam + + + + + + + + + + 1 + FIFO + hours(1) + + + + + + + + + + + + + + + + + + + + + + + +---+++ Result + +{ + "requestId": "schedule\/default\/b5b40931-175b-4b15-8f2b-02ef2e66f06b\n\nsubmit\/default\/b5b40931-175b-4b15-8f2b-02ef2e66f06b\n\n", + "message": "schedule\/default\/SampleProcess(process) scheduled successfully\n\nsubmit\/default\/Submit successful (process) SampleProcess\n\n", + "status": "SUCCEEDED" +} + Added: incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntitySuspend.twiki URL: http://svn.apache.org/viewvc/incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntitySuspend.twiki?rev=1565098&view=auto ============================================================================== --- incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntitySuspend.twiki (added) +++ incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntitySuspend.twiki Thu Feb 6 07:37:58 2014 @@ -0,0 +1,30 @@ +---++ POST /api/entities/suspend/:entity-type/:entity-name + * Description + * Parameters + * Results + * Examples + +---++ Description +Suspend an entity. + +---++ Parameters + * :entity-type can either be a feed or a process. + * :entity-name is name of the entity. + +---++ Results +Status of the entity. + +---++ Examples +---+++ Rest Call + +POST http://localhost:15000/api/entities/suspend/process/SampleProcess +Remote-User: rgautam + +---+++ Result + +{ + "requestId": "default\/fe5f2b6c-1f2e-49fc-af3a-342079f0b46b\n", + "message": "default\/SampleProcess(process) suspended successfully\n", + "status": "SUCCEEDED" +} + Added: incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityUpdate.twiki URL: http://svn.apache.org/viewvc/incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityUpdate.twiki?rev=1565098&view=auto ============================================================================== --- incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityUpdate.twiki (added) +++ incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityUpdate.twiki Thu Feb 6 07:37:58 2014 @@ -0,0 +1,65 @@ +---++ POST api/entities/update/:entity-type/:entity-name + * Description + * Parameters + * Results + * Examples + +---++ Description +Updates the submitted entity. + +---++ Parameters + * :entity-type can be feed or process. + * :entity-name is name of the feed or process. + +---++ Results +Result of the validation. + +---++ Examples +---+++ Rest Call + +POST http://localhost:15000/api/entities/update/process/SampleProcess +Remote-User: rgautam + + + + + + + + + + 1 + FIFO + hours(1) + + + + + + + + + + + + + + + + + + + + + + + +---+++ Result + +{ + "requestId": "update\/default\/d6aaa328-6836-4818-a212-515bb43d8b86\n\n", + "message": "update\/default\/SampleProcess updated successfully\n\n", + "status": "SUCCEEDED" +} + + Added: incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityValidate.twiki URL: http://svn.apache.org/viewvc/incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityValidate.twiki?rev=1565098&view=auto ============================================================================== --- incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityValidate.twiki (added) +++ incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/EntityValidate.twiki Thu Feb 6 07:37:58 2014 @@ -0,0 +1,172 @@ +---++ POST api/entities/validate/entity-type + * Description + * Parameters + * Results + * Examples + +---++ Description +Validates the submitted entity. + +---++ Parameters +:entity-type can be cluster, feed or process. + +---++ Results +Result of the validation. + +---++ Examples +---+++ Rest Call + +POST http://localhost:15000/api/entities/validate/cluster +Remote-User: rgautam + + + + + + + + + + + + + + + + +---+++ Result + +{ + "requestId": "dd3f6c3a-a6f1-4c50-97fb-3f9a3f698e10", + "message": "Validated successfully (CLUSTER) primary-cluster", + "status": "SUCCEEDED" +} + + +---+++ Rest Call + +POST http://localhost:15000/api/entities/validate/feed +Remote-User: rgautam + + + + + group + hours(1) + + + + + + + + + + + + + + + + + + + + + +---+++ Result + +{ + "requestId": "c85b190e-e653-493a-a863-d62de9c2e3b0", + "message": "Validated successfully (FEED) SampleInput", + "status": "SUCCEEDED" +} + + +---+++ Rest Call + +POST http://localhost:15000/api/entities/validate/feed +Remote-User: rgautam + + + + + group + hours(1) + + + + + + + + + + + + + + + + + +---+++ Result + +{ + "requestId": "60781732-460e-4c6c-ba86-a75fae574b05", + "message": "Validated successfully (FEED) SampleOutput", + "status": "SUCCEEDED" +} + + +---+++ Rest Call + +POST http://localhost:15000/api/entities/validate/process +Remote-User: rgautam + + + + + + + + + + 1 + FIFO + hours(1) + + + + + + + + + + + + + + + + + + + + + + + + +---+++ Result + +{ + "requestId": "e4a965c6-c7a2-41d9-ba08-2e77f1c43f57", + "message": "Validated successfully (PROCESS) SampleProcess", + "status": "SUCCEEDED" +} + \ No newline at end of file Added: incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceKill.twiki URL: http://svn.apache.org/viewvc/incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceKill.twiki?rev=1565098&view=auto ============================================================================== --- incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceKill.twiki (added) +++ incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceKill.twiki Thu Feb 6 07:37:58 2014 @@ -0,0 +1,42 @@ +---++ POST /api/instance/kill/:entity-type/:entity-name + * Description + * Parameters + * Results + * Examples + +---++ Description +Kill a currently running instance. + +---++ Parameters + * :entity-type can either be a feed or a process. + * :entity-name is name of the entity. + * start start time of the entity. + +---++ Results +Result of the kill operation. + +---++ Examples +---+++ Rest Call + +POST http://localhost:15000/api/instance/kill/process/SampleProcess?colo=*&start=2012-04-03T07:00Z +Remote-User: rgautam + +---+++ Result + +{ + "instances": [ + { + "details": "", + "endTime": "2013-10-21T15:26:59-07:00", + "startTime": "2013-10-21T15:19:57-07:00", + "cluster": "primary-cluster", + "logFile": "http:\/\/localhost:11000\/oozie?job=0000070-131021115933395-oozie-rgau-W", + "status": "KILLED", + "instance": "2012-04-03T07:00Z" + } + ], + "requestId": "default\/23b3cfee-ee22-40c0-825d-39c322587d5f\n", + "message": "default\/KILL\n", + "status": "SUCCEEDED" +} + Added: incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceLogs.twiki URL: http://svn.apache.org/viewvc/incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceLogs.twiki?rev=1565098&view=auto ============================================================================== --- incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceLogs.twiki (added) +++ incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceLogs.twiki Thu Feb 6 07:37:58 2014 @@ -0,0 +1,49 @@ +---++ GET /api/instance/logs/:entity-type/:entity-name + * Description + * Parameters + * Results + * Examples + +---++ Description +Get log of a specific instance of an entity. + +---++ Parameters + * :entity-type can either be a feed or a process. + * :entity-name is name of the entity. + * start is the start time of the instace that you want to refer to + +---++ Results +Log of specified instance. + +---++ Examples +---+++ Rest Call + +GET http://localhost:15000/api/instance/logs/process/SampleProcess?colo=*&start=2012-04-03T07:00Z +Remote-User: rgautam + +---+++ Result + +{ + "instances": [ + { + "actions": [ + { + "logFile": "http:\/\/localhost:50070\/data\/apps\/falcon\/staging\/falcon\/workflows\/process\/SampleProcess\/logs\/job-2012-04-03-07-00\/000\/pig_SUCCEEDED.log", + "status": "SUCCEEDED", + "action": "pig" + } + ], + "details": "", + "endTime": "2013-10-21T14:40:26-07:00", + "startTime": "2013-10-21T14:39:56-07:00", + "cluster": "primary-cluster", + "logFile": "http:\/\/localhost:50070\/data\/apps\/falcon\/staging\/falcon\/workflows\/process\/SampleProcess\/logs\/job-2012-04-03-07-00\/000\/oozie.log", + "status": "SUCCEEDED", + "instance": "2012-04-03T07:00Z" + } + ], + "requestId": "default\/3527038e-8334-4e50-8173-76c4fa430d0b\n", + "message": "default\/STATUS\n", + "status": "SUCCEEDED" +} + Added: incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceRerun.twiki URL: http://svn.apache.org/viewvc/incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceRerun.twiki?rev=1565098&view=auto ============================================================================== --- incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceRerun.twiki (added) +++ incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceRerun.twiki Thu Feb 6 07:37:58 2014 @@ -0,0 +1,41 @@ +---++ POST /api/instance/rerun/:entity-type/:entity-name + * Description + * Parameters + * Results + * Examples + +---++ Description +Rerun a specific instance of an entity. + +---++ Parameters + * :entity-type can either be a feed or a process. + * :entity-name is name of the entity. + * start is the start time of the instance that you want to refer to + +---++ Results +Results of the rerun command. + +---++ Examples +---+++ Rest Call + +POST http://localhost:15000/api/instance/rerun/process/SampleProcess?colo=*&start=2012-04-03T07:00Z +Remote-User: rgautam + +---+++ Result + +{ + "instances": [ + { + "details": "", + "startTime": "2013-10-21T15:10:47-07:00", + "cluster": "primary-cluster", + "logFile": "http:\/\/localhost:11000\/oozie?job=0000070-131021115933395-oozie-rgau-W", + "status": "RUNNING", + "instance": "2012-04-03T07:00Z" + } + ], + "requestId": "default\/7a3582bd-608c-45a7-9b74-1837b51ba6d5\n", + "message": "default\/RERUN\n", + "status": "SUCCEEDED" +} + Added: incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceResume.twiki URL: http://svn.apache.org/viewvc/incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceResume.twiki?rev=1565098&view=auto ============================================================================== --- incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceResume.twiki (added) +++ incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceResume.twiki Thu Feb 6 07:37:58 2014 @@ -0,0 +1,41 @@ +---++ POST /api/instance/resume/:entity-type/:entity-name + * Description + * Parameters + * Results + * Examples + +---++ Description +Resume a specific instance of an entity. + +---++ Parameters + * :entity-type can either be a feed or a process. + * :entity-name is name of the entity. + * start is the start time of the instance that you want to refer to + +---++ Results +Results of the resume command. + +---++ Examples +---+++ Rest Call + +POST http://localhost:15000/api/instance/resume/process/SampleProcess?colo=*&start=2012-04-03T07:00Z +Remote-User: rgautam + +---+++ Result + +{ + "instances": [ + { + "details": "", + "startTime": "2013-10-21T15:19:57-07:00", + "cluster": "primary-cluster", + "logFile": "http:\/\/localhost:11000\/oozie?job=0000070-131021115933395-oozie-rgau-W", + "status": "RUNNING", + "instance": "2012-04-03T07:00Z" + } + ], + "requestId": "default\/e88ff2e0-2af7-4829-a360-f92e95be2981\n", + "message": "default\/RESUME\n", + "status": "SUCCEEDED" +} + Added: incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceRunning.twiki URL: http://svn.apache.org/viewvc/incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceRunning.twiki?rev=1565098&view=auto ============================================================================== --- incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceRunning.twiki (added) +++ incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceRunning.twiki Thu Feb 6 07:37:58 2014 @@ -0,0 +1,38 @@ +---++ GET /api/instance/running/:entity-type/:entity-name + * Description + * Parameters + * Results + * Examples + +---++ Description +Get a list of instances currently running for a given entity. + +---++ Parameters + * :entity-type can either be a feed or a process. + * :entity-name is name of the entity. + +---++ Results +List of instances currently running. + +---++ Examples +---+++ Rest Call + +GET http://localhost:15000/api/instance/running/process/SampleProcess?colo=* +Remote-User: rgautam + +---+++ Result + +{ + "instances": [ + { + "startTime": "2013-10-21T14:39:28-07:00", + "cluster": "primary-cluster", + "status": "RUNNING", + "instance": "2012-04-03T06:00Z" + } + ], + "requestId": "default\/12e9a7d4-3b4f-4a76-b471-c8f3786a62a0\n", + "message": "default\/Running Instances\n", + "status": "SUCCEEDED" +} + Added: incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceStatus.twiki URL: http://svn.apache.org/viewvc/incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceStatus.twiki?rev=1565098&view=auto ============================================================================== --- incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceStatus.twiki (added) +++ incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceStatus.twiki Thu Feb 6 07:37:58 2014 @@ -0,0 +1,42 @@ +---++ GET /api/instance/status/:entity-type/:entity-name + * Description + * Parameters + * Results + * Examples + +---++ Description +Get status of a specific instance of an entity. + +---++ Parameters + * :entity-type can either be a feed or a process. + * :entity-name is name of the entity. + * start is the start time of the instance that you want to refer to + +---++ Results +Status of the specified instance. + +---++ Examples +---+++ Rest Call + +GET http://localhost:15000/api/instance/status/process/SampleProcess?colo=*&start=2012-04-03T07:00Z +Remote-User: rgautam + +---+++ Result + +{ + "instances": [ + { + "details": "", + "endTime": "2013-10-21T14:40:26-07:00", + "startTime": "2013-10-21T14:39:56-07:00", + "cluster": "primary-cluster", + "logFile": "http:\/\/localhost:11000\/oozie?job=0000070-131021115933395-oozie-rgau-W", + "status": "SUCCEEDED", + "instance": "2012-04-03T07:00Z" + } + ], + "requestId": "default\/e15bb378-d09f-4911-9df2-5334a45153d2\n", + "message": "default\/STATUS\n", + "status": "SUCCEEDED" +} + Added: incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceSuspend.twiki URL: http://svn.apache.org/viewvc/incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceSuspend.twiki?rev=1565098&view=auto ============================================================================== --- incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceSuspend.twiki (added) +++ incubator/falcon/trunk/releases/0.4-incubating/src/site/twiki/docs/restapi/InstanceSuspend.twiki Thu Feb 6 07:37:58 2014 @@ -0,0 +1,42 @@ +---++ POST /api/instance/suspend/:entity-type/:entity-name + * Description + * Parameters + * Results + * Examples + +---++ Description +Suspend a specific instance of an entity. + +---++ Parameters + * :entity-type can either be a feed or a process. + * :entity-name is name of the entity. + * start is the start time of the instance that you want to refer to + +---++ Results +Results of the suspend command. + +---++ Examples +---+++ Rest Call + +POST http://localhost:15000/api/instance/suspend/process/SampleProcess?colo=*&start=2012-04-03T07:00Z +Remote-User: rgautam + +---+++ Result + +{ + "instances": [ + { + "details": "", + "endTime": "2013-10-21T15:15:01-07:00", + "startTime": "2013-10-21T15:14:32-07:00", + "cluster": "primary-cluster", + "logFile": "http:\/\/localhost:11000\/oozie?job=0000070-131021115933395-oozie-rgau-W", + "status": "SUCCEEDED", + "instance": "2012-04-03T07:00Z" + } + ], + "requestId": "default\/ff07e45b-b6da-4f47-ae96-9182bd8a7e53\n", + "message": "default\/SUSPEND\n", + "status": "SUCCEEDED" +} +