You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eagle.apache.org by ha...@apache.org on 2015/11/19 14:47:13 UTC

svn commit: r1715179 [14/14] - in /incubator/eagle/site: ./ about/ css/ data/ development/ docs/ docs/tutorial/ fonts/ images/ images/docs/ images/posts/ images/slider/ images/usecases/ js/ post/ post/2015/ post/2015/10/ post/2015/10/27/

Added: incubator/eagle/site/js/jquery.singlePageNav.js
URL: http://svn.apache.org/viewvc/incubator/eagle/site/js/jquery.singlePageNav.js?rev=1715179&view=auto
==============================================================================
--- incubator/eagle/site/js/jquery.singlePageNav.js (added)
+++ incubator/eagle/site/js/jquery.singlePageNav.js Thu Nov 19 13:47:10 2015
@@ -0,0 +1,183 @@
+/**
+ * Single Page Nav Plugin
+ * Copyright (c) 2013 Chris Wojcik <he...@chriswojcik.net>
+ * Dual licensed under MIT and GPL.
+ * @author Chris Wojcik
+ * @version 1.1.0
+ */
+
+// Utility
+if (typeof Object.create !== 'function') {
+    Object.create = function(obj) {
+        function F() {}
+        F.prototype = obj;
+        return new F();
+    };
+}
+
+(function($, window, document, undefined) {
+    "use strict";
+    
+    var SinglePageNav = {
+        
+        init: function(options, container) {
+            
+            this.options = $.extend({}, $.fn.singlePageNav.defaults, options);
+            
+            this.container = container;            
+            this.$container = $(container);
+            this.$links = this.$container.find('a');
+
+            if (this.options.filter !== '') {
+                this.$links = this.$links.filter(this.options.filter);
+            }
+
+            this.$window = $(window);
+            this.$htmlbody = $('html, body');
+            
+            this.$links.on('click.singlePageNav', $.proxy(this.handleClick, this));
+
+            this.didScroll = false;
+            this.checkPosition();
+            this.setTimer();
+        },
+
+        handleClick: function(e) {
+            var self  = this,
+                link  = e.currentTarget,
+                $elem = $(link.hash);  
+
+            e.preventDefault();             
+
+            if ($elem.length) { // Make sure the target elem exists
+
+                
+                // Prevent active link from cycling during the scroll
+                self.clearTimer();
+
+                // Before scrolling starts
+                if (typeof self.options.beforeStart === 'function') {
+                    self.options.beforeStart();
+                }
+
+                self.setActiveLink(link.hash);
+                
+                self.scrollTo($elem, function() { 
+                 
+                    if (self.options.updateHash) {
+                        document.location.hash = link.hash;
+                    }
+
+                    self.setTimer();
+
+                    // After scrolling ends
+                    if (typeof self.options.onComplete === 'function') {
+                        self.options.onComplete();
+                    }
+                });                            
+            }     
+        },
+        
+        scrollTo: function($elem, callback) {
+            var self = this;
+            var target = self.getCoords($elem).top;
+            var called = false;
+
+            self.$htmlbody.stop().animate(
+                {scrollTop: target}, 
+                { 
+                    duration: self.options.speed,
+                    easing: self.options.easing, 
+                    complete: function() {
+                        if (typeof callback === 'function' && !called) {
+                            callback();
+                        }
+                        called = true;
+                    }
+                }
+            );
+        },
+        
+        setTimer: function() {
+            var self = this;
+            
+            self.$window.on('scroll.singlePageNav', function() {
+                self.didScroll = true;
+            });
+            
+            self.timer = setInterval(function() {
+                if (self.didScroll) {
+                    self.didScroll = false;
+                    self.checkPosition();
+                }
+            }, 250);
+        },        
+        
+        clearTimer: function() {
+            clearInterval(this.timer);
+            this.$window.off('scroll.singlePageNav');
+            this.didScroll = false;
+        },
+        
+        // Check the scroll position and set the active section
+        checkPosition: function() {
+            var scrollPos = this.$window.scrollTop();
+            var currentSection = this.getCurrentSection(scrollPos);
+            this.setActiveLink(currentSection);
+        },        
+        
+        getCoords: function($elem) {
+            return {
+                top: Math.round($elem.offset().top) - this.options.offset
+            };
+        },
+        
+        setActiveLink: function(href) {
+            var $activeLink = this.$container.find("a[href='" + href + "']");
+                            
+            if (!$activeLink.hasClass(this.options.currentClass)) {
+                this.$links.removeClass(this.options.currentClass);
+                $activeLink.addClass(this.options.currentClass);
+            }
+        },        
+        
+        getCurrentSection: function(scrollPos) {
+            var i, hash, coords, section;
+            
+            for (i = 0; i < this.$links.length; i++) {
+                hash = this.$links[i].hash;
+                
+                if ($(hash).length) {
+                    coords = this.getCoords($(hash));
+                    
+                    if (scrollPos >= coords.top - this.options.threshold) {
+                        section = hash;
+                    }
+                }
+            }
+            
+            // The current section or the first link
+            return section || this.$links[0].hash;
+        }
+    };
+    
+    $.fn.singlePageNav = function(options) {
+        return this.each(function() {
+            var singlePageNav = Object.create(SinglePageNav);
+            singlePageNav.init(options, this);
+        });
+    };
+    
+    $.fn.singlePageNav.defaults = {
+        offset: 0,
+        threshold: 120,
+        speed: 400,
+        currentClass: 'current',
+        easing: 'swing',
+        updateHash: false,
+        filter: '',
+        onComplete: false,
+        beforeStart: false
+    };
+    
+})(jQuery, window, document);
\ No newline at end of file

