Added: eagle/site/docs/latest/mkdocs/js/lunr-0.5.7.min.js
URL:
http://svn.apache.org/viewvc/eagle/site/docs/latest/mkdocs/js/lunr-0.5.7.min.js?rev=1789965&view=auto
==============================================================================
--- eagle/site/docs/latest/mkdocs/js/lunr-0.5.7.min.js (added)
+++ eagle/site/docs/latest/mkdocs/js/lunr-0.5.7.min.js Mon Apr 3 11:33:14 2017
@@ -0,0 +1,7 @@
+/**
+ * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as
bright - 0.5.7
+ * Copyright (C) 2014 Oliver Nightingale
+ * MIT Licensed
+ * @license
+ */
+!function(){var t=function(e){var n=new t.Index;return
n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.5.7",t.utils={},t.utils.warn=function(t){return
function(e){t.console&&console.warn&&console.warn(e)}}(this),t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var
t=Array.prototype.slice.call(arguments),e=t.pop(),n=t;if("function"!=typeof
e)throw new TypeError("last argument must be a
function");n.forEach(function(t){this.hasHandler(t)||(this.events[t]=[]),this.events[t].push(e)},this)},t.EventEmitter.prototype.removeListener=function(t,e){if(this.hasHandler(t)){var
n=this.events[t].indexOf(e);this.events[t].splice(n,1),this.events[t].length||delete
this.events[t]}},t.EventEmitter.prototype.emit=function(t){if(this.hasHandler(t)){var
e=Array.prototype.slice.call(arguments,1);this.events[t].forEach(function(t){t.apply(void
0,e)})}},t.EventEmitter.prototype.hasHandler=function(t){return t in
this.events},t.to
kenizer=function(t){if(!arguments.length||null==t||void
0==t)return[];if(Array.isArray(t))return t.map(function(t){return
t.toLowerCase()});for(var
e=t.toString().replace(/^\s+/,""),n=e.length-1;n>=0;n--)if(/\S/.test(e.charAt(n))){e=e.substring(0,n+1);break}return
e.split(/(?:\s+|\-)/).filter(function(t){return!!t}).map(function(t){return
t.toLowerCase()})},t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n
in this.registeredFunctions&&t.utils.warn("Overwriting existing registered
function:
"+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var
n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is
not registered with pipeline. This may cause problems when serialising the
index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return
e.forEach(function(e){var i=t.Pipeline.registeredFunctions[e];if(!i)throw new
Error("Cannot load un-re
gistered function: "+e);n.add(i)}),n},t.Pipeline.prototype.add=function(){var
e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var
i=this._stack.indexOf(e)+1;this._stack.splice(i,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var
i=this._stack.indexOf(e);this._stack.splice(i,0,n)},t.Pipeline.prototype.remove=function(t){var
e=this._stack.indexOf(t);this._stack.splice(e,1)},t.Pipeline.prototype.run=function(t){for(var
e=[],n=t.length,i=this._stack.length,o=0;n>o;o++){for(var
r=t[o],s=0;i>s&&(r=this._stack[s](r,o,t),void 0!==r);s++);void
0!==r&&e.push(r)}return
e},t.Pipeline.prototype.reset=function(){this._stack=[]},t.Pipeline.prototype.toJSON=function(){return
this._stack.map(function(e){return
t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Vector=function(){this._magni
tude=null,this.list=void
0,this.length=0},t.Vector.Node=function(t,e,n){this.idx=t,this.val=e,this.next=n},t.Vector.prototype.insert=function(e,n){var
i=this.list;if(!i)return this.list=new
t.Vector.Node(e,n,i),this.length++;for(var o=i,r=i.next;void
0!=r;){if(e<r.idx)return o.next=new
t.Vector.Node(e,n,r),this.length++;o=r,r=r.next}return o.next=new
t.Vector.Node(e,n,r),this.length++},t.Vector.prototype.magnitude=function(){if(this._magniture)return
this._magnitude;for(var t,e=this.list,n=0;e;)t=e.val,n+=t*t,e=e.next;return
this._magnitude=Math.sqrt(n)},t.Vector.prototype.dot=function(t){for(var
e=this.list,n=t.list,i=0;e&&n;)e.idx<n.idx?e=e.next:e.idx>n.idx?n=n.next:(i+=e.val*n.val,e=e.next,n=n.next);return
i},t.Vector.prototype.similarity=function(t){return
this.dot(t)/(this.magnitude()*t.magnitude())},t.SortedSet=function(){this.length=0,this.elements=[]},t.SortedSet.load=function(t){var
e=new this;return
e.elements=t,e.length=t.length,e},t.SortedSet.prototype.add=function(){Arr
ay.prototype.slice.call(arguments).forEach(function(t){~this.indexOf(t)||this.elements.splice(this.locationFor(t),0,t)},this),this.length=this.elements.length},t.SortedSet.prototype.toArray=function(){return
this.elements.slice()},t.SortedSet.prototype.map=function(t,e){return
this.elements.map(t,e)},t.SortedSet.prototype.forEach=function(t,e){return
this.elements.forEach(t,e)},t.SortedSet.prototype.indexOf=function(t,e,n){var
e=e||0,n=n||this.elements.length,i=n-e,o=e+Math.floor(i/2),r=this.elements[o];return
1>=i?r===t?o:-1:t>r?this.indexOf(t,o,n):r>t?this.indexOf(t,e,o):r===t?o:void
0},t.SortedSet.prototype.locationFor=function(t,e,n){var
e=e||0,n=n||this.elements.length,i=n-e,o=e+Math.floor(i/2),r=this.elements[o];if(1>=i){if(r>t)return
o;if(t>r)return o+1}return
t>r?this.locationFor(t,o,n):r>t?this.locationFor(t,e,o):void
0},t.SortedSet.prototype.intersect=function(e){for(var n=new
t.SortedSet,i=0,o=0,r=this.length,s=e.length,a=this.elements,h=e.elements;;){if(i>r-1||o>s-1)brea
k;a[i]!==h[o]?a[i]<h[o]?i++:a[i]>h[o]&&o++:(n.add(a[i]),i++,o++)}return
n},t.SortedSet.prototype.clone=function(){var e=new t.SortedSet;return
e.elements=this.toArray(),e.length=e.elements.length,e},t.SortedSet.prototype.union=function(t){var
e,n,i;return
this.length>=t.length?(e=this,n=t):(e=t,n=this),i=e.clone(),i.add.apply(i,n.toArray()),i},t.SortedSet.prototype.toJSON=function(){return
this.toArray()},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new
t.Pipeline,this.documentStore=new t.Store,this.tokenStore=new
t.TokenStore,this.corpusTokens=new t.SortedSet,this.eventEmitter=new
t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var
t=Array.prototype.slice.call(arguments);return
this.eventEmitter.addListener.apply(this.eventEmitter,t)},t.Index.prototype.off=function(t,e){return
this.eventEmitter.removeListener(t,e)},t.Index.load=function(e){e.version!==t.version&&t.utils.wa
rn("version mismatch: current "+t.version+" importing "+e.version);var n=new
this;return
n._fields=e.fields,n._ref=e.ref,n.documentStore=t.Store.load(e.documentStore),n.tokenStore=t.TokenStore.load(e.tokenStore),n.corpusTokens=t.SortedSet.load(e.corpusTokens),n.pipeline=t.Pipeline.load(e.pipeline),n},t.Index.prototype.field=function(t,e){var
e=e||{},n={name:t,boost:e.boost||1};return
this._fields.push(n),this},t.Index.prototype.ref=function(t){return
this._ref=t,this},t.Index.prototype.add=function(e,n){var i={},o=new
t.SortedSet,r=e[this._ref],n=void
0===n?!0:n;this._fields.forEach(function(n){var
r=this.pipeline.run(t.tokenizer(e[n.name]));i[n.name]=r,t.SortedSet.prototype.add.apply(o,r)},this),this.documentStore.set(r,o),t.SortedSet.prototype.add.apply(this.corpusTokens,o.toArray());for(var
s=0;s<o.length;s++){var
a=o.elements[s],h=this._fields.reduce(function(t,e){var
n=i[e.name].length;if(!n)return t;var o=i[e.name].filter(function(t){return
t===a}).length;return t+o/n*e.boost}
,0);this.tokenStore.add(a,{ref:r,tf:h})}n&&this.eventEmitter.emit("add",e,this)},t.Index.prototype.remove=function(t,e){var
n=t[this._ref],e=void 0===e?!0:e;if(this.documentStore.has(n)){var
i=this.documentStore.get(n);this.documentStore.remove(n),i.forEach(function(t){this.tokenStore.remove(t,n)},this),e&&this.eventEmitter.emit("remove",t,this)}},t.Index.prototype.update=function(t,e){var
e=void
0===e?!0:e;this.remove(t,!1),this.add(t,!1),e&&this.eventEmitter.emit("update",t,this)},t.Index.prototype.idf=function(t){var
e="@"+t;if(Object.prototype.hasOwnProperty.call(this._idfCache,e))return
this._idfCache[e];var n=this.tokenStore.count(t),i=1;return
n>0&&(i=1+Math.log(this.tokenStore.length/n)),this._idfCache[e]=i},t.Index.prototype.search=function(e){var
n=this.pipeline.run(t.tokenizer(e)),i=new
t.Vector,o=[],r=this._fields.reduce(function(t,e){return
t+e.boost},0),s=n.some(function(t){return
this.tokenStore.has(t)},this);if(!s)return[];n.forEach(function(e,n,s){var
a=1/s.length*t
his._fields.length*r,h=this,u=this.tokenStore.expand(e).reduce(function(n,o){var
r=h.corpusTokens.indexOf(o),s=h.idf(o),u=1,l=new t.SortedSet;if(o!==e){var
c=Math.max(3,o.length-e.length);u=1/Math.log(c)}return
r>-1&&i.insert(r,a*s*u),Object.keys(h.tokenStore.get(o)).forEach(function(t){l.add(t)}),n.union(l)},new
t.SortedSet);o.push(u)},this);var a=o.reduce(function(t,e){return
t.intersect(e)});return
a.map(function(t){return{ref:t,score:i.similarity(this.documentVector(t))}},this).sort(function(t,e){return
e.score-t.score})},t.Index.prototype.documentVector=function(e){for(var
n=this.documentStore.get(e),i=n.length,o=new t.Vector,r=0;i>r;r++){var
s=n.elements[r],a=this.tokenStore.get(s)[e].tf,h=this.idf(s);o.insert(this.corpusTokens.indexOf(s),a*h)}return
o},t.Index.prototype.toJSON=function(){return{version:t.version,fields:this._fields,ref:this._ref,documentStore:this.documentStore.toJSON(),tokenStore:this.tokenStore.toJSON(),corpusTokens:this.corpusTokens.toJSON(),pipeline:this.
pipeline.toJSON()}},t.Index.prototype.use=function(t){var
e=Array.prototype.slice.call(arguments,1);e.unshift(this),t.apply(this,e)},t.Store=function(){this.store={},this.length=0},t.Store.load=function(e){var
n=new this;return
n.length=e.length,n.store=Object.keys(e.store).reduce(function(n,i){return
n[i]=t.SortedSet.load(e.store[i]),n},{}),n},t.Store.prototype.set=function(t,e){this.has(t)||this.length++,this.store[t]=e},t.Store.prototype.get=function(t){return
this.store[t]},t.Store.prototype.has=function(t){return t in
this.store},t.Store.prototype.remove=function(t){this.has(t)&&(delete
this.store[t],this.length--)},t.Store.prototype.toJSON=function(){return{store:this.store,length:this.length}},t.stemmer=function(){var
t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},e={ica
te:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",i="[aeiouy]",o=n+"[^aeiouy]*",r=i+"[aeiou]*",s="^("+o+")?"+r+o,a="^("+o+")?"+r+o+"("+r+")?$",h="^("+o+")?"+r+o+r+o,u="^("+o+")?"+i,l=new
RegExp(s),c=new RegExp(h),p=new RegExp(a),f=new
RegExp(u),d=/^(.+?)(ss|i)es$/,v=/^(.+?)([^s])s$/,m=/^(.+?)eed$/,g=/^(.+?)(ed|ing)$/,y=/.$/,S=/(at|bl|iz)$/,w=new
RegExp("([^aeiouylsz])\\1$"),x=new
RegExp("^"+o+i+"[^aeiouwxy]$"),k=/^(.+?[^aeiou])y$/,b=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,E=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,_=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,O=/^(.+?)(s|t)(ion)$/,F=/^(.+?)e$/,P=/ll$/,T=new
RegExp("^"+o+i+"[^aeiouwxy]$"),$=function(n){var
i,o,r,s,a,h,u;if(n.length<3)return
n;if(r=n.substr(0,1),"y"==r&&(n=r.toUpperCase()+n.substr(1)),s=d,a=v,s.test(n)?n=n.replace(s,"$1$2"):a.test(n)&&(n=n.repl
ace(a,"$1$2")),s=m,a=g,s.test(n)){var
$=s.exec(n);s=l,s.test($[1])&&(s=y,n=n.replace(s,""))}else if(a.test(n)){var
$=a.exec(n);i=$[1],a=f,a.test(i)&&(n=i,a=S,h=w,u=x,a.test(n)?n+="e":h.test(n)?(s=y,n=n.replace(s,"")):u.test(n)&&(n+="e"))}if(s=k,s.test(n)){var
$=s.exec(n);i=$[1],n=i+"i"}if(s=b,s.test(n)){var
$=s.exec(n);i=$[1],o=$[2],s=l,s.test(i)&&(n=i+t[o])}if(s=E,s.test(n)){var
$=s.exec(n);i=$[1],o=$[2],s=l,s.test(i)&&(n=i+e[o])}if(s=_,a=O,s.test(n)){var
$=s.exec(n);i=$[1],s=c,s.test(i)&&(n=i)}else if(a.test(n)){var
$=a.exec(n);i=$[1]+$[2],a=c,a.test(i)&&(n=i)}if(s=F,s.test(n)){var
$=s.exec(n);i=$[1],s=c,a=p,h=T,(s.test(i)||a.test(i)&&!h.test(i))&&(n=i)}return
s=P,a=c,s.test(n)&&a.test(n)&&(s=y,n=n.replace(s,"")),"y"==r&&(n=r.toLowerCase()+n.substr(1)),n};return
$}(),t.Pipeline.registerFunction(t.stemmer,"stemmer"),t.stopWordFilter=function(e){return-1===t.stopWordFilter.stopWords.indexOf(e)?e:void
0},t.stopWordFilter.stopWords=new
t.SortedSet,t.stopWordFilter.stopWords.length=119
,t.stopWordFilter.stopWords.elements=["","a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"],t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter"),t.trimmer=function(t){return
t.replace(/^\W+/,"").replace(/\W+$/,"")},t.Pipeline.registerFunction(t.tr
immer,"trimmer"),t.TokenStore=function(){this.root={docs:{}},this.length=0},t.TokenStore.load=function(t){var
e=new this;return
e.root=t.root,e.length=t.length,e},t.TokenStore.prototype.add=function(t,e,n){var
n=n||this.root,i=t[0],o=t.slice(1);return i in
n||(n[i]={docs:{}}),0===o.length?(n[i].docs[e.ref]=e,void(this.length+=1)):this.add(o,e,n[i])},t.TokenStore.prototype.has=function(t){if(!t)return!1;for(var
e=this.root,n=0;n<t.length;n++){if(!e[t[n]])return!1;e=e[t[n]]}return!0},t.TokenStore.prototype.getNode=function(t){if(!t)return{};for(var
e=this.root,n=0;n<t.length;n++){if(!e[t[n]])return{};e=e[t[n]]}return
e},t.TokenStore.prototype.get=function(t,e){return
this.getNode(t,e).docs||{}},t.TokenStore.prototype.count=function(t,e){return
Object.keys(this.get(t,e)).length},t.TokenStore.prototype.remove=function(t,e){if(t){for(var
n=this.root,i=0;i<t.length;i++){if(!(t[i]in n))return;n=n[t[i]]}delete
n.docs[e]}},t.TokenStore.prototype.expand=function(t,e){var
n=this.getNode(t),i=n
.docs||{},e=e||[];return
Object.keys(i).length&&e.push(t),Object.keys(n).forEach(function(n){"docs"!==n&&e.concat(this.expand(t+n,e))},this),e},t.TokenStore.prototype.toJSON=function(){return{root:this.root,length:this.length}},function(t,e){"function"==typeof
define&&define.amd?define(e):"object"==typeof
exports?module.exports=e():t.lunr=e()}(this,function(){return t})}();
Propchange: eagle/site/docs/latest/mkdocs/js/lunr-0.5.7.min.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: eagle/site/docs/v0.5.0/applications/index.html
URL:
http://svn.apache.org/viewvc/eagle/site/docs/v0.5.0/applications/index.html?rev=1789965&view=auto
==============================================================================
--- eagle/site/docs/v0.5.0/applications/index.html (added)
+++ eagle/site/docs/v0.5.0/applications/index.html Mon Apr 3 11:33:14 2017
@@ -0,0 +1,1250 @@
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+
+
+ <title>Applications - Apache Eagle Documentation</title>
+
+
+ <link rel="shortcut icon" href="../include/images/favicon.png">
+
+
+
+ <link
href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700'
rel='stylesheet' type='text/css'>
+
+ <link rel="stylesheet" href="../css/theme.css" type="text/css" />
+ <link rel="stylesheet" href="../css/theme_extra.css" type="text/css" />
+ <link rel="stylesheet" href="../css/highlight.css">
+
+
+ <script>
+ // Current page data
+ var mkdocs_page_name = "Applications";
+ var mkdocs_page_input_path = "applications.md";
+ var mkdocs_page_url = "/applications/";
+ </script>
+
+ <script src="../js/jquery-2.1.1.min.js"></script>
+ <script src="../js/modernizr-2.8.3.min.js"></script>
+ <script type="text/javascript" src="../js/highlight.pack.js"></script>
+ <script src="../js/theme.js"></script>
+
+
+</head>
+
+<body class="wy-body-for-nav" role="document">
+
+ <div class="wy-grid-for-nav">
+
+
+ <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
+ <div class="wy-side-nav-search">
+ <a href=".." class="icon icon-home"> Apache Eagle Documentation</a>
+ <div role="search">
+ <form id ="rtd-search-form" class="wy-form" action="../search.html"
method="get">
+ <input type="text" name="q" placeholder="Search docs" />
+ </form>
+</div>
+ </div>
+
+ <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation"
aria-label="main navigation">
+ <ul class="current">
+
+ <li><script>
+ function select(elem) {
+ var selectedClassName = "selected";
+ $(".wy-menu-vertical li.selected").removeClass(selectedClassName);
+ $(elem).addClass(selectedClassName);
+ }
+</script>
+
+<!--
+ this macro is to fetch the first child element that has url and return the
url as the default one of the section
+ arguemnt:
+ ni: nav_item, corresponding to navigation item configured in
mkdocs.yml's "pages"
+ -->
+
+
+<!--
+ this macro generates the style for indentation on sub tocs in side nav
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!--
+ this macro shows toc items including nested tocs, toc nesting level would
depending on arguments described below
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!-- generate side nav based on navigation configured in mkdocs.yml -->
+
+ <li class="toctree-l1 ">
+ <a class="" href="..">Home</a>
+
+ </li>
+<li>
+
+ <li><script>
+ function select(elem) {
+ var selectedClassName = "selected";
+ $(".wy-menu-vertical li.selected").removeClass(selectedClassName);
+ $(elem).addClass(selectedClassName);
+ }
+</script>
+
+<!--
+ this macro is to fetch the first child element that has url and return the
url as the default one of the section
+ arguemnt:
+ ni: nav_item, corresponding to navigation item configured in
mkdocs.yml's "pages"
+ -->
+
+
+<!--
+ this macro generates the style for indentation on sub tocs in side nav
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!--
+ this macro shows toc items including nested tocs, toc nesting level would
depending on arguments described below
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!-- generate side nav based on navigation configured in mkdocs.yml -->
+
+ <li class="toctree-l1 ">
+ <a class="" href="../getting-started/">Getting Started</a>
+
+ </li>
+<li>
+
+ <li><script>
+ function select(elem) {
+ var selectedClassName = "selected";
+ $(".wy-menu-vertical li.selected").removeClass(selectedClassName);
+ $(elem).addClass(selectedClassName);
+ }
+</script>
+
+<!--
+ this macro is to fetch the first child element that has url and return the
url as the default one of the section
+ arguemnt:
+ ni: nav_item, corresponding to navigation item configured in
mkdocs.yml's "pages"
+ -->
+
+
+<!--
+ this macro generates the style for indentation on sub tocs in side nav
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!--
+ this macro shows toc items including nested tocs, toc nesting level would
depending on arguments described below
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!-- generate side nav based on navigation configured in mkdocs.yml -->
+
+ <li class="toctree-l1 ">
+ <a class="" href="../using-eagle/">Using Eagle</a>
+
+ </li>
+<li>
+
+ <li><script>
+ function select(elem) {
+ var selectedClassName = "selected";
+ $(".wy-menu-vertical li.selected").removeClass(selectedClassName);
+ $(elem).addClass(selectedClassName);
+ }
+</script>
+
+<!--
+ this macro is to fetch the first child element that has url and return the
url as the default one of the section
+ arguemnt:
+ ni: nav_item, corresponding to navigation item configured in
mkdocs.yml's "pages"
+ -->
+
+
+<!--
+ this macro generates the style for indentation on sub tocs in side nav
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!--
+ this macro shows toc items including nested tocs, toc nesting level would
depending on arguments described below
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!-- generate side nav based on navigation configured in mkdocs.yml -->
+
+ <li class="toctree-l1 current">
+ <a class="current" href="./">Applications</a>
+
+ <ul>
+
+
+
+ <li class="toctree-l3" onclick="select(this)"><a
+
+
+
+ href="#hdfs-data-activity-monitoring">HDFS Data Activity Monitoring</a></li>
+
+ <ul>
+
+
+
+ <li class="toctree-l4" onclick="select(this)"><a
+
+
+ style="padding-left: 4em;"
+
+ href="#monitor-requirements">Monitor Requirements</a></li>
+
+
+
+
+
+
+ <li class="toctree-l4" onclick="select(this)"><a
+
+
+ style="padding-left: 4em;"
+
+ href="#setup-installation">Setup & Installation</a></li>
+
+
+
+
+
+
+ <li class="toctree-l4" onclick="select(this)"><a
+
+
+ style="padding-left: 4em;"
+
+ href="#how-to-collect-the-log">How to collect the log</a></li>
+
+
+
+
+
+
+ <li class="toctree-l4" onclick="select(this)"><a
+
+
+ style="padding-left: 4em;"
+
+ href="#sample-policies">Sample policies</a></li>
+
+ <ul>
+
+
+
+ <li class="toctree-l4" onclick="select(this)"><a
+
+
+ style="padding-left: 5em;"
+
+ href="#1-monitor-filefolder-operations">1. monitor file/folder
operations</a></li>
+
+
+
+
+
+
+ <li class="toctree-l4" onclick="select(this)"><a
+
+
+ style="padding-left: 5em;"
+
+ href="#2-classify-the-filefolder-on-hdfs">2. classify the file/folder on
HDFS</a></li>
+
+
+
+
+
+
+ <li class="toctree-l4" onclick="select(this)"><a
+
+
+ style="padding-left: 5em;"
+
+ href="#3-classify-the-ip-zone">3. Classify the IP Zone</a></li>
+
+
+
+
+ </ul>
+
+
+
+
+
+
+ <li class="toctree-l4" onclick="select(this)"><a
+
+
+ style="padding-left: 4em;"
+
+ href="#questions-on-this-application">Questions on this application</a></li>
+
+
+
+
+ </ul>
+
+
+
+
+
+
+ <li class="toctree-l3" onclick="select(this)"><a
+
+
+
+ href="#jmx-monitoring">JMX Monitoring</a></li>
+
+ <ul>
+
+
+
+ <li class="toctree-l4" onclick="select(this)"><a
+
+
+ style="padding-left: 4em;"
+
+ href="#setup-installation_1">Setup & Installation</a></li>
+
+
+
+
+
+
+ <li class="toctree-l4" onclick="select(this)"><a
+
+
+ style="padding-left: 4em;"
+
+ href="#define-jmx-alert-policy">Define JMX Alert Policy</a></li>
+
+
+
+
+
+
+ <li class="toctree-l4" onclick="select(this)"><a
+
+
+ style="padding-left: 4em;"
+
+ href="#stream-schema">Stream Schema</a></li>
+
+
+
+
+
+
+ <li class="toctree-l4" onclick="select(this)"><a
+
+
+ style="padding-left: 4em;"
+
+ href="#metrics-list">Metrics List</a></li>
+
+
+
+
+ </ul>
+
+
+
+
+
+
+ <li class="toctree-l3" onclick="select(this)"><a
+
+
+
+ href="#job-performance-monitoring">Job Performance Monitoring</a></li>
+
+ <ul>
+
+
+
+ <li class="toctree-l4" onclick="select(this)"><a
+
+
+ style="padding-left: 4em;"
+
+ href="#monitor-requirements_1">Monitor Requirements</a></li>
+
+
+
+
+
+
+ <li class="toctree-l4" onclick="select(this)"><a
+
+
+ style="padding-left: 4em;"
+
+ href="#applications">Applications</a></li>
+
+
+
+
+
+
+ <li class="toctree-l4" onclick="select(this)"><a
+
+
+ style="padding-left: 4em;"
+
+ href="#data-ingestion-and-process">Data Ingestion And Process</a></li>
+
+
+
+
+
+
+ <li class="toctree-l4" onclick="select(this)"><a
+
+
+ style="padding-left: 4em;"
+
+ href="#setup-installation_2">Setup & Installation</a></li>
+
+
+
+
+
+
+ <li class="toctree-l4" onclick="select(this)"><a
+
+
+ style="padding-left: 4em;"
+
+ href="#integration-with-alert-engine">Integration With Alert Engine</a></li>
+
+
+
+
+
+
+ <li class="toctree-l4" onclick="select(this)"><a
+
+
+ style="padding-left: 4em;"
+
+ href="#stream-schema_1">Stream Schema</a></li>
+
+
+
+
+ </ul>
+
+
+
+
+
+
+ <li class="toctree-l3" onclick="select(this)"><a
+
+
+
+ href="#topology-health-check">Topology Health Check</a></li>
+
+ <ul>
+
+
+
+ <li class="toctree-l4" onclick="select(this)"><a
+
+
+ style="padding-left: 4em;"
+
+ href="#setup-installation_3">Setup & Installation</a></li>
+
+
+
+
+
+
+ <li class="toctree-l4" onclick="select(this)"><a
+
+
+ style="padding-left: 4em;"
+
+ href="#define-health-check-alert-policy">Define Health Check Alert
Policy</a></li>
+
+
+
+
+ </ul>
+
+
+
+
+
+
+ <li class="toctree-l3" onclick="select(this)"><a
+
+
+
+ href="#hadoop-queue-monitoring">Hadoop Queue Monitoring</a></li>
+
+ <ul>
+
+
+
+ <li class="toctree-l4" onclick="select(this)"><a
+
+
+ style="padding-left: 4em;"
+
+ href="#setup-installation_4">Setup & Installation</a></li>
+
+
+
+
+
+
+ <li class="toctree-l4" onclick="select(this)"><a
+
+
+ style="padding-left: 4em;"
+
+ href="#use-of-the-application">Use of the application</a></li>
+
+
+
+
+ </ul>
+
+
+
+
+ </ul>
+
+ </li>
+<li>
+
+ <li><script>
+ function select(elem) {
+ var selectedClassName = "selected";
+ $(".wy-menu-vertical li.selected").removeClass(selectedClassName);
+ $(elem).addClass(selectedClassName);
+ }
+</script>
+
+<!--
+ this macro is to fetch the first child element that has url and return the
url as the default one of the section
+ arguemnt:
+ ni: nav_item, corresponding to navigation item configured in
mkdocs.yml's "pages"
+ -->
+
+
+<!--
+ this macro generates the style for indentation on sub tocs in side nav
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!--
+ this macro shows toc items including nested tocs, toc nesting level would
depending on arguments described below
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!-- generate side nav based on navigation configured in mkdocs.yml -->
+
+ <li class="toctree-l1 ">
+ <a class="" href="../developing-application/">Developing
Application</a>
+
+ </li>
+<li>
+
+ <li><script>
+ function select(elem) {
+ var selectedClassName = "selected";
+ $(".wy-menu-vertical li.selected").removeClass(selectedClassName);
+ $(elem).addClass(selectedClassName);
+ }
+</script>
+
+<!--
+ this macro is to fetch the first child element that has url and return the
url as the default one of the section
+ arguemnt:
+ ni: nav_item, corresponding to navigation item configured in
mkdocs.yml's "pages"
+ -->
+
+
+<!--
+ this macro generates the style for indentation on sub tocs in side nav
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!--
+ this macro shows toc items including nested tocs, toc nesting level would
depending on arguments described below
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!-- generate side nav based on navigation configured in mkdocs.yml -->
+
+ <li class="toctree-l1 ">
+ <a class="" href="../underlying-design/">Underlying Design</a>
+
+ </li>
+<li>
+
+ <li><script>
+ function select(elem) {
+ var selectedClassName = "selected";
+ $(".wy-menu-vertical li.selected").removeClass(selectedClassName);
+ $(elem).addClass(selectedClassName);
+ }
+</script>
+
+<!--
+ this macro is to fetch the first child element that has url and return the
url as the default one of the section
+ arguemnt:
+ ni: nav_item, corresponding to navigation item configured in
mkdocs.yml's "pages"
+ -->
+
+
+<!--
+ this macro generates the style for indentation on sub tocs in side nav
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!--
+ this macro shows toc items including nested tocs, toc nesting level would
depending on arguments described below
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!-- generate side nav based on navigation configured in mkdocs.yml -->
+
+ <li class="toctree-l1 ">
+ <a class="" href="../reference/">Reference</a>
+
+ </li>
+<li>
+
+ </ul>
+ </div>
+
+ </nav>
+
+ <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+
+ <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
+ <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+ <a href="..">Apache Eagle Documentation</a>
+ </nav>
+
+
+ <div class="wy-nav-content">
+ <div class="rst-content">
+ <div role="navigation" aria-label="breadcrumbs navigation">
+ <ul class="wy-breadcrumbs">
+ <li><a href="..">Docs</a> »</li>
+
+
+
+ <li>Applications</li>
+ <li class="wy-breadcrumbs-aside">
+
+
+ <a href="https://github.com/apache/eagle/tree/master/docs"
class="icon icon-github"> Edit on GitHub</a>
+
+
+ </li>
+ </ul>
+ <hr/>
+</div>
+ <div role="main">
+ <div class="section">
+
+ <h1 id="hdfs-data-activity-monitoring">HDFS Data Activity
Monitoring</h1>
+<h2 id="monitor-requirements">Monitor Requirements</h2>
+<p>This application aims to monitor user activities on HDFS via the hdfs audit
log. Once any abnormal user activity is detected, an alert is sent in several
seconds. The whole pipeline of this application is</p>
+<ul>
+<li>
+<p>Kafka ingest: this application consumes data from Kafka. In other words,
users have to stream the log into Kafka first. </p>
+</li>
+<li>
+<p>Data re-procesing, which includes raw log parser, ip zone joiner,
sensitivity information joiner. </p>
+</li>
+<li>
+<p>Kafka sink: parsed data will flows into Kafka again, which will be consumed
by the alert engine. </p>
+</li>
+<li>
+<p>Policy evaluation: the alert engine (hosted in Alert Engine app) evaluates
each data event to check if the data violate the user defined policy. An alert
is generated if the data matches the policy.</p>
+</li>
+</ul>
+<p><img alt="HDFSAUDITLOG" src="../include/images/hdfs_audit_log.png" /></p>
+<h2 id="setup-installation">Setup & Installation</h2>
+<ul>
+<li>
+<p>Choose a site to install this application. For example 'sandbox'</p>
+</li>
+<li>
+<p>Install "Hdfs Audit Log Monitor" app step by step</p>
+<p><img alt="Install Step 2" src="../include/images/hdfs_install_1.png" /></p>
+<p><img alt="Install Step 3" src="../include/images/hdfs_install_2.png" /></p>
+<p><img alt="Install Step 4" src="../include/images/hdfs_install_3.png" /></p>
+</li>
+</ul>
+<h2 id="how-to-collect-the-log">How to collect the log</h2>
+<p>To collect the raw audit log on namenode servers, a log collector is
needed. Users can choose any tools they like. There are some common solutions
available: <a
href="https://www.elastic.co/guide/en/logstash/current/getting-started-with-logstash.html">logstash</a>,
<a
href="https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-getting-started.html">filebeat</a>,
log4j appender, etcs. </p>
+<p>For detailed instruction, refer to: <a
href="../using-eagle/#how-to-stream-audit-log-into-kafka">How to stream audit
log into Kafka</a></p>
+<h2 id="sample-policies">Sample policies</h2>
+<h3 id="1-monitor-filefolder-operations">1. monitor file/folder operations</h3>
+<p>Delete a file/folder on HDFS. </p>
+<pre><code>from
HDFS_AUDIT_LOG_ENRICHED_STREAM_SANDBOX[str:contains(src,'/tmp/test/subtest')
and ((cmd=='rename' and str:contains(dst, '.Trash')) or cmd=='delete')] select
* group by user insert into hdfs_audit_log_enriched_stream_out
+</code></pre>
+
+<p>HDFS_AUDIT_LOG_ENRICHED_STREAM_SANDBOX is the input stream name, and
hdfs_audit_log_enriched_stream_out is the output stream name, the content
between [] is the monitoring conditions. <code>cmd</code>, <code>src</code> and
<code>dst</code> is the fields of hdfs audit logs.</p>
+<p><img alt="Policy 1" src="../include/images/hdfs_policy_1.png" /></p>
+<h3 id="2-classify-the-filefolder-on-hdfs">2. classify the file/folder on
HDFS</h3>
+<p>Users may want to mark some folders/files on HDFS as sensitive content. For
example, by marking '/sys/soj' as "SOJ", users can monitor any operations they
care about on 'sys/soj' and its subfolders/files.</p>
+<pre><code>from HDFS_AUDIT_LOG_ENRICHED_STREAM_SANDBOX[sensitivityType=='SOJ'
and cmd=='delete')] select * group by user insert into
hdfs_audit_log_enriched_stream_out
+</code></pre>
+
+<p>The example policy monitors the 'delete' operation on files/subfolders
under /sys/soj. </p>
+<h3 id="3-classify-the-ip-zone">3. Classify the IP Zone</h3>
+<p>In some cases, the ips are classified into different zones. For some zone,
it may have higher secrecy. Eagle providers ways to monitor user activities on
IP level. </p>
+<pre><code>from
HDFS_AUDIT_LOG_ENRICHED_STREAM_SANDBOX[securityZone=='SECURITY' and
cmd=='delete')] select * group by user insert into
hdfs_audit_log_enriched_stream_out
+</code></pre>
+
+<p>The example policy monitors the 'delete' operation on hosts in 'SECURITY'
zone. </p>
+<h2 id="questions-on-this-application">Questions on this application</h2>
+<hr />
+<h1 id="jmx-monitoring">JMX Monitoring</h1>
+<ul>
+<li>
+<p>Application "<strong>HADOOP_JMX_METRIC_MONITOR</strong>" provide embedded
collector script to ingest hadoop/hbase jmx metric as eagle stream and provide
ability to define alert policy and detect anomaly in real-time from metric.</p>
+<table>
+<thead>
+<tr>
+<th>Fields</th>
+<th></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td><strong>Type</strong></td>
+<td><em>HADOOP_JMX_METRIC_MONITOR</em></td>
+</tr>
+<tr>
+<td><strong>Version</strong></td>
+<td><em>0.5.0-version</em></td>
+</tr>
+<tr>
+<td><strong>Description</strong></td>
+<td><em>Collect JMX Metric and monitor in real-time</em></td>
+</tr>
+<tr>
+<td><strong>Streams</strong></td>
+<td><em>HADOOP_JMX_METRIC_STREAM</em></td>
+</tr>
+<tr>
+<td><strong>Configuration</strong></td>
+<td><em>JMX Metric Kafka Topic (default:
hadoop_jmx_metric_{SITE_ID})</em><br/><br/><em>Kafka Broker List (default:
localhost:6667)</em></td>
+</tr>
+</tbody>
+</table>
+</li>
+</ul>
+<h2 id="setup-installation_1">Setup & Installation</h2>
+<ul>
+<li>
+<p>Make sure already setup a site (here use a demo site named "sandbox").</p>
+</li>
+<li>
+<p>Install "Hadoop JMX Monitor" app in eagle server.</p>
+<p><img alt="Install Step 2" src="../include/images/install_jmx_2.png" /></p>
+</li>
+<li>
+<p>Configure Application settings.</p>
+<p><img alt="Install Step 3" src="../include/images/install_jmx_3.png" /></p>
+</li>
+<li>
+<p>Ensure a kafka topic named hadoop_jmx_metric_{SITE_ID} (In current guide,
it should be hadoop_jmx_metric_sandbox)</p>
+</li>
+<li>
+<p>Setup metric collector for monitored Hadoop/HBase using
hadoop_jmx_collector and modify the configuration.</p>
+<ul>
+<li>
+<p>Collector scripts: <a
href="https://github.com/apache/incubator-eagle/tree/master/eagle-external/hadoop_jmx_collector">hadoop_jmx_collector</a></p>
+</li>
+<li>
+<p>Rename config-sample.json to config.json: <a
href="https://github.com/apache/incubator-eagle/blob/master/eagle-external/hadoop_jmx_collector/config-sample.json">config-sample.json</a></p>
+<pre><code>{
+ env: {
+ site: "sandbox",
+ name_node: {
+ hosts: [
+ "sandbox.hortonworks.com"
+ ],
+ port: 50070,
+ https: false
+ },
+ resource_manager: {
+ hosts: [
+ "sandbox.hortonworks.com"
+ ],
+ port: 50030,
+ https: false
+ }
+ },
+ inputs: [{
+ component: "namenode",
+ host: "server.eagle.apache.org",
+ port: "50070",
+ https: false,
+ kafka_topic: "nn_jmx_metric_sandbox"
+ }, {
+ component: "resourcemanager",
+ host: "server.eagle.apache.org",
+ port: "8088",
+ https: false,
+ kafka_topic: "rm_jmx_metric_sandbox"
+ }, {
+ component: "datanode",
+ host: "server.eagle.apache.org",
+ port: "50075",
+ https: false,
+ kafka_topic: "dn_jmx_metric_sandbox"
+ }],
+ filter: {
+ monitoring.group.selected: [
+ "hadoop",
+ "java.lang"
+ ]
+ },
+ output: {
+ kafka: {
+ brokerList: [
+ "localhost:9092"
+ ]
+ }
+ }
+}
+</code></pre>
+</li>
+</ul>
+</li>
+<li>
+<p>Click "Install" button then you will see the
HADOOP_JMX_METRIC_STREAM_{SITE_ID} in Streams.</p>
+<p><img alt="Install Step 6" src="../include/images/install_jmx_6.png" /></p>
+</li>
+</ul>
+<h2 id="define-jmx-alert-policy">Define JMX Alert Policy</h2>
+<ol>
+<li>
+<p>Go to "Define Policy".</p>
+</li>
+<li>
+<p>Select HADOOP_JMX_METRIC_MONITOR related streams.</p>
+</li>
+<li>
+<p>Define SQL-Like policy, for example</p>
+<pre><code>from HADOOP_JMX_METRIC_STREAM_SANDBOX[metric=="cpu.usage" and value
> 0.9]
+select site,host,component,value
+insert into HADOOP_CPU_USAGE_GT_90_ALERT;
+</code></pre>
+<p>As seen in below screenshot:</p>
+</li>
+</ol>
+<p><img alt="Define JMX Alert Policy"
src="../include/images/define_jmx_alert_policy.png" /></p>
+<h2 id="stream-schema">Stream Schema</h2>
+<ul>
+<li>
+<p>Schema</p>
+<table>
+<thead>
+<tr>
+<th>Stream Name</th>
+<th>Stream Schema</th>
+<th>Time Series</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>HADOOP_JMX_METRIC_MONITOR</td>
+<td><strong>host</strong>: STRING<br/><br/><strong>timestamp</strong>:
LONG<br/><br/><strong>metric</strong>:
STRING<br/><br/><strong>component</strong>:
STRING<br/><br/><strong>site</strong>: STRING<br/><br/><strong>value</strong>:
DOUBLE</td>
+<td>True</td>
+</tr>
+</tbody>
+</table>
+</li>
+</ul>
+<h2 id="metrics-list">Metrics List</h2>
+<ul>
+<li>Please refer to the <a href="../hadoop-jmx-metrics-list.txt">Hadoop JMX
Metrics List</a> and see which metrics you're interested in.</li>
+</ul>
+<hr />
+<h1 id="job-performance-monitoring">Job Performance Monitoring</h1>
+<h2 id="monitor-requirements_1">Monitor Requirements</h2>
+<ul>
+<li>Finished/Running Job Details</li>
+<li>Job Metrics(Job Counter/Statistics) Aggregation</li>
+<li>Alerts(Job failure/Job slow)</li>
+</ul>
+<h2 id="applications">Applications</h2>
+<ul>
+<li>
+<p>Application Table</p>
+<table>
+<thead>
+<tr>
+<th>application</th>
+<th>responsibility</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>Map Reduce History Job Monitoring</td>
+<td>parse mr history job logs from hdfs</td>
+</tr>
+<tr>
+<td>Map Reduce Running Job Monitoring</td>
+<td>get mr running job details from resource manager</td>
+</tr>
+<tr>
+<td>Map Reduce Metrics Aggregation</td>
+<td>aggregate metrics generated by applications above</td>
+</tr>
+</tbody>
+</table>
+</li>
+</ul>
+<h2 id="data-ingestion-and-process">Data Ingestion And Process</h2>
+<ul>
+<li>
+<p>We build storm topology to fulfill requirements for each application.</p>
+<p><img alt="topology figures" src="../include/images/jpm.jpg" /></p>
+</li>
+<li>
+<p>Map Reduce History Job Monitoring (Figure 1)</p>
+<ul>
+<li><strong>Read Spout</strong><ul>
+<li>read/parse history job logs from HDFS and flush to eagle service(storage
is Hbase)</li>
+</ul>
+</li>
+<li><strong>Sink Bolt</strong><ul>
+<li>convert parsed jobs to streams and write to data sink</li>
+</ul>
+</li>
+</ul>
+</li>
+<li>Map Reduce Running Job Monitoring (Figure 2)<ul>
+<li><strong>Read Spout</strong><ul>
+<li>fetch running job list from resource manager and emit to Parse Bolt</li>
+</ul>
+</li>
+<li><strong>Parse Bolt</strong><ul>
+<li>for each running job, fetch job detail/job counter/job configure/tasks
from resource manager</li>
+</ul>
+</li>
+</ul>
+</li>
+<li>Map Reduce Metrics Aggregation (Figure 3)<ul>
+<li><strong>Divide Spout</strong><ul>
+<li>divide time period(need to be aggregated) to small pieces and emit to
Aggregate Bolt</li>
+</ul>
+</li>
+<li><strong>Aggregate Bolt</strong><ul>
+<li>aggregate metrics for given time period received from Divide Spout</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+<h2 id="setup-installation_2">Setup & Installation</h2>
+<ul>
+<li>
+<p>Make sure already setup a site (here use a demo site named "sandbox").</p>
+</li>
+<li>
+<p>Install "Map Reduce History Job" app in eagle server(Take this application
as an example).</p>
+</li>
+<li>
+<p>Configure Application settings</p>
+<p><img alt="application configures" src="../include/images/jpm_configure.png"
/></p>
+</li>
+<li>
+<p>Ensure a kafka topic named {SITE_ID}_map_reduce_failed_job (In current
guide, it should be sandbox_map_reduce_failed_job) will be created.</p>
+</li>
+<li>
+<p>Click "Install" button then you will see the
MAP_REDUCE_FAILED_JOB_STREAM_{SITE_ID} in Alert->Streams.
+ <img alt="application configures" src="../include/images/jpm_streams.png"
/>
+ This application will write stream data to kafka topic(created by last
step)</p>
+</li>
+</ul>
+<h2 id="integration-with-alert-engine">Integration With Alert Engine</h2>
+<p>In order to integrate applications with alert engine and send alerts,
follow below steps(Take Map Reduce History Job application as an example):</p>
+<ul>
+<li>
+<p><strong>define stream and configure data sink</strong></p>
+<ul>
+<li>define stream in resource/META-INF/providers/xxxProviders.xml
+For example, MAP_REDUCE_FAILED_JOB_STREAM_{SITE_ID}</li>
+<li>configure data sink
+For example, create kafka topic {SITE_ID}_map_reduce_failed_job</li>
+</ul>
+</li>
+<li>
+<p><strong>define policy</strong></p>
+</li>
+</ul>
+<p>For example, if you want to receive map reduce job failure alerts, you can
define policies (SiddhiQL) as the following:</p>
+<pre><code class="sql">from
map_reduce_failed_job_stream[site=="sandbox" and
currentState=="FAILED"]
+select site, queue, user, jobType, jobId, submissionTime, trackingUrl,
startTime, endTime
+group by jobId insert into map_reduce_failed_job_stream_out
+</code></pre>
+
+<p><img alt="define policy" src="../include/images/jpm_define_policy.png"
/></p>
+<ul>
+<li><strong>view alerts</strong></li>
+</ul>
+<p>You can view alerts in Alert->alerts page.</p>
+<h2 id="stream-schema_1">Stream Schema</h2>
+<p>All columns above are predefined in stream map_reduce_failed_job_stream
defined in</p>
+<pre><code>eagle-jpm/eagle-jpm-mr-history/src/main/resources/META-INF/providers/org.apache.eagle.jpm.mr.history.MRHistoryJobApplicationProvider.xml
+</code></pre>
+<p>Then, enable the policy in web ui after it's created. Eagle will schedule
it automatically.</p>
+<hr />
+<h1 id="topology-health-check">Topology Health Check</h1>
+<ul>
+<li>
+<p>Application "TOPOLOGY HEALTH CHECK" aims to monior those servies with a
master-slave structured topology and provide metrics at host level.</p>
+<table>
+<thead>
+<tr>
+<th>Fields</th>
+<th></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td><strong>Type</strong></td>
+<td><em>TOPOLOGY_HEALTH_CHECK</em></td>
+</tr>
+<tr>
+<td><strong>Version</strong></td>
+<td><em>0.5.0-version</em></td>
+</tr>
+<tr>
+<td><strong>Description</strong></td>
+<td><em>Collect MR,HBASE,HDFS node status and cluster ratio</em></td>
+</tr>
+<tr>
+<td><strong>Streams</strong></td>
+<td><em>TOPOLOGY_HEALTH_CHECK_STREAM</em></td>
+</tr>
+<tr>
+<td><strong>Configuration</strong></td>
+<td><em>Topology Health Check Topic (default:
topology_health_check)</em><br/><br/><em>Kafka Broker List (default:
sandobox.hortonworks.com:6667)</em></td>
+</tr>
+</tbody>
+</table>
+</li>
+</ul>
+<h2 id="setup-installation_3">Setup & Installation</h2>
+<ul>
+<li>
+<p>Make sure already setup a site (here use a demo site named "sandbox").</p>
+</li>
+<li>
+<p>Install "Topology Health Check" app in eagle server.</p>
+<p><img alt="Health Check Installation"
src="../include/images/health_check_installation.png" /></p>
+</li>
+<li>
+<p>Configure Application settings.</p>
+<p><img alt="Health Check Settings"
src="../include/images/health_check_settings.png" /></p>
+</li>
+<li>
+<p>Ensure the existence of a kafka topic named topology_health_check (In
current guide, it should be topology_health_check).</p>
+</li>
+<li>
+<p>Click "Install" button then you will see the
TOPOLOGY_HEALTH_CHECK_STREAM_{SITE_ID} on "Streams" page (Streams could be
navigated in left-nav).</p>
+<p><img alt="Health Check Stream"
src="../include/images/health_check_stream.png" /></p>
+</li>
+</ul>
+<h2 id="define-health-check-alert-policy">Define Health Check Alert Policy</h2>
+<ul>
+<li>
+<p>Go to "Define Policy".</p>
+</li>
+<li>
+<p>Select TOPOLOGY_HEALTH_CHECK related streams.</p>
+</li>
+<li>
+<p>Define SQL-Like policy, for example</p>
+<pre><code>from TOPOLOGY_HEALTH_CHECK_STREAM_SANDBOX[status=='dead'] select *
insert into topology_health_check_stream_out;
+</code></pre>
+<p><img alt="Health Check Policy"
src="../include/images/health_check_policy.png" /></p>
+</li>
+</ul>
+<hr />
+<h1 id="hadoop-queue-monitoring">Hadoop Queue Monitoring</h1>
+<ul>
+<li>
+<p>This application collects metrics of Resource Manager in the following
aspects:</p>
+<ul>
+<li>
+<p>Scheduler Info of the cluster:
http://{RM_HTTP_ADDRESS}:{PORT}/ws/v1/cluster/scheduler</p>
+</li>
+<li>
+<p>Applications of the cluster:
http://{RM_HTTP_ADDRESS}:{PORT}/ws/v1/cluster/apps</p>
+</li>
+<li>
+<p>Overall metrics of the cluster:
http://{RM_HTTP_ADDRESS}:{PORT}/ws/v1/cluster/metrics</p>
+<pre><code>by version 0.5-incubating, mainly focusing at metrics
+ - `appsPending`
+ - `allocatedMB`
+ - `totalMB`
+ - `availableMB`
+ - `reservedMB`
+ - `allocatedVirtualCores`.
+</code></pre>
+</li>
+</ul>
+</li>
+</ul>
+<h2 id="setup-installation_4">Setup & Installation</h2>
+<ul>
+<li>
+<p>Make sure already setup a site (here use a demo site named "sandbox").</p>
+</li>
+<li>
+<p>From left-nav list, navigate to application managing page by
"<strong>Integration</strong>" > "<strong>Sites</strong>", and hit link
"<strong>sandbox</strong>" on right.</p>
+<p><img alt="Navigate to app mgmt"
src="../include/images/hadoop_queue_monitor_1.png" /></p>
+</li>
+<li>
+<p>Install "Hadoop Queue Monitor" by clicking "install" button of the
application.</p>
+<p><img alt="Install Hadoop Queue Monitor App"
src="../include/images/hadoop_queue_monitor_2.png" /></p>
+</li>
+<li>
+<p>In the pop-up layout, select running mode as <code>Local</code> or
<code>Cluster</code>.</p>
+<p><img alt="Select Running Mode"
src="../include/images/hadoop_queue_monitor_3.png" /></p>
+</li>
+<li>
+<p>Set the target jar of eagle's topology assembly that has existed in eagle
server, indicating the absolute path ot it. As in the following screenshot:</p>
+<p><img alt="Set Jar Path" src="../include/images/hadoop_queue_monitor_4.png"
/></p>
+</li>
+<li>
+<p>Set Resource Manager endpoint urls field, separate values with comma if
there are more than 1 url (e.g. a secondary node for HA).</p>
+<p><img alt="Set RM Endpoint"
src="../include/images/hadoop_queue_monitor_5.png" /></p>
+</li>
+<li>
+<p>Set fields "<strong>Storm Worker Number</strong>", "<strong>Parallel Tasks
Per Bolt</strong>", and "<strong>Fetching Metric Interval in Seconds</strong>",
or leave them as default if they fit your needs.</p>
+<p><img alt="Set Advanced Fields"
src="../include/images/hadoop_queue_monitor_6.png" /></p>
+</li>
+<li>
+<p>Finally, hit "<strong>Install</strong>" button to complete it.</p>
+</li>
+</ul>
+<h2 id="use-of-the-application">Use of the application</h2>
+<ul>
+<li>
+<p>There is no need to define policies for this applicatoin to work, it could
be integrated with "<strong>Job Performance Monitoring Web</strong>"
application and consequently seen on cluster dashboard, as long as the latter
application is installed too. See an exmple in the following screenshot:</p>
+<p><img alt="In Dashboard" src="../include/images/hadoop_queue_monitor_7.png"
/></p>
+</li>
+</ul>
+
+ </div>
+ </div>
+ <footer>
+
+ <div class="rst-footer-buttons" role="navigation" aria-label="footer
navigation">
+
+ <a href="../developing-application/" class="btn btn-neutral
float-right" title="Developing Application">Next <span class="icon
icon-circle-arrow-right"></span></a>
+
+
+ <a href="../using-eagle/" class="btn btn-neutral" title="Using
Eagle"><span class="icon icon-circle-arrow-left"></span> Previous</a>
+
+ </div>
+
+
+ <hr/>
+
+ <div role="contentinfo">
+ <!-- Copyright etc -->
+
+ </div>
+
+ Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a
href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a
href="https://readthedocs.org">Read the Docs</a>.
+</footer>
+
+ </div>
+ </div>
+
+ </section>
+
+ </div>
+
+<div class="rst-versions" role="note" style="cursor: pointer">
+ <span class="rst-current-version" data-toggle="rst-current-version">
+
+ <a href="https://github.com/apache/eagle/tree/master/docs"
class="icon icon-github" style="float: left; color: #fcfcfc"> GitHub</a>
+
+
+ <span><a href="../using-eagle/" style="color: #fcfcfc;">«
Previous</a></span>
+
+
+ <span style="margin-left: 15px"><a href="../developing-application/"
style="color: #fcfcfc">Next »</a></span>
+
+ </span>
+</div>
+
+</body>
+</html>
Propchange: eagle/site/docs/v0.5.0/applications/index.html
------------------------------------------------------------------------------
svn:eol-style = native
Added: eagle/site/docs/v0.5.0/developing-application/index.html
URL:
http://svn.apache.org/viewvc/eagle/site/docs/v0.5.0/developing-application/index.html?rev=1789965&view=auto
==============================================================================
--- eagle/site/docs/v0.5.0/developing-application/index.html (added)
+++ eagle/site/docs/v0.5.0/developing-application/index.html Mon Apr 3
11:33:14 2017
@@ -0,0 +1,857 @@
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+
+
+ <title>Developing Application - Apache Eagle Documentation</title>
+
+
+ <link rel="shortcut icon" href="../include/images/favicon.png">
+
+
+
+ <link
href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700'
rel='stylesheet' type='text/css'>
+
+ <link rel="stylesheet" href="../css/theme.css" type="text/css" />
+ <link rel="stylesheet" href="../css/theme_extra.css" type="text/css" />
+ <link rel="stylesheet" href="../css/highlight.css">
+
+
+ <script>
+ // Current page data
+ var mkdocs_page_name = "Developing Application";
+ var mkdocs_page_input_path = "developing-application.md";
+ var mkdocs_page_url = "/developing-application/";
+ </script>
+
+ <script src="../js/jquery-2.1.1.min.js"></script>
+ <script src="../js/modernizr-2.8.3.min.js"></script>
+ <script type="text/javascript" src="../js/highlight.pack.js"></script>
+ <script src="../js/theme.js"></script>
+
+
+</head>
+
+<body class="wy-body-for-nav" role="document">
+
+ <div class="wy-grid-for-nav">
+
+
+ <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
+ <div class="wy-side-nav-search">
+ <a href=".." class="icon icon-home"> Apache Eagle Documentation</a>
+ <div role="search">
+ <form id ="rtd-search-form" class="wy-form" action="../search.html"
method="get">
+ <input type="text" name="q" placeholder="Search docs" />
+ </form>
+</div>
+ </div>
+
+ <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation"
aria-label="main navigation">
+ <ul class="current">
+
+ <li><script>
+ function select(elem) {
+ var selectedClassName = "selected";
+ $(".wy-menu-vertical li.selected").removeClass(selectedClassName);
+ $(elem).addClass(selectedClassName);
+ }
+</script>
+
+<!--
+ this macro is to fetch the first child element that has url and return the
url as the default one of the section
+ arguemnt:
+ ni: nav_item, corresponding to navigation item configured in
mkdocs.yml's "pages"
+ -->
+
+
+<!--
+ this macro generates the style for indentation on sub tocs in side nav
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!--
+ this macro shows toc items including nested tocs, toc nesting level would
depending on arguments described below
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!-- generate side nav based on navigation configured in mkdocs.yml -->
+
+ <li class="toctree-l1 ">
+ <a class="" href="..">Home</a>
+
+ </li>
+<li>
+
+ <li><script>
+ function select(elem) {
+ var selectedClassName = "selected";
+ $(".wy-menu-vertical li.selected").removeClass(selectedClassName);
+ $(elem).addClass(selectedClassName);
+ }
+</script>
+
+<!--
+ this macro is to fetch the first child element that has url and return the
url as the default one of the section
+ arguemnt:
+ ni: nav_item, corresponding to navigation item configured in
mkdocs.yml's "pages"
+ -->
+
+
+<!--
+ this macro generates the style for indentation on sub tocs in side nav
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!--
+ this macro shows toc items including nested tocs, toc nesting level would
depending on arguments described below
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!-- generate side nav based on navigation configured in mkdocs.yml -->
+
+ <li class="toctree-l1 ">
+ <a class="" href="../getting-started/">Getting Started</a>
+
+ </li>
+<li>
+
+ <li><script>
+ function select(elem) {
+ var selectedClassName = "selected";
+ $(".wy-menu-vertical li.selected").removeClass(selectedClassName);
+ $(elem).addClass(selectedClassName);
+ }
+</script>
+
+<!--
+ this macro is to fetch the first child element that has url and return the
url as the default one of the section
+ arguemnt:
+ ni: nav_item, corresponding to navigation item configured in
mkdocs.yml's "pages"
+ -->
+
+
+<!--
+ this macro generates the style for indentation on sub tocs in side nav
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!--
+ this macro shows toc items including nested tocs, toc nesting level would
depending on arguments described below
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!-- generate side nav based on navigation configured in mkdocs.yml -->
+
+ <li class="toctree-l1 ">
+ <a class="" href="../using-eagle/">Using Eagle</a>
+
+ </li>
+<li>
+
+ <li><script>
+ function select(elem) {
+ var selectedClassName = "selected";
+ $(".wy-menu-vertical li.selected").removeClass(selectedClassName);
+ $(elem).addClass(selectedClassName);
+ }
+</script>
+
+<!--
+ this macro is to fetch the first child element that has url and return the
url as the default one of the section
+ arguemnt:
+ ni: nav_item, corresponding to navigation item configured in
mkdocs.yml's "pages"
+ -->
+
+
+<!--
+ this macro generates the style for indentation on sub tocs in side nav
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!--
+ this macro shows toc items including nested tocs, toc nesting level would
depending on arguments described below
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!-- generate side nav based on navigation configured in mkdocs.yml -->
+
+ <li class="toctree-l1 ">
+ <a class="" href="../applications/">Applications</a>
+
+ </li>
+<li>
+
+ <li><script>
+ function select(elem) {
+ var selectedClassName = "selected";
+ $(".wy-menu-vertical li.selected").removeClass(selectedClassName);
+ $(elem).addClass(selectedClassName);
+ }
+</script>
+
+<!--
+ this macro is to fetch the first child element that has url and return the
url as the default one of the section
+ arguemnt:
+ ni: nav_item, corresponding to navigation item configured in
mkdocs.yml's "pages"
+ -->
+
+
+<!--
+ this macro generates the style for indentation on sub tocs in side nav
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!--
+ this macro shows toc items including nested tocs, toc nesting level would
depending on arguments described below
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!-- generate side nav based on navigation configured in mkdocs.yml -->
+
+ <li class="toctree-l1 current">
+ <a class="current" href="./">Developing Application</a>
+
+ <ul>
+
+
+
+ <li class="toctree-l3" onclick="select(this)"><a
+
+
+
+ href="#introduction">Introduction</a></li>
+
+
+
+
+
+
+ <li class="toctree-l3" onclick="select(this)"><a
+
+
+
+ href="#quick-start">Quick Start</a></li>
+
+
+
+
+
+
+ <li class="toctree-l3" onclick="select(this)"><a
+
+
+
+ href="#create-application">Create Application</a></li>
+
+
+
+
+
+
+ <li class="toctree-l3" onclick="select(this)"><a
+
+
+
+ href="#test-application">Test Application</a></li>
+
+
+
+
+
+
+ <li class="toctree-l3" onclick="select(this)"><a
+
+
+
+ href="#management-rest-api">Management & REST API</a></li>
+
+ <ul>
+
+
+
+ <li class="toctree-l4" onclick="select(this)"><a
+
+
+ style="padding-left: 4em;"
+
+ href="#applicationproviderspiloader">ApplicationProviderSPILoader</a></li>
+
+
+
+
+
+
+ <li class="toctree-l4" onclick="select(this)"><a
+
+
+ style="padding-left: 4em;"
+
+ href="#application-rest-api">Application REST API</a></li>
+
+
+
+
+ </ul>
+
+
+
+
+ </ul>
+
+ </li>
+<li>
+
+ <li><script>
+ function select(elem) {
+ var selectedClassName = "selected";
+ $(".wy-menu-vertical li.selected").removeClass(selectedClassName);
+ $(elem).addClass(selectedClassName);
+ }
+</script>
+
+<!--
+ this macro is to fetch the first child element that has url and return the
url as the default one of the section
+ arguemnt:
+ ni: nav_item, corresponding to navigation item configured in
mkdocs.yml's "pages"
+ -->
+
+
+<!--
+ this macro generates the style for indentation on sub tocs in side nav
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!--
+ this macro shows toc items including nested tocs, toc nesting level would
depending on arguments described below
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!-- generate side nav based on navigation configured in mkdocs.yml -->
+
+ <li class="toctree-l1 ">
+ <a class="" href="../underlying-design/">Underlying Design</a>
+
+ </li>
+<li>
+
+ <li><script>
+ function select(elem) {
+ var selectedClassName = "selected";
+ $(".wy-menu-vertical li.selected").removeClass(selectedClassName);
+ $(elem).addClass(selectedClassName);
+ }
+</script>
+
+<!--
+ this macro is to fetch the first child element that has url and return the
url as the default one of the section
+ arguemnt:
+ ni: nav_item, corresponding to navigation item configured in
mkdocs.yml's "pages"
+ -->
+
+
+<!--
+ this macro generates the style for indentation on sub tocs in side nav
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!--
+ this macro shows toc items including nested tocs, toc nesting level would
depending on arguments described below
+ argument:
+ current_level: the level number of current toc item
+ max_level: a number indicating how many toc item levels should show up
+ -->
+
+
+<!-- generate side nav based on navigation configured in mkdocs.yml -->
+
+ <li class="toctree-l1 ">
+ <a class="" href="../reference/">Reference</a>
+
+ </li>
+<li>
+
+ </ul>
+ </div>
+
+ </nav>
+
+ <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+
+ <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
+ <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+ <a href="..">Apache Eagle Documentation</a>
+ </nav>
+
+
+ <div class="wy-nav-content">
+ <div class="rst-content">
+ <div role="navigation" aria-label="breadcrumbs navigation">
+ <ul class="wy-breadcrumbs">
+ <li><a href="..">Docs</a> »</li>
+
+
+
+ <li>Developing Application</li>
+ <li class="wy-breadcrumbs-aside">
+
+
+ <a href="https://github.com/apache/eagle/tree/master/docs"
class="icon icon-github"> Edit on GitHub</a>
+
+
+ </li>
+ </ul>
+ <hr/>
+</div>
+ <div role="main">
+ <div class="section">
+
+ <h1 id="introduction">Introduction</h1>
+<p><a href="../applications">Applications</a> in Eagle include process
component and view component. Process component normally refers to storm
topology or spark stream job which processes incoming data, while viewing
component normally refers to GUI hosted in Eagle UI. </p>
+<p><a href="../getting-started/#eagle-framework">Application Framework</a>
targets at solving the problem of managing application lifecycle and presenting
uniform views to end users.</p>
+<p>Eagle application framework is designed for end-to-end lifecycle of
applications including:</p>
+<ul>
+<li>
+<p><strong>Development</strong>: application development and framework
development</p>
+</li>
+<li>
+<p><strong>Testing</strong>.</p>
+</li>
+<li>
+<p><strong>Installation</strong>: package management with SPI/Providers.xml</p>
+</li>
+<li>
+<p><strong>Management</strong>: manage applications through REST API</p>
+</li>
+</ul>
+<hr />
+<h1 id="quick-start">Quick Start</h1>
+<ul>
+<li>
+<p>Fork and clone eagle source code repository using GIT.</p>
+<pre><code>git clone https://github.com/apache/incubator-eagle.git
+</code></pre>
+</li>
+<li>
+<p>Run Eagle Server : execute âorg.apache.eagle.server.ServerDebugâ under
eagle-server in IDE or with maven command line.</p>
+<pre><code>org.apache.eagle.server.ServerDebug
+</code></pre>
+</li>
+<li>
+<p>Access current available applications through API.</p>
+<pre><code>curl -XGET http://localhost:9090/rest/apps/providers
+</code></pre>
+</li>
+<li>
+<p>Create Site through API.</p>
+<pre><code>curl -H "Content-Type: application/json" -X POST
http://localhost:9090/rest/sites --data '{
+ "siteId":"test_site",
+ "siteName":"Test Site",
+ "description":"This is a sample site for test",
+ "context":{
+ "type":"FAKE_CLUSTER",
+ "url":"http://localhost:9090",
+ "version":"2.6.4",
+ "additional_attr":"Some information about the face cluster site"
+ }
+}'
+</code></pre>
+</li>
+<li>
+<p>Install Application through API.</p>
+<pre><code>curl -H "Content-Type: application/json" -X POST
http://localhost:9090/rest/apps/install --data '{
+ "siteId":"test_site",
+ "appType":"EXAMPLE_APPLICATION",
+ "mode":"LOCAL"
+}'
+</code></pre>
+</li>
+<li>
+<p>Start Application (uuid means installed application uuid).</p>
+<pre><code>curl -H "Content-Type: application/json" âX POST
http://localhost:9090/rest/apps/start --data '{
+ "uuid":"9acf6792-60e8-46ea-93a6-160fb6ef0b3f"
+}'
+</code></pre>
+</li>
+<li>
+<p>Stop Application (uuid means installed application uuid).</p>
+<pre><code>curl -XPOST http://localhost:9090/rest/apps/stop '{
+ "uuid": "9acf6792-60e8-46ea-93a6-160fb6ef0b3f"
+}'
+</code></pre>
+</li>
+<li>
+<p>Uninstall Application (uuid means installed application uuid).</p>
+<pre><code>curl -XDELETE http://localhost:9090/rest/apps/uninstall '{
+ "uuid": "9acf6792-60e8-46ea-93a6-160fb6ef0b3f"
+}'
+</code></pre>
+</li>
+</ul>
+<hr />
+<h1 id="create-application">Create Application</h1>
+<p>Each application should be developed under independent modules (including
backend code and front-end code).</p>
+<p>Here is a typical code structure of a new application as following:</p>
+<pre><code>eagle-app-example/
+âââ pom.xml
+âââ src
+â âââ main
+â â âââ java
+â â â âââ org
+â â â âââ apache
+â â â âââ eagle
+â â â âââ app
+â â â âââ example
+â â â âââ ExampleApplicationProvider.java
+â â â âââ ExampleStormApplication.java
+â â âââ resources
+â â â âââ META-INF
+â â â âââ providers
+â â â â âââ
org.apache.eagle.app.example.ExampleApplicationProvider.xml
+â â â âââ services
+â â â âââ
org.apache.eagle.app.spi.ApplicationProvider
+â â âââ webapp
+â â âââ app
+â â â âââ apps
+â â â âââ example
+â â â âââ index.html
+â â âââ package.json
+â âââ test
+â âââ java
+â â âââ org
+â â âââ apache
+â â âââ eagle
+â â âââ app
+â â âââ example
+â â â âââ
ExampleApplicationProviderTest.java
+â â â âââ ExampleApplicationTest.java
+â âââ resources
+â âââ application.conf
+</code></pre>
+
+<p><strong>Eagle Example Application</strong> - <a
href="https://github.com/haoch/incubator-eagle/tree/master/eagle-examples/eagle-app-example">eagle-app-example</a></p>
+<p><strong>Description</strong> - A typical eagle application is mainly
consisted of:</p>
+<ul>
+<li>
+<p><strong>Application</strong>: define core execution process logic
inheriting from org.apache.eagle.app.Application, which is also implemented
ApplicationTool to support Application to run as standalone process like a
Storm topology through command line.</p>
+</li>
+<li>
+<p><strong>ApplicationProvider</strong>: the interface to package application
with descriptor metadata, also used as application SPI to dynamically load new
application types.</p>
+</li>
+<li>
+<p><strong>META-INF/providers/${APP_PROVIDER_CLASS_NAME}.xml</strong>: support
to easily describe applicationâs descriptor with declarative XML like:</p>
+<pre><code><application>
+ <type>EXAMPLE_APPLICATION</type>
+ <name>Example Monitoring Application</name>
+ <version>0.5.0-incubating</version>
+ <configuration>
+ <property>
+ <name>message</name>
+ <displayName>Message</displayName>
+ <value>Hello, example application!</value>
+ <description>Just an sample configuration
property</description>
+ </property>
+ </configuration>
+ <streams>
+ <stream>
+ <streamId>SAMPLE_STREAM_1</streamId>
+ <description>Sample output stream #1</description>
+ <validate>true</validate>
+ <timeseries>true</timeseries>
+ <columns>
+ <column>
+ <name>metric</name>
+ <type>string</type>
+ </column>
+ <column>
+ <name>source</name>
+ <type>string</type>
+ </column>
+ <column>
+ <name>value</name>
+ <type>double</type>
+ <defaultValue>0.0</defaultValue>
+ </column>
+ </columns>
+ </stream>
+ <stream>
+ <streamId>SAMPLE_STREAM_2</streamId>
+ <description>Sample output stream #2</description>
+ <validate>true</validate>
+ <timeseries>true</timeseries>
+ <columns>
+ <column>
+ <name>metric</name>
+ <type>string</type>
+ </column>
+ <column>
+ <name>source</name>
+ <type>string</type>
+ </column>
+ <column>
+ <name>value</name>
+ <type>double</type>
+ <defaultValue>0.0</defaultValue>
+ </column>
+ </columns>
+ </stream>
+ </streams>
+</application>
+</code></pre>
+</li>
+<li>
+<p><strong>META-INF/services/org.apache.eagle.app.spi.ApplicationProvider</strong>:
support to dynamically scan and load extensible application provider using
java service provider.</p>
+</li>
+<li>
+<p><strong>webapp/app/apps/${APP_TYPE}</strong>: if the application has web
portal, then it could add more web code under this directory and make sure
building as following in pom.xml</p>
+<pre><code><build>
+ <resources>
+ <resource>
+ <directory>src/main/webapp/app</directory>
+ <targetPath>assets/</targetPath>
+ </resource>
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ </resources>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ </testResource>
+ </testResources>
+</build>
+</code></pre>
+</li>
+</ul>
+<hr />
+<h1 id="test-application">Test Application</h1>
+<ul>
+<li>
+<p>Extend <strong>org.apache.eagle.app.test.ApplicationTestBase</strong> and
initialize injector context.</p>
+</li>
+<li>
+<p>Access shared service with <strong>@Inject</strong>.</p>
+</li>
+<li>
+<p>Test application lifecycle with related web resource.</p>
+<pre><code>@Inject private SiteResource siteResource;
+@Inject private ApplicationResource applicationResource;
+
+// Create local site
+SiteEntity siteEntity = new SiteEntity();
+siteEntity.setSiteId("test_site");
+siteEntity.setSiteName("Test Site");
+siteEntity.setDescription("Test Site for ExampleApplicationProviderTest");
+siteResource.createSite(siteEntity);
+Assert.assertNotNull(siteEntity.getUuid());
+
+ApplicationOperations.InstallOperation installOperation = new
ApplicationOperations.InstallOperation(
+ "test_site",
+ "EXAMPLE_APPLICATION",
+ ApplicationEntity.Mode.LOCAL);
+installOperation.setConfiguration(getConf());
+// Install application
+ApplicationEntity applicationEntity = applicationResource
+ .installApplication(installOperation)
+ .getData();
+// Start application
+applicationResource.startApplication(new
ApplicationOperations.StartOperation(applicationEntity.getUuid()));
+// Stop application
+applicationResource.stopApplication(new
ApplicationOperations.StopOperation(applicationEntity.getUuid()));
+// Uninstall application
+applicationResource.uninstallApplication(
+ new ApplicationOperations.UninstallOperation(applicationEntity.getUuid()));
+try {
+ applicationResource.getApplicationEntityByUUID(applicationEntity.getUuid());
+ Assert.fail("Application instance (UUID: " + applicationEntity.getUuid() +
") should have been uninstalled");
+} catch (Exception ex) {
+ // Expected exception
+}
+</code></pre>
+</li>
+</ul>
+<hr />
+<h1 id="management-rest-api">Management & REST API</h1>
+<h2 id="applicationproviderspiloader">ApplicationProviderSPILoader</h2>
+<p>Default behavior - automatically loading from class path using SPI:</p>
+<ul>
+<li>
+<p>By default, eagle will load application providers from current class
loader.</p>
+</li>
+<li>
+<p>If application.provider.dir defined, it will load from external jarsâ
class loader.</p>
+</li>
+</ul>
+<h2 id="application-rest-api">Application REST API</h2>
+<ul>
+<li>
+<p>API Table</p>
+<table>
+<thead>
+<tr>
+<th>Type</th>
+<th>Uri + Class</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td><strong>DELETE</strong></td>
+<td>/rest/sites (org.apache.eagle.metadata.resource.SiteResource)</td>
+</tr>
+<tr>
+<td><strong>DELETE</strong></td>
+<td>/rest/sites/{siteId} (org.apache.eagle.metadata.resource.SiteResource)</td>
+</tr>
+<tr>
+<td><strong>GET</strong></td>
+<td>/rest/sites (org.apache.eagle.metadata.resource.SiteResource)</td>
+</tr>
+<tr>
+<td><strong>GET</strong></td>
+<td>/rest/sites/{siteId} (org.apache.eagle.metadata.resource.SiteResource)</td>
+</tr>
+<tr>
+<td><strong>POST</strong></td>
+<td>/rest/sites (org.apache.eagle.metadata.resource.SiteResource)</td>
+</tr>
+<tr>
+<td><strong>PUT</strong></td>
+<td>/rest/sites (org.apache.eagle.metadata.resource.SiteResource)</td>
+</tr>
+<tr>
+<td><strong>PUT</strong></td>
+<td>/rest/sites/{siteId} (org.apache.eagle.metadata.resource.SiteResource)</td>
+</tr>
+<tr>
+<td><strong>DELETE</strong></td>
+<td>/rest/apps/uninstall
(org.apache.eagle.app.resource.ApplicationResource)</td>
+</tr>
+<tr>
+<td><strong>GET</strong></td>
+<td>/rest/apps (org.apache.eagle.app.resource.ApplicationResource)</td>
+</tr>
+<tr>
+<td><strong>GET</strong></td>
+<td>/rest/apps/providers
(org.apache.eagle.app.resource.ApplicationResource)</td>
+</tr>
+<tr>
+<td><strong>GET</strong></td>
+<td>/rest/apps/providers/{type}
(org.apache.eagle.app.resource.ApplicationResource)</td>
+</tr>
+<tr>
+<td><strong>GET</strong></td>
+<td>/rest/apps/{appUuid}
(org.apache.eagle.app.resource.ApplicationResource)</td>
+</tr>
+<tr>
+<td><strong>POST</strong></td>
+<td>/rest/apps/install (org.apache.eagle.app.resource.ApplicationResource)</td>
+</tr>
+<tr>
+<td><strong>POST</strong></td>
+<td>/rest/apps/start (org.apache.eagle.app.resource.ApplicationResource)</td>
+</tr>
+<tr>
+<td><strong>POST</strong></td>
+<td>/rest/apps/stop (org.apache.eagle.app.resource.ApplicationResource)</td>
+</tr>
+<tr>
+<td><strong>PUT</strong></td>
+<td>/rest/apps/providers/reload
(org.apache.eagle.app.resource.ApplicationResource)</td>
+</tr>
+</tbody>
+</table>
+</li>
+</ul>
+
+ </div>
+ </div>
+ <footer>
+
+ <div class="rst-footer-buttons" role="navigation" aria-label="footer
navigation">
+
+ <a href="../underlying-design/" class="btn btn-neutral float-right"
title="Underlying Design">Next <span class="icon
icon-circle-arrow-right"></span></a>
+
+
+ <a href="../applications/" class="btn btn-neutral"
title="Applications"><span class="icon icon-circle-arrow-left"></span>
Previous</a>
+
+ </div>
+
+
+ <hr/>
+
+ <div role="contentinfo">
+ <!-- Copyright etc -->
+
+ </div>
+
+ Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a
href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a
href="https://readthedocs.org">Read the Docs</a>.
+</footer>
+
+ </div>
+ </div>
+
+ </section>
+
+ </div>
+
+<div class="rst-versions" role="note" style="cursor: pointer">
+ <span class="rst-current-version" data-toggle="rst-current-version">
+
+ <a href="https://github.com/apache/eagle/tree/master/docs"
class="icon icon-github" style="float: left; color: #fcfcfc"> GitHub</a>
+
+
+ <span><a href="../applications/" style="color: #fcfcfc;">«
Previous</a></span>
+
+
+ <span style="margin-left: 15px"><a href="../underlying-design/"
style="color: #fcfcfc">Next »</a></span>
+
+ </span>
+</div>
+
+</body>
+</html>
Propchange: eagle/site/docs/v0.5.0/developing-application/index.html
------------------------------------------------------------------------------
svn:eol-style = native