Propchange: incubator/eagle/site/js/jquery.singlePageNav.js
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/eagle/site/js/modernizr.min.js
URL: http://svn.apache.org/viewvc/incubator/eagle/site/js/modernizr.min.js?rev=1715179&view=auto
==============================================================================
--- incubator/eagle/site/js/modernizr.min.js (added)
+++ incubator/eagle/site/js/modernizr.min.js Thu Nov 19 13:47:10 2015
@@ -0,0 +1 @@
+window.Modernizr=function(e,t,n){function r(e,t){var n=e.charAt(0).toUpperCase()+e.substr(1),r=(e+" "+C.join(n+" ")+n).split(" ");return o(r,t)}function o(e,t){for(var r in e)if(v[e[r]]!==n)return"pfx"==t?e[r]:!0;return!1}function i(e,t){return!!~(""+e).indexOf(t)}function a(e,t){return typeof e===t}function s(e,t){return c(x.join(e+";")+(t||""))}function c(e){v.cssText=e}var l,u,f,d="2.0.6",p={},m=!0,h=t.documentElement,g=(t.head||t.getElementsByTagName("head")[0],"modernizr"),y=t.createElement(g),v=y.style,b=":)",x=(Object.prototype.toString," -webkit- -moz- -o- -ms- -khtml- ".split(" ")),C="Webkit Moz O ms Khtml".split(" "),E={},S=[],T=function(e,n,r,o){var i,a,s,c=t.createElement("div");if(parseInt(r,10))for(;r--;)s=t.createElement("div"),s.id=o?o[r]:g+(r+1),c.appendChild(s);return i=["&shy;","<style>",e,"</style>"].join(""),c.id=g,c.innerHTML+=i,h.appendChild(c),a=n(c,e),c.parentNode.removeChild(c),!!a},w={}.hasOwnProperty;f=a(w,n)||a(w.call,n)?function(e,t){return t in e&&a(e.
 constructor.prototype[t],n)}:function(e,t){return w.call(e,t)};!function(e,n){var r=e.join(""),o=n.length;T(r,function(e,n){for(var r=t.styleSheets[t.styleSheets.length-1],i=r.cssRules&&r.cssRules[0]?r.cssRules[0].cssText:r.cssText||"",a=e.childNodes,s={};o--;)s[a[o].id]=a[o];p.csstransforms3d=9===s.csstransforms3d.offsetLeft,p.generatedcontent=s.generatedcontent.offsetHeight>=1,p.fontface=/src/i.test(i)&&0===i.indexOf(n.split(" ")[0])},o,n)}(['@font-face {font-family:"font";src:url("https://")}',["@media (",x.join("transform-3d),("),g,")","{#csstransforms3d{left:9px;position:absolute}}"].join(""),['#generatedcontent:after{content:"',b,'";visibility:hidden}'].join("")],["fontface","csstransforms3d","generatedcontent"]);E.flexbox=function(){function e(e,t,n,r){e.style.cssText=x.join(t+":"+n+";")+(r||"")}function n(e,t,n,r){t+=":",e.style.cssText=(t+x.join(n+";"+t)).slice(0,-t.length)+(r||"")}var r=t.createElement("div"),o=t.createElement("div");n(r,"display","box","width:42px;padding
 :0;"),e(o,"box-flex","1","width:10px;"),r.appendChild(o),h.appendChild(r);var i=42===o.offsetWidth;return r.removeChild(o),h.removeChild(r),i},E.rgba=function(){return c("background-color:rgba(150,255,150,.5)"),i(v.backgroundColor,"rgba")},E.hsla=function(){return c("background-color:hsla(120,40%,100%,.5)"),i(v.backgroundColor,"rgba")||i(v.backgroundColor,"hsla")},E.multiplebgs=function(){return c("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(v.background)},E.backgroundsize=function(){return r("backgroundSize")},E.borderimage=function(){return r("borderImage")},E.borderradius=function(){return r("borderRadius")},E.boxshadow=function(){return r("boxShadow")},E.textshadow=function(){return""===t.createElement("div").style.textShadow},E.opacity=function(){return s("opacity:.55"),/^0.55$/.test(v.opacity)},E.cssanimations=function(){return r("animationName")},E.csscolumns=function(){return r("columnCount")},E.cssgradients=function(){var e="background
 -image:",t="gradient(linear,left top,right bottom,from(#9f9),to(white));",n="linear-gradient(left top,#9f9, white);";return c((e+x.join(t+e)+x.join(n+e)).slice(0,-e.length)),i(v.backgroundImage,"gradient")},E.cssreflections=function(){return r("boxReflect")},E.csstransforms=function(){return!!o(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])},E.csstransforms3d=function(){var e=!!o(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);return e&&"webkitPerspective"in h.style&&(e=p.csstransforms3d),e},E.csstransitions=function(){return r("transitionProperty")},E.fontface=function(){return p.fontface},E.generatedcontent=function(){return p.generatedcontent};for(var j in E)f(E,j)&&(u=j.toLowerCase(),p[u]=E[j](),S.push((p[u]?"":"no-")+u));return c(""),y=l=null,e.attachEvent&&function(){var e=t.createElement("div");return e.innerHTML="<elem></elem>",1!==e.childNodes.length}()&&function(e,t){function r(e){for(var t=-1
 ;++t<c;)e.createElement(s[t])}e.iepp=e.iepp||{};var o,i=e.iepp,a=i.html5elements||"abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",s=a.split("|"),c=s.length,l=new RegExp("(^|\\s)("+a+")","gi"),u=new RegExp("<(/*)("+a+")","gi"),f=/^\s*[\{\}]\s*$/,d=new RegExp("(^|[^\\n]*?\\s)("+a+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),p=t.createDocumentFragment(),m=t.documentElement,h=m.firstChild,g=t.createElement("body"),y=t.createElement("style"),v=/print|all/;i.getCSS=function(e,t){if(e+""===n)return"";for(var r,o=-1,a=e.length,s=[];++o<a;)r=e[o],r.disabled||(t=r.media||t,v.test(t)&&s.push(i.getCSS(r.imports,t),r.cssText),t="all");return s.join("")},i.parseCSS=function(e){for(var t,n=[];null!=(t=d.exec(e));)n.push(((f.exec(t[1])?"\n":t[1])+t[2]+t[3]).replace(l,"$1.iepp_$2")+t[4]);return n.join("\n")},i.writeHTML=function(){var e=-1;for(o=o||t.body;++e<c;)for(var n=t.getElementsByTagName(s[e]),r=n.lengt
 h,i=-1;++i<r;)n[i].className.indexOf("iepp_")<0&&(n[i].className+=" iepp_"+s[e]);p.appendChild(o),m.appendChild(g),g.className=o.className,g.id=o.id,g.innerHTML=o.innerHTML.replace(u,"<$1font")},i._beforePrint=function(){y.styleSheet.cssText=i.parseCSS(i.getCSS(t.styleSheets,"all")),i.writeHTML()},i.restoreHTML=function(){g.innerHTML="",m.removeChild(g),m.appendChild(o)},i._afterPrint=function(){i.restoreHTML(),y.styleSheet.cssText=""},r(t),r(p),i.disablePP||(h.insertBefore(y,h.firstChild),y.media="print",y.className="iepp-printshim",e.attachEvent("onbeforeprint",i._beforePrint),e.attachEvent("onafterprint",i._afterPrint))}(e,t),p._version=d,p._prefixes=x,p._domPrefixes=C,p.testProp=function(e){return o([e])},p.testAllProps=r,p.testStyles=T,h.className=h.className.replace(/\bno-js\b/,"")+(m?" js "+S.join(" "):""),p}(this,this.document),function(e,t,n){function r(e){return!e||"loaded"==e||"complete"==e}function o(){for(var e=1,t=-1;y.length-++t&&(!y[t].s||(e=y[t].r)););e&&s()}functio
 n i(e){var n,i=t.createElement("script");i.src=e.s,i.onreadystatechange=i.onload=function(){!n&&r(i.readyState)&&(n=1,o(),i.onload=i.onreadystatechange=null)},m(function(){n||(n=1,o())},d.errorTimeout),e.e?i.onload():h.parentNode.insertBefore(i,h)}function a(e){var n,r=t.createElement("link");if(r.href=e.s,r.rel="stylesheet",r.type="text/css",e.e||!S&&!b)r.onload=function(){n||(n=1,m(function(){o()},0))},e.e&&r.onload();else{var i=function(e){m(function(){if(!n)try{e.sheet.cssRules.length?(n=1,o()):i(e)}catch(t){1e3==t.code||"security"==t.message||"denied"==t.message?(n=1,m(function(){o()},0)):i(e)}},0)};i(r)}m(function(){n||(n=1,o())},d.errorTimeout),!e.e&&h.parentNode.insertBefore(r,h)}function s(){var e=y.shift();v=1,e?e.t?m(function(){"c"==e.t?a(e):i(e)},0):(e(),o()):v=0}function c(e,n,i,a,c,l){function u(){!p&&r(f.readyState)&&(g.r=p=1,!v&&o(),f.onload=f.onreadystatechange=null,m(function(){C.removeChild(f)},0))}var f=t.createElement(e),p=0,g={t:i,s:n,e:l};f.src=f.data=n,!x&&(f
 .style.display="none"),f.width=f.height="0","object"!=e&&(f.type=i),f.onload=f.onreadystatechange=u,"img"==e?f.onerror=u:"script"==e&&(f.onerror=function(){g.e=g.r=1,s()}),y.splice(a,0,g),C.insertBefore(f,x?null:h),m(function(){p||(C.removeChild(f),g.r=g.e=p=1,o())},d.errorTimeout)}function l(e,t,n){var r="c"==t?j:w;return v=0,t=t||"j",N(e)?c(r,e,t,this.i++,p,n):(y.splice(this.i++,0,e),1==y.length&&s()),this}function u(){var e=d;return e.loader={load:l,i:0},e}var f,d,p=t.documentElement,m=e.setTimeout,h=t.getElementsByTagName("script")[0],g={}.toString,y=[],v=0,b="MozAppearance"in p.style,x=b&&!!t.createRange().compareNode,C=x?p:h.parentNode,E=e.opera&&"[object Opera]"==g.call(e.opera),S="webkitAppearance"in p.style,T=S&&"async"in t.createElement("script"),w=b?"object":E||T?"img":"script",j=S?"img":w,k=Array.isArray||function(e){return"[object Array]"==g.call(e)},P=function(e){return Object(e)===e},N=function(e){return"string"==typeof e},M=function(e){return"[object Function]"==g.ca
 ll(e)},L=[],O={};d=function(e){function t(e){var t,n,r=e.split("!"),o=L.length,i=r.pop(),a=r.length,s={url:i,origUrl:i,prefixes:r};for(n=0;a>n;n++)t=O[r[n]],t&&(s=t(s));for(n=0;o>n;n++)s=L[n](s);return s}function r(e,r,o,i,a){var s=t(e),c=s.autoCallback;if(!s.bypass){if(r&&(r=M(r)?r:r[e]||r[i]||r[e.split("/").pop().split("?")[0]]),s.instead)return s.instead(e,r,o,i,a);o.load(s.url,s.forceCSS||!s.forceJS&&/css$/.test(s.url)?"c":n,s.noexec),(M(r)||M(c))&&o.load(function(){u(),r&&r(s.origUrl,a,i),c&&c(s.origUrl,a,i)})}}function o(e,t){function n(e){if(N(e))r(e,c,t,0,i);else if(P(e))for(o in e)e.hasOwnProperty(o)&&r(e[o],c,t,o,i)}var o,i=!!e.test,a=i?e.yep:e.nope,s=e.load||e.both,c=e.callback;n(a),n(s),e.complete&&t.load(e.complete)}var i,a,s=this.yepnope.loader;if(N(e))r(e,0,s,0);else if(k(e))for(i=0;i<e.length;i++)a=e[i],N(a)?r(a,0,s,0):k(a)?d(a):P(a)&&o(a,s);else P(e)&&o(e,s)},d.addPrefix=function(e,t){O[e]=t},d.addFilter=function(e){L.push(e)},d.errorTimeout=1e4,null==t.readyState&&
 t.addEventListener&&(t.readyState="loading",t.addEventListener("DOMContentLoaded",f=function(){t.removeEventListener("DOMContentLoaded",f,0),t.readyState="complete"},0)),e.yepnope=u()}(this,this.document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
\ No newline at end of file

Propchange: incubator/eagle/site/js/modernizr.min.js
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/eagle/site/js/responsiveCarousel.min.js
URL: http://svn.apache.org/viewvc/incubator/eagle/site/js/responsiveCarousel.min.js?rev=1715179&view=auto
==============================================================================
--- incubator/eagle/site/js/responsiveCarousel.min.js (added)
+++ incubator/eagle/site/js/responsiveCarousel.min.js Thu Nov 19 13:47:10 2015
@@ -0,0 +1,7 @@
+/*! responsiveCarousel.JS - v1.2.0
+ * http://basilio.github.com/responsiveCarousel
+ *
+ * Copyright (c) 2013 Basilio C‡ceres <ba...@gmail.com>;
+ * Licensed under the MIT license */
+
+(function(e){"use strict";e.fn.carousel=function(t){var n,r;n={infinite:true,visible:1,speed:"fast",overflow:false,autoRotate:false,navigation:e(this).data("navigation"),itemMinWidth:0,itemEqualHeight:false,itemMargin:0,itemClassActive:"crsl-active",imageWideClass:"wide-image",carousel:true};return e(this).each(function(){r=e(this);if(e.isEmptyObject(t)===false)e.extend(n,t);if(e.isEmptyObject(e(r).data("crsl"))===false)e.extend(n,e(r).data("crsl"));n.isTouch="ontouchstart"in document.documentElement||navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)?true:false;r.init=function(){n.total=e(r).find(".crsl-item").length;n.itemWidth=e(r).outerWidth();n.visibleDefault=n.visible;n.swipeDistance=null;n.swipeMinDistance=100;n.startCoords={};n.endCoords={};e(r).css({width:"100%"});e(r).find(".crsl-item").css({position:"relative","float":"left",overflow:"hidden",height:"auto"});e(r).find("."+n.imageWideClass).each(function(){e(this).css({display:"block",wid
 th:"100%",height:"auto"})});e(r).find(".crsl-item iframe").attr({width:"100%"});if(n.carousel)e(r).find(".crsl-item:first-child").addClass(n.itemClassActive);if(n.carousel&&n.infinite&&n.visible<n.total)e(r).find(".crsl-item:first-child").before(e(".crsl-item:last-child",r));if(n.overflow===false){e(r).css({overflow:"hidden"})}else{e("html, body").css({"overflow-x":"hidden"})}e(r).trigger("initCarousel",[n,r]);r.testPreload();r.config();r.initRotate();r.triggerNavs()};r.testPreload=function(){if(e(r).find("img").length>0){var t=e(r).find("img").length,i=1;e(r).find("img").each(function(){r.preloadImage(this,i,t);i++})}else{e(r).trigger("loadedCarousel",[n,r])}};r.preloadImage=function(t,i,s){var o=new Image,u={};u.src=e(t).attr("src")!==undefined?t.src:"";u.alt=e(t).attr("alt")!==undefined?t.alt:"";e(o).attr(u);e(o).on("load",function(){if(i===1)e(r).trigger("loadingImagesCarousel",[n,r]);if(i===s)e(r).trigger("loadedImagesCarousel",[n,r])})};r.config=function(){n.itemWidth=Math.flo
 or((e(r).outerWidth()-n.itemMargin*(n.visibleDefault-1))/n.visibleDefault);if(n.itemWidth<=n.itemMinWidth){n.visible=Math.floor((e(r).outerWidth()-n.itemMargin*(n.visible-1))/n.itemMinWidth)===1?Math.floor(e(r).outerWidth()/n.itemMinWidth):Math.floor((e(r).outerWidth()-n.itemMargin)/n.itemMinWidth);n.visible=n.visible<1?1:n.visible;n.itemWidth=n.visible===1?Math.floor(e(r).outerWidth()):Math.floor((e(r).outerWidth()-n.itemMargin*(n.visible-1))/n.visible)}else{n.visible=n.visibleDefault}if(n.carousel){r.wrapWidth=Math.floor((n.itemWidth+n.itemMargin)*n.total);r.wrapMargin=r.wrapMarginDefault=n.infinite&&n.visible<n.total?parseInt((n.itemWidth+n.itemMargin)*-1,10):0;if(n.infinite&&n.visible<n.total&&e(r).find(".crsl-item."+n.itemClassActive).index()===0){e(r).find(".crsl-item:first-child").before(e(".crsl-item:last-child",r));r.wrapMargin=r.wrapMarginDefault=parseInt((n.itemWidth+n.itemMargin)*-1,10)}e(r).find(".crsl-wrap").css({width:r.wrapWidth+"px",marginLeft:r.wrapMargin})}else{r.
 wrapWidth=e(r).outerWidth();e(r).find(".crsl-wrap").css({width:r.wrapWidth+n.itemMargin+"px"});e("#"+n.navigation).hide()}e(r).find(".crsl-item").css({width:n.itemWidth+"px",marginRight:n.itemMargin+"px"});r.equalHeights();if(n.carousel){if(n.visible>=n.total){n.autoRotate=false;e("#"+n.navigation).hide()}else{e("#"+n.navigation).show()}}};r.equalHeights=function(){if(n.itemEqualHeight!==false){var t=0;e(r).find(".crsl-item").each(function(){e(this).css({height:"auto"});if(e(this).outerHeight()>t){t=e(this).outerHeight()}});e(r).find(".crsl-item").css({height:t+"px"})}return true};r.initRotate=function(){if(n.autoRotate!==false){r.rotateTime=window.setInterval(function(){r.rotate()},n.autoRotate)}};r.triggerNavs=function(){e("#"+n.navigation).delegate(".previous, .next","click",function(t){t.preventDefault();r.prepareExecute();if(e(this).hasClass("previous")&&r.testPrevious(r.itemActive)){r.previous()}else if(e(this).hasClass("next")&&r.testNext()){r.next()}else{return}})};r.prepare
 Execute=function(){if(n.autoRotate){clearInterval(r.rotateTime)}r.preventAnimateEvent();r.itemActive=e(r).find(".crsl-item."+n.itemClassActive);return true};r.preventAnimateEvent=function(){if(e(r).find(".crsl-wrap:animated").length>0){return false}};r.rotate=function(){r.preventAnimateEvent();r.itemActive=e(r).find(".crsl-item."+n.itemClassActive);r.next();return true};r.testPrevious=function(t){return e(".crsl-wrap",r).find(".crsl-item").index(t)>0};r.testNext=function(){return!n.infinite&&r.wrapWidth>=(n.itemWidth+n.itemMargin)*(n.visible+1)-r.wrapMargin||n.infinite};r.previous=function(){r.wrapMargin=n.infinite?r.wrapMarginDefault+e(r.itemActive).outerWidth(true):r.wrapMargin+e(r.itemActive).outerWidth(true);var t=e(r.itemActive).index();var i=e(r.itemActive).prev(".crsl-item");var s="previous";e(r).trigger("beginCarousel",[n,r,s]);e(r).find(".crsl-wrap").animate({marginLeft:r.wrapMargin+"px"},n.speed,function(){e(r.itemActive).removeClass(n.itemClassActive);e(i).addClass(n.item
 ClassActive);if(n.infinite){e(this).css({marginLeft:r.wrapMarginDefault}).find(".crsl-item:first-child").before(e(".crsl-item:last-child",r))}else{if(r.testPrevious(i)===false)e("#"+n.navigation).find(".previous").addClass("previous-inactive");if(r.testNext())e("#"+n.navigation).find(".next").removeClass("next-inactive")}e(this).trigger("endCarousel",[n,r,s])})};r.next=function(){r.wrapMargin=n.infinite?r.wrapMarginDefault-e(r.itemActive).outerWidth(true):r.wrapMargin-e(r.itemActive).outerWidth(true);var t=e(r.itemActive).index();var i=e(r.itemActive).next(".crsl-item");var s="next";e(r).trigger("beginCarousel",[n,r,s]);e(r).find(".crsl-wrap").animate({marginLeft:r.wrapMargin+"px"},n.speed,function(){e(r.itemActive).removeClass(n.itemClassActive);e(i).addClass(n.itemClassActive);if(n.infinite){e(this).css({marginLeft:r.wrapMarginDefault}).find(".crsl-item:last-child").after(e(".crsl-item:first-child",r))}else{if(r.testPrevious(i))e("#"+n.navigation).find(".previous").removeClass("pr
 evious-inactive");if(r.testNext()===false)e("#"+n.navigation).find(".next").addClass("next-inactive")}e(this).trigger("endCarousel",[n,r,s])})};var i=false,s;e(window).on("mouseleave",function(t){if(t.target)s=t.target;else if(t.srcElement)s=t.srcElement;if(e(r).attr("id")&&e(s).parents(".crsl-items").attr("id")===e(r).attr("id")||e(s).parents(".crsl-items").data("navigation")===e(r).data("navigation")){i=true}else{i=false}return false});e(window).on("keydown",function(e){if(i===true){if(e.keyCode===37){r.prepareExecute();r.previous()}else if(e.keyCode===39){r.prepareExecute();r.next()}}return});if(n.isTouch){e(r).on("touchstart",function(t){e(r).addClass("touching");n.startCoords=t.originalEvent.targetTouches[0];n.endCoords=t.originalEvent.targetTouches[0];e(".touching").on("touchmove",function(e){n.endCoords=e.originalEvent.targetTouches[0];if(Math.abs(parseInt(n.endCoords.pageX-n.startCoords.pageX,10))>Math.abs(parseInt(n.endCoords.pageY-n.startCoords.pageY,10))){e.preventDefault
 ();e.stopPropagation()}})}).on("touchend",function(t){t.preventDefault();t.stopPropagation();n.swipeDistance=n.endCoords.pageX-n.startCoords.pageX;if(n.swipeDistance>=n.swipeMinDistance){r.previous()}else if(n.swipeDistance<=-n.swipeMinDistance){r.next()}e(".touching").off("touchmove").removeClass("touching")})}e(r).on("loadedCarousel loadedImagesCarousel",function(){r.equalHeights()});e(window).on("carouselResizeEnd",function(){if(n.itemWidth!==e(r).outerWidth())r.config()});e(window).ready(function(){e(r).trigger("prepareCarousel",[n,r]);r.init();e(window).on("resize",function(){if(this.carouselResizeTo)clearTimeout(this.carouselResizeTo);this.carouselResizeTo=setTimeout(function(){e(this).trigger("carouselResizeEnd")},10)})});e(window).load(function(){r.testPreload();r.config()})})}})(jQuery)
\ No newline at end of file

Propchange: incubator/eagle/site/js/responsiveCarousel.min.js
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/eagle/site/js/svg.js
URL: http://svn.apache.org/viewvc/incubator/eagle/site/js/svg.js?rev=1715179&view=auto
==============================================================================
--- incubator/eagle/site/js/svg.js (added)
+++ incubator/eagle/site/js/svg.js Thu Nov 19 13:47:10 2015
@@ -0,0 +1,24 @@
+!function(a){function b(b,d){function e(){if(w){$canvas=a('<canvas class="pg-canvas"></canvas>'),v.prepend($canvas),p=$canvas[0],q=p.getContext("2d"),f();for(var b=Math.round(p.width*p.height/d.density),c=0;b>c;c++){var e=new l;e.setStackPos(c),x.push(e)}a(window).on("resize",function(){h()}),a(document).on("mousemove",function(a){y=a.pageX,z=a.pageY}),B&&!A&&window.addEventListener("deviceorientation",function(){D=Math.min(Math.max(-event.beta,-30),30),C=Math.min(Math.max(-event.gamma,-30),30)},!0),g(),o("onInit")}}function f(){p.width=v.width(),p.height=v.height(),q.fillStyle=d.dotColor,q.strokeStyle=d.lineColor,q.lineWidth=d.lineWidth}function g(){if(w){s=a(window).width(),t=a(window).height(),q.clearRect(0,0,p.width,p.height);for(var b=0;b<x.length;b++)x[b].updatePosition();for(var b=0;b<x.length;b++)x[b].draw();E||(r=requestAnimationFrame(g))}}function h(){for(f(),i=x.length-1;i>=0;i--)(x[i].position.x>v.width()||x[i].position.y>v.height())&&x.splice(i,1);var a=Math.round(p.wid
 th*p.height/d.density);if(a>x.length)for(;a>x.length;){var b=new l;x.push(b)}else a<x.length&&x.splice(a);for(i=x.length-1;i>=0;i--)x[i].setStackPos(i)}function j(){E=!0}function k(){E=!1,g()}function l(){switch(this.stackPos,this.active=!0,this.layer=Math.ceil(3*Math.random()),this.parallaxOffsetX=0,this.parallaxOffsetY=0,this.position={x:Math.ceil(Math.random()*p.width),y:Math.ceil(Math.random()*p.height)},this.speed={},d.directionX){case"left":this.speed.x=+(-d.maxSpeedX+Math.random()*d.maxSpeedX-d.minSpeedX).toFixed(2);break;case"right":this.speed.x=+(Math.random()*d.maxSpeedX+d.minSpeedX).toFixed(2);break;default:this.speed.x=+(-d.maxSpeedX/2+Math.random()*d.maxSpeedX).toFixed(2),this.speed.x+=this.speed.x>0?d.minSpeedX:-d.minSpeedX}switch(d.directionY){case"up":this.speed.y=+(-d.maxSpeedY+Math.random()*d.maxSpeedY-d.minSpeedY).toFixed(2);break;case"down":this.speed.y=+(Math.random()*d.maxSpeedY+d.minSpeedY).toFixed(2);break;default:this.speed.y=+(-d.maxSpeedY/2+Math.random()*d
 .maxSpeedY).toFixed(2),this.speed.x+=this.speed.y>0?d.minSpeedY:-d.minSpeedY}}function m(a,b){return b?void(d[a]=b):d[a]}function n(){v.find(".pg-canvas").remove(),o("onDestroy"),v.removeData("plugin_"+c)}function o(a){void 0!==d[a]&&d[a].call(u)}var p,q,r,s,t,u=b,v=a(b),w=!!document.createElement("canvas").getContext,x=[],y=0,z=0,A=!navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry|BB10|mobi|tablet|opera mini|nexus 7)/i),B=!!window.DeviceOrientationEvent,C=0,D=0,E=!1;return d=a.extend({},a.fn[c].defaults,d),l.prototype.draw=function(){q.beginPath(),q.arc(this.position.x+this.parallaxOffsetX,this.position.y+this.parallaxOffsetY,d.particleRadius/2,0,2*Math.PI,!0),q.closePath(),q.fill(),q.beginPath();for(var a=x.length-1;a>this.stackPos;a--){var b=x[a],c=this.position.x-b.position.x,e=this.position.y-b.position.y,f=Math.sqrt(c*c+e*e).toFixed(2);f<d.proximity&&(q.moveTo(this.position.x+this.parallaxOffsetX,this.position.y+this.parallaxOffsetY),d.curvedLines?q.quadraticCur
 veTo(Math.max(b.position.x,b.position.x),Math.min(b.position.y,b.position.y),b.position.x+b.parallaxOffsetX,b.position.y+b.parallaxOffsetY):q.lineTo(b.position.x+b.parallaxOffsetX,b.position.y+b.parallaxOffsetY))}q.stroke(),q.closePath()},l.prototype.updatePosition=function(){if(d.parallax){if(B&&!A){var a=(s-0)/60;pointerX=(C- -30)*a+0;var b=(t-0)/60;pointerY=(D- -30)*b+0}else pointerX=y,pointerY=z;this.parallaxTargX=(pointerX-s/2)/(d.parallaxMultiplier*this.layer),this.parallaxOffsetX+=(this.parallaxTargX-this.parallaxOffsetX)/10,this.parallaxTargY=(pointerY-t/2)/(d.parallaxMultiplier*this.layer),this.parallaxOffsetY+=(this.parallaxTargY-this.parallaxOffsetY)/10}switch(d.directionX){case"left":this.position.x+this.speed.x+this.parallaxOffsetX<0&&(this.position.x=v.width()-this.parallaxOffsetX);break;case"right":this.position.x+this.speed.x+this.parallaxOffsetX>v.width()&&(this.position.x=0-this.parallaxOffsetX);break;default:(this.position.x+this.speed.x+this.parallaxOffsetX>v.wid
 th()||this.position.x+this.speed.x+this.parallaxOffsetX<0)&&(this.speed.x=-this.speed.x)}switch(d.directionY){case"up":this.position.y+this.speed.y+this.parallaxOffsetY<0&&(this.position.y=v.height()-this.parallaxOffsetY);break;case"down":this.position.y+this.speed.y+this.parallaxOffsetY>v.height()&&(this.position.y=0-this.parallaxOffsetY);break;default:(this.position.y+this.speed.y+this.parallaxOffsetY>v.height()||this.position.y+this.speed.y+this.parallaxOffsetY<0)&&(this.speed.y=-this.speed.y)}this.position.x+=this.speed.x,this.position.y+=this.speed.y},l.prototype.setStackPos=function(a){this.stackPos=a},e(),{option:m,destroy:n,start:k,pause:j}}var c="particleground";a.fn[c]=function(d){if("string"==typeof arguments[0]){var e,f=arguments[0],g=Array.prototype.slice.call(arguments,1);return this.each(function(){a.data(this,"plugin_"+c)&&"function"==typeof a.data(this,"plugin_"+c)[f]&&(e=a.data(this,"plugin_"+c)[f].apply(this,g))}),void 0!==e?e:this}return"object"!=typeof d&&d?void
  0:this.each(function(){a.data(this,"plugin_"+c)||a.data(this,"plugin_"+c,new b(this,d))})},a.fn[c].defaults={minSpeedX:.1,maxSpeedX:.7,minSpeedY:.1,maxSpeedY:.7,directionX:"center",directionY:"center",density:1e4,dotColor:"#666666",lineColor:"#666666",particleRadius:7,lineWidth:1,curvedLines:!1,proximity:100,parallax:!0,parallaxMultiplier:5,onInit:function(){},onDestroy:function(){}}}(jQuery),
+
+function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c<b.length&&!window.requestAnimationFrame;++c)window.requestAnimationFrame=window[b[c]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[b[c]+"CancelAnimationFrame"]||window[b[c]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(b){var c=(new Date).getTime(),d=Math.max(0,16-(c-a)),e=window.setTimeout(function(){b(c+d)},d);return a=c+d,e}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(a){clearTimeout(a)})}();
+
+$(function(){
+            
+    $('.particles').particleground({
+        minSpeedX: 0.1,
+        maxSpeedX: 0.7,
+        minSpeedY: 0.1,
+        maxSpeedY: 0.7,
+        directionX: 'center', // 'center', 'left' or 'right'. 'center' = dots bounce off edges
+        directionY: 'center', // 'center', 'up' or 'down'. 'center' = dots bounce off edges
+        density: 10000, // How many particles will be generated: one particle every n pixels
+        dotColor: '#eee',
+        lineColor: '#eee',
+        particleRadius: 7, // Dot size
+        lineWidth: 1,
+        curvedLines: true,
+        proximity: 100, // How close two dots need to be before they join
+        parallax: false
+    });
+
+});
\ No newline at end of file

Propchange: incubator/eagle/site/js/svg.js
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/eagle/site/post/2015/10/27/apache-eagle-announce-cn.html
URL: http://svn.apache.org/viewvc/incubator/eagle/site/post/2015/10/27/apache-eagle-announce-cn.html?rev=1715179&view=auto
==============================================================================
--- incubator/eagle/site/post/2015/10/27/apache-eagle-announce-cn.html (added)
+++ incubator/eagle/site/post/2015/10/27/apache-eagle-announce-cn.html Thu Nov 19 13:47:10 2015
@@ -0,0 +1,338 @@
+<!DOCTYPE html>
+<html>
+
+  <head>
+  	<meta charset="utf-8">
+  	<meta http-equiv="X-UA-Compatible" content="IE=edge">
+
+ 	<title>Eagle - Apache Eagle 正式发布:分布式实时Hadoop数据安全方案</title>
+ 	<meta name="description" content="  摘要:日前,eBay公司隆重宣布正式向开源业界推出实时分布式Hadoop数据安全方案 - Apache Eagle,作为一套旨在提供高效分布式的流式策略引擎,并集成机器学习对用户行为建立Profile以实时智能地保护Hadoop生态系统中大数据安全的解决方案。">
+
+	<meta name="keywords" content="Eagle, Hadoop, Security, Real Time">
+	<meta name="author" content="eBay Inc.">
+
+	<meta charset="utf-8">
+	<meta name="viewport" content="initial-scale=1">
+
+	<link rel="stylesheet" href="/css/animate.css">
+	<link rel="stylesheet" href="/css/bootstrap.min.css">
+
+	<link rel="stylesheet" href="/css/font-awesome.min.css">
+	
+	<link rel="stylesheet" href="/css/misc.css">
+	<link rel="stylesheet" href="/css/style.css">
+	<link rel="stylesheet" href="/css/styles.css">
+  	<link rel="stylesheet" href="/css/main.css">
+  	<link rel="alternate" type="application/rss+xml" title="Eagle" href="http://goeagle.io/feed.xml" />
+  	<link rel="shortcut icon" href="/images/favicon.png">
+
+  	<!-- Baidu Analytics Tracking-->
+	<script>
+	var _hmt = _hmt || [];
+	(function() {
+	  var hm = document.createElement("script");
+	  hm.src = "//hm.baidu.com/hm.js?fedc55df2ea52777a679192e8f849ece";
+	  var s = document.getElementsByTagName("script")[0]; 
+	  s.parentNode.insertBefore(hm, s);
+	})();
+	</script>
+	
+	<!-- Google Analytics Tracking -->
+	<script>
+	  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+	  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+	  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+	  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+	  ga('create', 'UA-68929805-1', 'auto');
+	  ga('send', 'pageview');
+	</script>
+</head>
+  <body>
+    <div class="topbar">
+    <div class="container">
+      <div class="row" >
+        <nav class="navbar navbar-default">
+          <div class="container-fluid"> 
+            <!-- Brand and toggle get grouped for better mobile display -->
+            <div class="navbar-header">
+              <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
+              <a class="navbar-brand" href="/"><img src="/images/logo2.png" height="44px" style="margin-top:-7px"></a> </div>
+            
+            <!-- Collect the nav links, forms, and other content for toggling -->
+            <!-- <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
+              <ul class="nav navbar-nav navbar-right" id="top-menu">
+                <li><a class="menu" href="/#home_page">HOME</a></li>
+                <li><a class="menu" href="/docs/">DOCS</a></li>
+                <li><a class="menu" href="/#about_page">ABOUT</a></li>
+                <li><a class="menu" href="/#diagram_page">ARCHITECTURE</a></li>
+                <li><a class="menu" href="/#modules_page">MODULES</a></li>
+                <li><a class="menu" href="/#usecase_page">USE CASES</a></li>
+                <li>
+                </li>
+              </ul> -->
+            </div>
+          </div>
+          <!-- /.container-fluid --> 
+        </nav>
+      </div>
+    </div>
+  </div>
+    <div class="page-content">
+      <div class="pagewrapper">
+        <div class="post">
+
+  <header class="post-header">
+    <h1 class="post-title">Apache Eagle 正式发布:分布式实时Hadoop数据安全方案</h1>
+    <p class="post-meta">Oct 27, 2015 • Hao Chen, Edward Zhang, Libin Sun, Jilin Jiang, Qingwen Zhao</p>
+  </header>
+  
+  <article class="post-content">
+    <blockquote>
+  <p><em>摘要</em>:日前,eBay公司隆重宣布正式向开源业界推出实时分布式Hadoop数据安全方案 - Apache Eagle,作为一套旨在提供高效分布式的流式策略引擎,并集成机器学习对用户行为建立Profile以实时智能地保护Hadoop生态系统中大数据安全的解决方案。</p>
+</blockquote>
+
+<p>日前,eBay公司隆重宣布正式向开源业界推出分布式实时安全监控方案 - Apache Eagle (http://goeagle.io),该项目已于2015年10月26日正式加入Apache 成为孵化器项目。Apache Eagle提供一套高效分布式的流式策略引擎,具有高实时、可伸缩、易扩展、交互友好等特点,同时集成机器学习对用户行为建立Profile以实现智能实时地保护Hadoop生态系统中大数据的安全。</p>
+
+<h2 id="section">背景</h2>
+<p>随着大数据的发展,越来越多的成功企业或者组织开始采取数据驱动商业的运作模式。在eBay,我们拥有数万名工程师、分析师和数据科学家,他们每天访问分析数PB级的数据,以为我们的用户带来无与伦比的体验。在全球业务中,我们也广泛地利用海量大数据来连接我们数以亿计的用户。</p>
+
+<p>近年来,Hadoop已经逐渐成为大数据分析领域最受欢迎的解决方案,eBay也一直在使用Hadoop技术从数据中挖掘价值,例如,我们通过大数据提高用户的搜索体验,识别和优化精准广告投放,充实我们的产品目录,以及通过点击流分析以理解用户如何使用我们的在线市场平台等。</p>
+
+<p>目前,eBay的Hadoop集群总节点数据超过10000多个,存储容量超过170PB,活跃用户超过2000多。现在相关规模还在不断增长中,同时为了支持多元化需求,我们引入越来越多样的数据存储和分析方案,比如Hive、MapReduec、Spark 和HBase等,随之带来的管理和监控的挑战越来越严峻,数据安全问题亦是其中最重要的之一。</p>
+
+<p>大数据时代,安全问题开始变得空前的关键,特别eBay作为全球领先的电子商务公司,我们必须保证Hadoop中用户数据的绝对安全。通常我们的安全措施根据如下几点 :访问控制、安全隔离、数据分类、数据加密以及实时数据行为监控,然而经过广泛的尝试和研究,我们意识到没有任何已经存在的产品或者解决方案能够充分满足我们面临海量实时数据流和多元化用例场景下数据行ä¸�
 �监控的需求。为了逾越这道鸿沟,eBay决定从头开始构建Eagle。</p>
+
+<p><img src="/images/logo_700x400.png" alt="" /></p>
+
+<blockquote>
+  <p>“Eagle 是开源分布式实时Hadoop数据安全方案,支持数据行为实时监控,能立即监测出对敏感数据的访问或恶意的操作,并立即采取应对的措施”</p>
+</blockquote>
+
+<p>我们相信Eagle将成为Hadoop数据安全领域的核心组件之一,因此我们决定将它的功能分享给整个社区。目前我们已经将Eagle捐赠给Apache软件基金会作为Apache 孵化器项目开源,期望能够同开源社区一同协作开发,使得Eagle不断发展壮大,共同满足开源社区中更广泛的需求。</p>
+
+<p>Eagle的数据行为监控方案可用于如下几类典型场景:</p>
+
+<ul>
+  <li>监控Hadoop中的数据访问流量</li>
+  <li>检测非法入侵和违反安全规则的行为</li>
+  <li>检测并防止敏感数据丢失和访问</li>
+  <li>实现基于策略的实时检测和预警</li>
+  <li>实现基于用户行为模式的异常数据行为检测</li>
+</ul>
+
+<p>Eagle具有如下特点:</p>
+
+<ul>
+  <li><strong>高实时</strong>: 我们充分理解安全监控中高度实时和快速反应的重要性,因此设计Eagle之初,我们竭尽可能地确保能在亚秒级别时间内产生告警,一旦综合多种因素确订为危险操作,立即采取措施阻止非法行为。</li>
+  <li><strong>可伸缩</strong>:在eBay Eagle 被部署在多个大型Hadoop集群上,这些集群拥有数百PB的数据,每天有8亿以上的数据访问时间,因此Eagle必须具有处理海量实时数据的高度可伸缩能力。</li>
+  <li><strong>简单易用</strong>:可用性也是Eagle产品的核心设计原则之一。通过Eagle的Sandbox,使用者仅需数分钟便可以设置好环境并开始尝试。为了使得用户体验尽可能简单,我们内置了许多很好的例子,只需简单地点击几步鼠标,便可以轻松地完成策略地创建和添加。</li>
+  <li><strong>用户Profile</strong>:Eagle 内置提供基于机器学习算法对Hadoop中用户行为习惯建立用户Profile的功能。我们提供多种默认的机器学习算法供你选择用于针对不同HDFS特征集进行建模,通过历史行为模型,Eagle可以实时地检测异常用户行为并产生预警。</li>
+  <li><strong>开源</strong>:Eagle一直根据开源的标准开发,并构建于诸多大数据领域的开源产品之上,因此我们决定以Apache许可证开源Eagle,以回馈社区,同时也期待获得社区的反馈、协作与支持。</li>
+</ul>
+
+<h2 id="eagle">Eagle概览</h2>
+
+<p><img src="/images/posts/eagle-group.png" alt="" /></p>
+
+<h4 id="data-collection-and-storage">数据流接入和存储(Data Collection and Storage)</h4>
+<p>Eagle提供高度可扩展的编程API,可以支持将任何类型的数据源集成到Eagle的策略执行引擎中。例如,在Eagle HDFS 审计事件(Audit)监控模块中,通过Kafka来实时接收来自Namenode Log4j Appender 或者 Logstash Agent 收集的数据;在Eagle Hive 监控模块中,通过YARN API 收集正在运行Job的Hive 查询日志,并保证比较高的可伸缩性和容错性。</p>
+
+<h4 id="data-processing">数据实时处理(Data Processing)</h4>
+
+<p><strong>流处理API(Stream Processing API)Eagle</strong> 提供独立于物理平台而高度抽象的流处理API,目前默认支持Apache Storm,但是也允许扩展到其他任意流处理引擎,比如Flink 或者 Samza等。该层抽象允许开发者在定义监控数据处理逻辑时,无需在物理执行层绑定任何特定流处理平台,而只需通过复用、拼接和组装例如数据转换、过滤、外部数据Join等组件,以实现满足需求的DAG(有向无环图),同时,开发者也可�
 �»¥å¾ˆå®¹æ˜“地以编程地方式将业务逻辑流程和Eagle 策略引擎框架集成起来。Eagle框架内部会将描述业务逻辑的DAG编译成底层流处理架构的原生应用,例如Apache Storm Topology 等,从事实现平台的独立。</p>
+
+<p><strong>以下是一个Eagle如何处理事件和告警的示例:</strong></p>
+
+<pre><code>StormExecutionEnvironment env = ExecutionEnvironmentFactory.getStorm(config); // storm env
+StreamProducer producer = env.newSource(new KafkaSourcedSpoutProvider().getSpout(config)).renameOutputFields(1) // declare kafka source
+       .flatMap(new AuditLogTransformer()) // transform event
+       .groupBy(Arrays.asList(0))  // group by 1st field
+       .flatMap(new UserProfileAggregatorExecutor()); // aggregate one-hour data by user
+       .alertWithConsumer(“userActivity“,”userProfileExecutor“) // ML policy evaluation
+env.execute(); // execute stream processing and alert
+</code></pre>
+
+<p><strong>告警框架(Alerting Framework)Eagle</strong>告警框架由流元数据API、策略引擎服务提供API、策略Partitioner API 以及预警去重框架等组成:</p>
+
+<ul>
+  <li><strong>流元数据API</strong> 允许用户声明事件的Schema,包括事件由哪些属性构成、每个属性的类型,以及当用户配置策略时如何在运行时动态解析属性的值等。</li>
+  <li><strong>策略引擎服务提供API</strong> 允许开发者很容易地以插件的形式扩展新的策略引擎。WSO2 Siddhi CEP 引擎是Eagle 优先默认支持的策略引擎,同时机器学习算法也可作为另一种策略引擎执行。</li>
+  <li>
+    <p><strong>扩展性</strong> Eagle的策略引擎服务提供API允许你插入新的策略引擎</p>
+
+    <pre><code>  public interface PolicyEvaluatorServiceProvider {
+    public String getPolicyType();         // literal string to identify one type of policy
+    public Class&lt;? extends PolicyEvaluator&gt; getPolicyEvaluator(); // get policy evaluator implementation
+    public List&lt;Module&gt; getBindingModules();  // policy text with json format to object mapping
+  }
+  public interface PolicyEvaluator {
+    public void evaluate(ValuesArray input) throws Exception;  // evaluate input event
+    public void onPolicyUpdate(AlertDefinitionAPIEntity newAlertDef); // invoked when policy is updated
+    public void onPolicyDelete(); // invoked when policy is deleted
+  }
+</code></pre>
+  </li>
+  <li><strong>策略Partitioner API</strong> 允许策略在不同的物理节点上并行执行。也允许你自定义策略Partitioner类。这些功能使得策略和事件完全以分布式的方式执行。</li>
+  <li>
+    <p><strong>可伸缩性</strong> Eagle 通过支持策略的分区接口来实现大量的策略可伸缩并发地运行</p>
+
+    <pre><code>  public interface PolicyPartitioner extends Serializable {
+    int partition(int numTotalPartitions, String policyType, String policyId); // method to distribute policies
+  }
+</code></pre>
+
+    <p><img src="/images/posts/policy-partition.png" alt="" /></p>
+
+    <blockquote>
+      <p>可伸缩的Eagle策略执行框架</p>
+    </blockquote>
+  </li>
+</ul>
+
+<p><strong>机器学习模块:</strong>
+Eagle 支持根据用户在Hadoop平台上历史使用行为习惯来定义行为模式或用户Profile的能力。拥有了这个功能,不需要在系统中预先设置固定临界值的情况下,也可以实现智能地检测出异常的行为。Eagle中用户Profile是通过机器学习算法生成,用于在用户当前实时行为模式与其对应的历史模型模式存在一定程度的差异时识别用户行为是否为异常。目前,Eagle 内置提供以下两种算法来检测异常,分别
 为特征值分解(Eigen-Value Decomposition)和 密度估计(Density Estimation)。这些算法从HDFS 审计日志中读取数据,对数据进行分割、审查、交叉分析,周期性地为每个用户依次创建Profile 行为模型。一旦模型生成,Eagle的实时流策略引擎能够近乎实时地识别出异常,分辨当前用户的行为可疑的或者与他们的历史行为模型不相符。</p>
+
+<p>下图简单描述了目前Eagle中用户Profile的离线训练建模和在线实时监测的数据流:</p>
+
+<p><img src="/images/posts/ml-pipeline.png" alt="" /></p>
+
+<blockquote>
+  <p>用户Profile 离线训练以及异常监测架构</p>
+</blockquote>
+
+<p>基于用户 Profile的Eagle在线实时异常监测是根据Eagle的通用策略框架实现的,用户Profile只是被定义为Eagle系统中一个策略而已,用户Profile的策略是通过继承自Eagle统一策略执行接口的机器学习Evaluator来执行,其策略的定义中包括异常检测过程中需要的特征向量等(在线检测与离线训练保持一致)。</p>
+
+<p>此外,Eagle 提供自动训练调度器,可根据文件或者UI配置的时间周期和粒度来调度这个基于Spark的离线训练程序,用于批量创建用户Profile和行为模型,默认该训练系统以每月的频率更新模型,模型粒度为一分钟。</p>
+
+<p>Eagle 内置的机器学习算法基本思想如下:</p>
+
+<p><strong>核密度估计算法 (Density Estimation)</strong>
+该算法的基本思想是根据检测的训练样本数据针对每个用户计算出对应的概率密度分布函数。首先,我们对训练数据集的每个特征均值标准化,标准化可以使得所有数据集转化为相同尺度。然后,在我们的随机变量概率分布估计中,我们采用高斯分布式函数来计算概率密度。假设任意特征彼此相互独立,那么最终的高斯概率密度就可以通过分解各个特征的概率密度而计算得到�
 �€‚在线实时检测阶段,我们可以首先计算出每个用户实时行为的概率。如果用户出现当前行为的可能性低于某个临界值,我们表识为异常警告,而这个临界值完全由离线训练程序通过称为“马修斯相关系数”(Mathews Correlation Coefficient)的方法计算而得。</p>
+
+<p><img src="/images/posts/density-estimation.png" alt="" /></p>
+
+<blockquote>
+  <p>展示单一维度上用户行为直方图</p>
+</blockquote>
+
+<p><strong>特征值分解算法(Eigen-Value Decomposition)</strong>
+该算法中,我们认为生成用户Profile的主要目的是为了从中发现有价值的用户行为模式。为了实现这个目的,我们可以考虑对特征依次进行组合,然后观察他们相互之间是如何影响的。当数据集非常巨大时,正如通常我们所遇到的场景,由于正常模式的数量非常之多,以至于特征集的异常的模式很容易被忽视。由于正常的行为模式通常处于非常低维的子空间内,因此我们也许可以
 通过降低数据集的维度来更好的理解用户的真正的行为模式。该方法同样可以对于训练数据集进行降噪。根据对大量用户特征数据方差的进行运算,通常在我们的用例场景中选取方差为95%作为基准,我们可以得到方差为95%的主成分的数量为k,因此我们将前k个主成分认为是用户的正常子空间,而剩下的(n-k)个主成分则被视为异常子空间。</p>
+
+<p>当线实时异常检测时,如果用户行为模式位于正常子空间附近,则认为该行为正常,否则,如果用户行为模式位于异常子空间附近,则会立即报警,因为我们相信通常用户行为一般应该位于正常子空间内。至于如何计算用户当前行为接近正常还是异常子空间,我们采用的是欧氏距离法(Euclidian distance method)。</p>
+
+<p><img src="/images/posts/eigen-decomposition.png" alt="" /></p>
+
+<blockquote>
+  <p>展示重要的用户行为模式成分</p>
+</blockquote>
+
+<p><strong>Eagle 服务</strong></p>
+
+<p><strong>策略管理器</strong> Eagle策略管理器提供交互友好的用户界面和REST API 供用户轻松地定义和管理策略,一切只需几次鼠标点击而已。Eagle的用户界面使得策略的管理、敏感元数据的标识和导入、HDFS或Hive 的资源浏览以及预警仪表等功能都非常易于使用。</p>
+
+<p>Eagle 策略引擎默认支持WSO2的Siddhi CEP引擎和机器学习引擎,以下是几个基于Siddi CEP的策略示例</p>
+
+<ul>
+  <li>
+    <p>单一事件执行策略(用户访问Hive中的敏感数据列)</p>
+
+    <pre><code>  from hiveAccessLogStream[sensitivityType=='PHONE_NUMBER'] select * insert into outputStream;
+</code></pre>
+  </li>
+  <li>
+    <p>基于窗口的策略(用户在10分钟内访问目录 /tmp/private 多余 5次)</p>
+
+    <pre><code>  hdfsAuditLogEventStream[(src == '/tmp/private')]#window.externalTime(timestamp,10 min) select user, count(timestamp) as aggValue group by user having aggValue &gt;= 5 insert into outputStream;
+</code></pre>
+  </li>
+</ul>
+
+<p><strong>查询服务(Query Service)</strong> Eagle 提供类SQL的REST API用来实现针对海量数据集的综合计算、查询和分析的能力,支持例如过滤、聚合、直方运算、排序、top、算术表达式以及分页等。Eagle优先支持HBase 作为其默认数据存储,但是同时也支持基JDBC的关系型数据库。特别是当选择以HBase作为存储时,Eagle便原生拥有了HBase存储和查询海量监控数据的能力,Eagle 查询框架会将用户提供的类SQL查询语法最终编译æˆ
 ä¸ºHBase 原生的Filter 对象,并支持通过HBase Coprocessor进一步提升响应速度。</p>
+
+<pre><code>query=AlertDefinitionService[@dataSource="hiveQueryLog"]{@policyDef}&amp;pageSize=100000
+</code></pre>
+
+<h2 id="eagleebay">Eagle在eBay的使用场景</h2>
+<p>目前,Eagle的数据行为监控系统已经部署到一个拥有2500多个节点的Hadoop集群之上,用以保护数百PB数据的安全,并正计划于今年年底之前扩展到其他上十个Hadoop集群上,从而覆盖eBay 所有主要Hadoop的10000多台节点。在我们的生产环境中,我们已针对HDFS、Hive 等集群中的数据配置了一些基础的安全策略,并将于年底之前不断引入更多的策略,以确保重要数据的绝对安全。目前,Eagle的策略涵盖多种æ¨�
 �式,包括从访问模式、频繁访问数据集,预定义查询类型、Hive 表和列、HBase 表以及基于机器学习模型生成的用户Profile相关的所有策略等。同时,我们也有广泛的策略来防止数据的丢失、数据被拷贝到不安全地点、敏感数据被未授权区域访问等。Eagle策略定义上极大的灵活性和扩展性使得我们未来可以轻易地继续扩展更多更复杂的策略以支持更多多元化的用例场景。</p>
+
+<h2 id="section-1">后续计划</h2>
+<p>过去两年中,在eBay 除了被用于数据行为监控以外,Eagle 核心框架还被广泛用于监控节点健康状况、Hadoop应用性能指标、Hadoop 核心服务以及整个Hadoop集群的健康状况等诸多领域。我们还建立一系列的自动化机制,例如节点修复等,帮助我们平台部门极大得节省了我们人工劳力,并有效地提升了整个集群资源地利用率。</p>
+
+<p>以下是我们目前正在开发中地一些特性:</p>
+
+<ul>
+  <li>扩展机器学习模型对Hive和HBase支持</li>
+  <li>提供高度可扩展的API,以方便集目前业界广泛使用的其他监控预警平台或者工具,如Ganglia和Nagios等,同时支持敏感数据的导入,如与Dataguise 集成等。</li>
+  <li>此外,我们正在积极整理其他Hadoop 集群监控模块,期望在后续发布中开源给社区,例如
+    <ul>
+      <li>HBase 监控</li>
+      <li>Hadoop 作业性能监控</li>
+      <li>Hadoop 节点监控</li>
+    </ul>
+  </li>
+</ul>
+
+<h2 id="section-2">关于作者</h2>
+<p><a href="https://github.com/haoch">陈浩</a>,Apache Eagle Committer 和 PMC 成员,eBay 分析平台基础架构部门高级软件工程师,负责Eagle的产品设计、技术架构、核心实现以及开源社区推广等。</p>
+
+<p>感谢以下来自Apache Eagle社区和eBay公司的联合作者们对本文的贡献:</p>
+
+<ul>
+  <li><a href="https://github.com/yonzhang">张勇</a>,Apache Eagle Committer和PMC,eBay 资深架构师</li>
+  <li><a href="https://github.com/sunlibin">孙立斌</a>,Apache Eagle Committer和PMC,eBay 软件工程师</li>
+  <li><a href="https://github.com/zombiej">蒋吉麟</a>,Apache Eagle Committer和PMC,eBay 软件工程师</li>
+  <li><a href="https://github.com/qingwen220">赵晴雯</a>,Apache Eagle Committer和PMC,eBay 软件工程师</li>
+</ul>
+
+<p>eBay 分析平台基础架构部(Analytics Data Infrastructure)是eBay的全球数据及分析基础架构部门,负责eBay在数据库、数据仓库、Hadoop、商务智能以及机器学习等各个数据平台开发、管理等,支持eBay全球各部门运用高端的数据分析解决方案作出及时有效的作业决策,为遍布全球的业务用户提供数据分析解决方案。</p>
+
+<h2 id="section-3">参考资料</h2>
+
+<ul>
+  <li>Apache Eagle 文档:<a href="http://goeagle.io">http://goeagle.io</a></li>
+  <li>Apache Eagle 源码:<a href="http://github.com/ebay/eagle">http://github.com/ebay/eagle</a></li>
+  <li>Apache Eagle 项目:<a href="http://incubator.apache.org/projects/eagle.html">http://incubator.apache.org/projects/eagle.html</a></li>
+</ul>
+
+<h2 id="section-4">引用链接</h2>
+<ul>
+  <li><strong>CSDN</strong>: <a href="http://www.csdn.net/article/2015-10-29/2826076">http://www.csdn.net/article/2015-10-29/2826076</a></li>
+  <li><strong>OSCHINA</strong>: <a href="http://www.oschina.net/news/67515/apache-eagle">http://www.oschina.net/news/67515/apache-eagle</a></li>
+  <li><strong>China Hadoop Summit</strong>: <a href="http://mp.weixin.qq.com/s?__biz=MzA4MTkyODIzMA==&amp;mid=400298495&amp;idx=1&amp;sn=954031ba8065481c31a3464e2c8a26a5&amp;scene=1&amp;srcid=1102zgGQzedckCmNrfRwounA&amp;uin=MjYyNzgwNDQwMA%3D%3D&amp;key=04dce534b3b035efe14d53fcf6e7062a63179003551e59fad5cf8584703fcaa38779cc4c93cbf931c25f6b34cb2d7653&amp;devicetype=iMac+MacBookPro11%2C3+OSX+OSX+10.10.5+build(14F1021)&amp;version=11020201&amp;lang=en&amp;pass_ticket=TC%2Bod2ZeFnhmci%2Bi4%2BxTTVD6moUrNFX8RXppzoQSa%2BXO3C7evUDs6njeYbsYyCFD">http://mp.weixin.qq.com/s?…</a></li>
+  <li><strong>Apache Kylin</strong>: <a href="http://mp.weixin.qq.com/s?__biz=MzAwODE3ODU5MA==&amp;mid=400287781&amp;idx=1&amp;sn=343b2b29a37f8ed53a7ecb0465faf515&amp;scene=0&amp;uin=MjYyNzgwNDQwMA%3D%3D&amp;key=04dce534b3b035ef73f964362ac4c43d452ab1b208eb357c488dfcd7d69209e060cfe01e9b146752517d2096f6751370&amp;devicetype=iMac+MacBookPro11%2C3+OSX+OSX+10.10.5+build(14F1021)&amp;version=11020201&amp;lang=en&amp;pass_ticket=TC%2Bod2ZeFnhmci%2Bi4%2BxTTVD6moUrNFX8RXppzoQSa%2BXO3C7evUDs6njeYbsYyCFD">http://mp.weixin.qq.com/s?…</a></li>
+</ul>
+
+<hr />
+
+<p><em>本文来自Apache Eagle网站:<a href="http://goeagle.io">http://goeagle.io</a>,转载请注明出处和来源。</em></p>
+
+  </article>
+</div>
+
+      </div>
+    </div>
+    <!-- footer start -->
+<div class="footerwrapper">
+  <div class="container">
+    <div class="row">
+      <div class="col-md-12"><div style="margin-left:auto; margin-right:auto; text-align:center">Copyright &copy; 2015 <a href="#">eBay</a> | 2065 Hamilton Ave, San Jose, CA </div></div>
+    </div>
+  </div>
+</div>
+<!-- footer end --> 
+
+<!-- JavaScripts -->
+<script src="/js/jquery-1.11.1.min.js"></script>
+<script src="/js/jquery.singlePageNav.js"></script>
+<script src="/js/jquery.flexslider.js"></script>
+<script src="/js/modernizr.min.js"></script>
+<script src="/js/svg.js"></script>
+<script>
+    /************** FlexSlider *********************/
+    $('.flexslider').flexslider({
+        animation: "fade",
+        directionNav: false
+    });
+</script>
+  </body>
+</html>
\ No newline at end of file