You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eagle.apache.org by mw...@apache.org on 2016/07/25 09:36:38 UTC

[01/47] incubator-eagle git commit: EAGLE-271 Topology management in remote/local mode including start/stop operations

Repository: incubator-eagle
Updated Branches:
  refs/heads/master 982a6b743 -> 9d9c30cc8


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-webservice/src/main/webapp/app/public/feature/topology/controller.js
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/app/public/feature/topology/controller.js b/eagle-webservice/src/main/webapp/app/public/feature/topology/controller.js
new file mode 100644
index 0000000..776edf7
--- /dev/null
+++ b/eagle-webservice/src/main/webapp/app/public/feature/topology/controller.js
@@ -0,0 +1,255 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+(function() {
+	'use strict';
+
+	var featureControllers = angular.module('featureControllers');
+	var feature = featureControllers.register("topology");
+
+	// ==============================================================
+	// =                       Initialization                       =
+	// ==============================================================
+
+	// ==============================================================
+	// =                          Function                          =
+	// ==============================================================
+	//feature.service("DashboardFormatter", function() {
+	//});
+
+	// ==============================================================
+	// =                         Controller                         =
+	// ==============================================================
+	feature.configNavItem("monitoring", "Topology", "usb");
+
+	// ========================= Monitoring =========================
+	feature.configController('monitoring', function(PageConfig, $scope, $interval, Entities, UI, Site, Application) {
+		var topologyRefreshInterval;
+
+		PageConfig.hideApplication = true;
+		PageConfig.hideSite = true;
+		PageConfig.pageTitle = "Topology Execution";
+
+		$scope.topologyExecutionList = null;
+
+		$scope.currentTopologyExecution = null;
+		$scope.currentTopologyExecutionOptList = [];
+
+		// ======================= Function =======================
+		function refreshExecutionList() {
+			var _list = Entities.queryEntities("TopologyExecutionService");
+			_list._promise.then(function () {
+				$scope.topologyExecutionList = _list;
+			});
+		}
+
+		$scope.showTopologyDetail = function (topologyExecution) {
+			$scope.currentTopologyExecution = topologyExecution;
+			$("#topologyMDL").modal();
+
+			$scope.currentTopologyExecutionOptList = Entities.queryEntities("TopologyOperationService", {
+				site: topologyExecution.tags.site,
+				application: topologyExecution.tags.application,
+				topology: topologyExecution.tags.topology,
+				_pageSize: 10,
+				_duration: 1000 * 60 * 60 * 24 * 30
+			});
+		};
+
+		$scope.getStatusClass = function (status) {
+			switch (status) {
+				case "NEW":
+					return "info";
+				case "STARTING":
+				case "STOPPING":
+					return "warning";
+				case "STARTED":
+					return "success";
+				case "STOPPED":
+					return "danger";
+				default:
+					return "default";
+			}
+		};
+
+		// ==================== Initialization ====================
+		refreshExecutionList();
+		topologyRefreshInterval = $interval(refreshExecutionList, 10 * 1000);
+
+		$scope.topologyList = Entities.queryEntities("TopologyDescriptionService");
+		$scope.topologyList._promise.then(function () {
+			$scope.topologyList = $.map($scope.topologyList, function (topology) {
+				return topology.tags.topology;
+			});
+		});
+
+		$scope.applicationList = $.map(Application.list, function (application) {
+			return application.tags.application;
+		});
+
+		$scope.siteList = $.map(Site.list, function (site) {
+			return site.tags.site;
+		});
+
+		// ================== Topology Execution ==================
+		$scope.newTopologyExecution = function () {
+			UI.createConfirm("Topology", {}, [
+				{field: "site", type: "select", valueList: $scope.siteList},
+				{field: "application", type: "select", valueList: $scope.applicationList},
+				{field: "topology", type: "select", valueList: $scope.topologyList}
+			], function (entity) {
+				for(var i = 0 ; i < $scope.topologyExecutionList.length; i += 1) {
+					var _entity = $scope.topologyExecutionList[i].tags;
+					if(_entity.site === entity.site && _entity.application === entity.application && _entity.topology === entity.topology) {
+						return "Topology already exist!";
+					}
+				}
+			}).then(null, null, function(holder) {
+				var _entity = {
+					tags: {
+						site: holder.entity.site,
+						application: holder.entity.application,
+						topology: holder.entity.topology
+					},
+					status: "NEW"
+				};
+				Entities.updateEntity("TopologyExecutionService", _entity)._promise.then(function() {
+					holder.closeFunc();
+					$scope.topologyExecutionList.push(_entity);
+					refreshExecutionList();
+				});
+			});
+		};
+
+		$scope.deleteTopologyExecution = function (topologyExecution) {
+			UI.deleteConfirm(topologyExecution.tags.topology).then(null, null, function(holder) {
+				Entities.deleteEntities("TopologyExecutionService", topologyExecution.tags)._promise.then(function() {
+					holder.closeFunc();
+					common.array.remove(topologyExecution, $scope.topologyExecutionList);
+				});
+			});
+		};
+
+		// ================== Topology Operation ==================
+		$scope.doTopologyOperation = function (topologyExecution, operation) {
+			$.dialog({
+				title: operation + " Confirm",
+				content: "Do you want to " + operation + " '" + topologyExecution.tags.topology + "'?",
+				confirm: true
+			}, function (ret) {
+				if(!ret) return;
+
+				var list = Entities.queryEntities("TopologyOperationService", {
+					site: topologyExecution.tags.site,
+					application: topologyExecution.tags.application,
+					topology: topologyExecution.tags.topology,
+					_pageSize: 20
+				});
+
+				list._promise.then(function () {
+					var lastOperation = common.array.find(operation, list, "tags.operation");
+					if(lastOperation && (lastOperation.status === "INITIALIZED" || lastOperation.status === "PENDING")) {
+						refreshExecutionList();
+						return;
+					}
+
+					Entities.updateEntity("rest/app/operation", {
+						tags: {
+							site: topologyExecution.tags.site,
+							application: topologyExecution.tags.application,
+							topology: topologyExecution.tags.topology,
+							operation: operation
+						},
+						status: "INITIALIZED"
+					}, {timestamp: false, hook: true});
+				});
+			});
+		};
+
+		$scope.startTopologyOperation = function (topologyExecution) {
+			$scope.doTopologyOperation(topologyExecution, "START");
+		};
+		$scope.stopTopologyOperation = function (topologyExecution) {
+			$scope.doTopologyOperation(topologyExecution, "STOP");
+		};
+
+		// ======================= Clean Up =======================
+		$scope.$on('$destroy', function() {
+			$interval.cancel(topologyRefreshInterval);
+		});
+	});
+
+	// ========================= Management =========================
+	feature.configController('management', function(PageConfig, $scope, Entities, UI) {
+		PageConfig.hideApplication = true;
+		PageConfig.hideSite = true;
+		PageConfig.pageTitle = "Topology";
+
+		var typeList = ["CLASS", "DYNAMIC"];
+		var topologyDefineAttrs = [
+			{field: "topology", name: "name"},
+			{field: "type", type: "select", valueList: typeList},
+			{field: "exeClass", name: "execution entry", description: function (entity) {
+				if(entity.type === "CLASS") return "Class implements interface TopologyExecutable";
+				if(entity.type === "DYNAMIC") return "DSL based topology definition";
+			}, type: "blob", rows: 5},
+			{field: "version", optional: true},
+			{field: "description", optional: true, type: "blob"}
+		];
+		var topologyUpdateAttrs = $.extend(topologyDefineAttrs.concat(), [{field: "topology", name: "name", readonly: true}]);
+
+		$scope.topologyList = Entities.queryEntities("TopologyDescriptionService");
+
+		$scope.newTopology = function () {
+			UI.createConfirm("Topology", {}, topologyDefineAttrs, function (entity) {
+				if(common.array.find(entity.topology, $scope.topologyList, "tags.topology", false, false)) {
+					return "Topology name conflict!";
+				}
+			}).then(null, null, function(holder) {
+				holder.entity.tags = {
+					topology: holder.entity.topology
+				};
+				Entities.updateEntity("TopologyDescriptionService", holder.entity, {timestamp: false})._promise.then(function() {
+					holder.closeFunc();
+					$scope.topologyList.push(holder.entity);
+				});
+			});
+		};
+
+		$scope.updateTopology = function (topology) {
+			UI.updateConfirm("Topology", $.extend({}, topology, {topology: topology.tags.topology}), topologyUpdateAttrs).then(null, null, function(holder) {
+				holder.entity.tags = {
+					topology: holder.entity.topology
+				};
+				Entities.updateEntity("TopologyDescriptionService", holder.entity, {timestamp: false})._promise.then(function() {
+					holder.closeFunc();
+					$.extend(topology, holder.entity);
+				});
+			});
+		};
+
+		$scope.deleteTopology = function (topology) {
+			UI.deleteConfirm(topology.tags.topology).then(null, null, function(holder) {
+				Entities.deleteEntities("TopologyDescriptionService", {topology: topology.tags.topology})._promise.then(function() {
+					holder.closeFunc();
+					common.array.remove(topology, $scope.topologyList);
+				});
+			});
+		};
+	});
+})();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-webservice/src/main/webapp/app/public/feature/topology/page/management.html
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/app/public/feature/topology/page/management.html b/eagle-webservice/src/main/webapp/app/public/feature/topology/page/management.html
new file mode 100644
index 0000000..9e22c84
--- /dev/null
+++ b/eagle-webservice/src/main/webapp/app/public/feature/topology/page/management.html
@@ -0,0 +1,52 @@
+<div class="box box-primary">
+	<div class="box-header with-border">
+		<i class="fa fa-cog"></i>
+		<a class="pull-right" href="#/config/topology/monitoring"><span class="fa fa-angle-right"></span> Monitoring</a>
+		<h3 class="box-title">
+			Management
+		</h3>
+	</div>
+	<div class="box-body">
+		<table class="table table-bordered">
+			<thead>
+				<tr>
+					<th>Name</th>
+					<th width="20%">Execution Class</th>
+					<th>Type</th>
+					<th width="50%">Description</th>
+					<th>Version</th>
+					<th width="70"></th>
+				</tr>
+			</thead>
+			<tbody>
+				<tr ng-repeat="item in topologyList">
+					<td>{{item.tags.topology}}</td>
+					<td><pre class="noWrap">{{item.exeClass}}</pre></td>
+					<td>{{item.type}}</td>
+					<td>{{item.description}}</td>
+					<td>{{item.version}}</td>
+					<td class="text-center">
+						<button class="rm fa fa-pencil btn btn-default btn-xs" uib-tooltip="Edit" tooltip-animation="false" ng-click="updateTopology(item)"> </button>
+						<button class="rm fa fa-trash-o btn btn-danger btn-xs" uib-tooltip="Delete" tooltip-animation="false" ng-click="deleteTopology(item)"> </button>
+					</td>
+				</tr>
+				<tr ng-if="topologyList.length === 0">
+					<td colspan="6">
+						<span class="text-muted">Empty list</span>
+					</td>
+				</tr>
+			</tbody>
+		</table>
+	</div>
+
+	<div class="box-footer">
+		<button class="btn btn-primary pull-right" ng-click="newTopology()">
+			New Topology
+			<i class="fa fa-plus-circle"> </i>
+		</button>
+	</div>
+
+	<div class="overlay" ng-hide="topologyList._promise.$$state.status === 1;">
+		<i class="fa fa-refresh fa-spin"></i>
+	</div>
+</div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-webservice/src/main/webapp/app/public/feature/topology/page/monitoring.html
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/app/public/feature/topology/page/monitoring.html b/eagle-webservice/src/main/webapp/app/public/feature/topology/page/monitoring.html
new file mode 100644
index 0000000..0acb2c1
--- /dev/null
+++ b/eagle-webservice/src/main/webapp/app/public/feature/topology/page/monitoring.html
@@ -0,0 +1,151 @@
+<div class="box box-primary">
+	<div class="box-header with-border">
+		<i class="fa fa-eye"></i>
+		<a class="pull-right" href="#/config/topology/management"><span class="fa fa-angle-right"></span> Management</a>
+		<h3 class="box-title">
+			Monitoring
+		</h3>
+	</div>
+	<div class="box-body">
+		<div sorttable source="topologyExecutionList">
+			<table class="table table-bordered" ng-non-bindable>
+				<thead>
+				<tr>
+					<th width="70" sortpath="status">Status</th>
+					<th width="90" sortpath="tags.topology">Topology</th>
+					<th width="60" sortpath="tags.site">Site</th>
+					<th width="100" sortpath="tags.application">Application</th>
+					<th width="60" sortpath="mode">Mode</th>
+					<th sortpath="description">Description</th>
+					<th width="70" style="min-width: 70px;"></th>
+				</tr>
+				</thead>
+				<tbody>
+				<tr>
+					<td class="text-center">
+						<span class="label label-{{_parent.getStatusClass(item.status)}}">{{item.status}}</span>
+					</td>
+					<td><a ng-click="_parent.showTopologyDetail(item)">{{item.tags.topology}}</a></td>
+					<td>{{item.tags.site}}</td>
+					<td>{{item.tags.application}}</td>
+					<td>{{item.mode}}</td>
+					<td>{{item.description}}</td>
+					<td class="text-center">
+						<button ng-if="item.status === 'NEW' || item.status === 'STOPPED'" class="fa fa-play sm btn btn-default btn-xs" uib-tooltip="Start" tooltip-animation="false" ng-click="_parent.startTopologyOperation(item)"> </button>
+						<button ng-if="item.status === 'STARTED'" class="fa fa-stop sm btn btn-default btn-xs" uib-tooltip="Stop" tooltip-animation="false" ng-click="_parent.stopTopologyOperation(item)"> </button>
+						<button ng-if="item.status !== 'NEW' && item.status !== 'STARTED' && item.status !== 'STOPPED'" class="fa fa-ban sm btn btn-default btn-xs" disabled="disabled"> </button>
+						<button class="rm fa fa-trash-o btn btn-danger btn-xs" uib-tooltip="Delete" tooltip-animation="false" ng-click="_parent.deleteTopologyExecution(item)"> </button>
+					</td>
+				</tr>
+				</tbody>
+			</table>
+		</div>
+	</div>
+
+	<div class="box-footer">
+		<button class="btn btn-primary pull-right" ng-click="newTopologyExecution()">
+			New Topology Execution
+			<i class="fa fa-plus-circle"> </i>
+		</button>
+	</div>
+
+	<div class="overlay" ng-hide="topologyExecutionList._promise.$$state.status === 1;">
+		<i class="fa fa-refresh fa-spin"></i>
+	</div>
+</div>
+
+
+
+
+<!-- Modal: Topology Detail -->
+<div class="modal fade" id="topologyMDL" tabindex="-1" role="dialog">
+	<div class="modal-dialog modal-lg" role="document">
+		<div class="modal-content">
+			<div class="modal-header">
+				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
+					<span aria-hidden="true">&times;</span>
+				</button>
+				<h4 class="modal-title">Topology Detail</h4>
+			</div>
+			<div class="modal-body">
+				<h3>Detail</h3>
+				<table class="table">
+					<tbody>
+						<tr>
+							<th>Site</th>
+							<td>{{currentTopologyExecution.tags.site}}</td>
+						</tr>
+						<tr>
+							<th>Application</th>
+							<td>{{currentTopologyExecution.tags.application}}</td>
+						</tr>
+						<tr>
+							<th>Topology</th>
+							<td>{{currentTopologyExecution.tags.topology}}</td>
+						</tr>
+						<tr>
+							<th>Full Name</th>
+							<td>{{currentTopologyExecution.fullName || "-"}}</td>
+						</tr>
+						<tr>
+							<th>Status</th>
+							<td>
+								<span class="label label-{{getStatusClass(currentTopologyExecution.status)}}">{{currentTopologyExecution.status}}</span>
+							</td>
+						</tr>
+						<tr>
+							<th>Mode</th>
+							<td>{{currentTopologyExecution.mode || "-"}}</td>
+						</tr>
+						<tr>
+							<th>Environment</th>
+							<td>{{currentTopologyExecution.environment || "-"}}</td>
+						</tr>
+						<tr>
+							<th>Url</th>
+							<td>
+								<a ng-if="currentTopologyExecution.url" href="{{currentTopologyExecution.url}}" target="_blank">{{currentTopologyExecution.url}}</a>
+								<span ng-if="!currentTopologyExecution.url">-</span>
+							</td>
+						</tr>
+						<tr>
+							<th>Description</th>
+							<td>{{currentTopologyExecution.description || "-"}}</td>
+						</tr>
+						<tr>
+							<th>Last Modified Date</th>
+							<td>{{common.format.date(currentTopologyExecution.lastModifiedDate) || "-"}}</td>
+						</tr>
+					</tbody>
+				</table>
+
+				<h3>Latest Operations</h3>
+				<div class="table-responsive">
+					<table class="table table-bordered table-sm margin-bottom-none">
+						<thead>
+							<tr>
+								<th>Date Time</th>
+								<th>Operation</th>
+								<th>Status</th>
+								<th>Message</th>
+							</tr>
+						</thead>
+						<tbody>
+							<tr ng-repeat="action in currentTopologyExecutionOptList track by $index">
+								<td>{{common.format.date(action.lastModifiedDate) || "-"}}</td>
+								<td>{{action.tags.operation}}</td>
+								<td>{{action.status}}</td>
+								<td><pre class="noWrap">{{action.message}}</pre></td>
+							</tr>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="modal-footer">
+				<button type="button" class="btn btn-default" data-dismiss="modal">
+					Close
+				</button>
+			</div>
+		</div>
+	</div>
+</div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-webservice/src/main/webapp/app/public/js/app.config.js
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/app/public/js/app.config.js b/eagle-webservice/src/main/webapp/app/public/js/app.config.js
index 4392f71..bd6d62c 100644
--- a/eagle-webservice/src/main/webapp/app/public/js/app.config.js
+++ b/eagle-webservice/src/main/webapp/app/public/js/app.config.js
@@ -55,10 +55,9 @@
 	// =                                   URLs                                   =
 	// ============================================================================
 	app.getURL = function(name, kvs) {
-		var _host = localStorage.getItem("HOST") || app.config.urls.HOST;
 		var _path = app.config.urls[name];
 		if(!_path) throw "URL:'" + name + "' not exist!";
-		var _url = (_host ? _host + "/" : '') + _path;
+		var _url = app.packageURL(_path);
 		if(kvs !== undefined) {
 			_url = common.template(_url, kvs);
 		}
@@ -69,9 +68,7 @@
 		var _path = app.config.urls[hookType][serviceName];
 		if(!_path) return null;
 
-		var _host = localStorage.getItem("HOST") || app.config.urls.HOST;
-		var _url = (_host ? _host + "/" : '') + _path;
-		return _url;
+		return app.packageURL(_path);
 	}
 
 	/***
@@ -90,6 +87,11 @@
 		return getHookURL('UPDATE_HOOK', serviceName);
 	};
 
+	app.packageURL = function (path) {
+		var _host = localStorage.getItem("HOST") || app.config.urls.HOST;
+		return (_host ? _host + "/" : '') + path;
+	};
+
 	app._Host = function(host) {
 		if(host) {
 			localStorage.setItem("HOST", host);

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-webservice/src/main/webapp/app/public/js/common.js
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/app/public/js/common.js b/eagle-webservice/src/main/webapp/app/public/js/common.js
index 0e238b8..4c5e82f 100644
--- a/eagle-webservice/src/main/webapp/app/public/js/common.js
+++ b/eagle-webservice/src/main/webapp/app/public/js/common.js
@@ -147,6 +147,45 @@ common.format.date = function(val, type) {
 	}
 };
 
+// ===================== Property =====================
+common.properties = {};
+
+common.properties.parse = function (str, defaultValue) {
+	var regex = /\s*([\w\.]+)\s*=\s*(.*?)\s*([\r\n]+|$)/g;
+	var match, props = {};
+	var hasValue = false;
+	while((match = regex.exec(str)) !== null) {
+		props[match[1]] = match[2];
+		hasValue = true;
+	}
+	props = hasValue ? props : defaultValue;
+	props.getValueByPath = function (path) {
+		if(props[path] !== undefined) return props[path];
+		var subProps = {};
+		var prefixPath = path + ".";
+		$.each(props, function (key, value) {
+			if(typeof value === "string" && key.indexOf(prefixPath) === 0) {
+				subProps[key.replace(prefixPath, "")] = value;
+			}
+		});
+		return subProps;
+	};
+
+	return props;
+};
+
+common.properties.check = function (str) {
+	var pass = true;
+	var regex = /^\s*[\w\.]+\s*=(.*)$/;
+	$.each((str || "").trim().split(/[\r\n\s]+/g), function (i, line) {
+		if(!regex.test(line)) {
+			pass = false;
+			return false;
+		}
+	});
+	return pass;
+};
+
 // ====================== Array =======================
 common.array = {};
 
@@ -198,10 +237,16 @@ common.array.top = function(list, path, count) {
 	return !count ? _list : _list.slice(0, count);
 };
 
-common.array.find = function(val, list, path, findAll) {
+common.array.find = function(val, list, path, findAll, caseSensitive) {
 	path = path || "";
+	val = caseSensitive === false ? (val || "").toUpperCase() : val;
+
 	var _list = $.grep(list, function(unit) {
-		return val === common.getValueByPath(unit, path);
+		if(caseSensitive === false) {
+			return val === (common.getValueByPath(unit, path) || "").toUpperCase();
+		} else {
+			return val === common.getValueByPath(unit, path);
+		}
 	});
 	return findAll ? _list : (_list.length === 0 ? null : _list[0]);
 };

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-webservice/src/main/webapp/app/public/js/ctrl/configurationController.js
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/app/public/js/ctrl/configurationController.js b/eagle-webservice/src/main/webapp/app/public/js/ctrl/configurationController.js
index 300c6fd..a321ffe 100644
--- a/eagle-webservice/src/main/webapp/app/public/js/ctrl/configurationController.js
+++ b/eagle-webservice/src/main/webapp/app/public/js/ctrl/configurationController.js
@@ -342,7 +342,11 @@
 			var _oriConfig = application.config;
 			UI.updateConfirm("Application", {config: _oriConfig}, [
 				{name: "Configuration", field: "config", type: "blob"}
-			]).then(null, null, function(holder) {
+			], function(entity) {
+				if(entity.config !== "" && !common.properties.check(entity.config)) {
+					return "Invalid Properties format";
+				}
+			}).then(null, null, function(holder) {
 				application.config = holder.entity.config;
 				holder.closeFunc();
 				if(_oriConfig !== application.config) $scope.changed = true;

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-webservice/src/main/webapp/app/public/js/srv/entitiesSrv.js
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/app/public/js/srv/entitiesSrv.js b/eagle-webservice/src/main/webapp/app/public/js/srv/entitiesSrv.js
index b580f92..879eac0 100644
--- a/eagle-webservice/src/main/webapp/app/public/js/srv/entitiesSrv.js
+++ b/eagle-webservice/src/main/webapp/app/public/js/srv/entitiesSrv.js
@@ -28,7 +28,7 @@
 			kvs = kvs || {};
 			var _list = [];
 			var _condition = kvs._condition || {};
-			var _addtionalCondition = _condition.additionalCondition || {};
+			var _additionalCondition = _condition.additionalCondition || {};
 			var _startTime, _endTime;
 			var _startTimeStr, _endTimeStr;
 
@@ -52,37 +52,37 @@
 
 			// Fill special parameters
 			// > Query by time duration
-			if(_addtionalCondition._duration) {
+			if(_additionalCondition._duration) {
 				_endTime = app.time.now();
-				_startTime = _endTime.clone().subtract(_addtionalCondition._duration, "ms");
+				_startTime = _endTime.clone().subtract(_additionalCondition._duration, "ms");
 
 				// Debug usage. Extend more time duration for end time
-				if(_addtionalCondition.__ETD) {
-					_endTime.add(_addtionalCondition.__ETD, "ms");
+				if(_additionalCondition.__ETD) {
+					_endTime.add(_additionalCondition.__ETD, "ms");
 				}
 
-				_addtionalCondition._startTime = _startTime;
-				_addtionalCondition._endTime = _endTime;
+				_additionalCondition._startTime = _startTime;
+				_additionalCondition._endTime = _endTime;
 
 				_startTimeStr = _startTime.format("YYYY-MM-DD HH:mm:ss");
 				_endTimeStr = _endTime.clone().add(1, "s").format("YYYY-MM-DD HH:mm:ss");
 
 				_url += "&startTime=" + _startTimeStr + "&endTime=" + _endTimeStr;
-			} else if(_addtionalCondition._startTime && _addtionalCondition._endTime) {
-				_startTimeStr = _addtionalCondition._startTime.format("YYYY-MM-DD HH:mm:ss");
-				_endTimeStr = _addtionalCondition._endTime.clone().add(1, "s").format("YYYY-MM-DD HH:mm:ss");
+			} else if(_additionalCondition._startTime && _additionalCondition._endTime) {
+				_startTimeStr = _additionalCondition._startTime.format("YYYY-MM-DD HH:mm:ss");
+				_endTimeStr = _additionalCondition._endTime.clone().add(1, "s").format("YYYY-MM-DD HH:mm:ss");
 
 				_url += "&startTime=" + _startTimeStr + "&endTime=" + _endTimeStr;
 			}
 
 			// > Query contains metric name
-			if(_addtionalCondition._metricName) {
-				_url += "&metricName=" + _addtionalCondition._metricName;
+			if(_additionalCondition._metricName) {
+				_url += "&metricName=" + _additionalCondition._metricName;
 			}
 
 			// > Customize page size
-			if(_addtionalCondition._pageSize) {
-				_url = _url.replace(/pageSize=\d+/, "pageSize=" + _addtionalCondition._pageSize);
+			if(_additionalCondition._pageSize) {
+				_url = _url.replace(/pageSize=\d+/, "pageSize=" + _additionalCondition._pageSize);
 			}
 
 			// AJAX
@@ -190,7 +190,7 @@
 
 				// Check for url hook
 				if(config.hook) {
-					_url = app.getUpdateURL(serviceName);
+					_url = app.getUpdateURL(serviceName) || app.packageURL(serviceName);
 				} else {
 					_url = app.getURL("updateEntity", {serviceName: serviceName});
 				}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-webservice/src/main/webapp/app/public/js/srv/siteSrv.js
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/app/public/js/srv/siteSrv.js b/eagle-webservice/src/main/webapp/app/public/js/srv/siteSrv.js
index c97e9a1..fce64c0 100644
--- a/eagle-webservice/src/main/webapp/app/public/js/srv/siteSrv.js
+++ b/eagle-webservice/src/main/webapp/app/public/js/srv/siteSrv.js
@@ -125,7 +125,7 @@
 					} else if(!_application) {
 						console.warn("[Site] Application not found:", siteApplication.tags.site, "-", siteApplication.tags.application);
 					} else {
-						_configObj = common.parseJSON(siteApplication.config, {});
+						_configObj = common.properties.parse(siteApplication.config, {});
 						Object.defineProperties(siteApplication, {
 							application: {
 								get: function () {

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-webservice/src/main/webapp/app/public/js/srv/uiSrv.js
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/app/public/js/srv/uiSrv.js b/eagle-webservice/src/main/webapp/app/public/js/srv/uiSrv.js
index 9d4874b..882e179 100644
--- a/eagle-webservice/src/main/webapp/app/public/js/srv/uiSrv.js
+++ b/eagle-webservice/src/main/webapp/app/public/js/srv/uiSrv.js
@@ -31,7 +31,9 @@
 		function _bindShortcut($dialog) {
 			$dialog.on("keydown", function (event) {
 				if(event.which === 13) {
-					$dialog.find(".confirmBtn").click();
+					if(!$(":focus").is("textarea")) {
+						$dialog.find(".confirmBtn:enabled").click();
+					}
 				}
 			});
 		}
@@ -66,6 +68,13 @@
 			});
 
 			// Function
+			$scope.getFieldDescription = function (field) {
+				if(typeof field.description === "function") {
+					return field.description($scope.entity);
+				}
+				return field.description || ((field.name || field.field) + '...');
+			};
+
 			$scope.emptyFieldList = function() {
 				return $.map(fieldList, function(field) {
 					if(!field.optional && !entity[field.field]) {
@@ -96,7 +105,7 @@
 		 * Create a creation confirm modal.
 		 * @param name			Name title
 		 * @param entity		bind entity
-		 * @param fieldList	Array. Format: {name, field, type(optional: blob), rows(optional: number), description(optional), optional(optional), readonly(optional)}
+		 * @param fieldList	Array. Format: {name, field, type(optional: select, blob), rows(optional: number), description(optional), optional(optional), readonly(optional), valueList(optional)}
 		 * @param checkFunc	Check logic function. Return string will prevent access
 		 */
 		UI.createConfirm = function(name, entity, fieldList, checkFunc) {
@@ -107,7 +116,7 @@
 		 * Create a update confirm modal.
 		 * @param name			Name title
 		 * @param entity		bind entity
-		 * @param fieldList	Array. Format: {name, field, type(optional: blob), rows(optional: number), description(optional), optional(optional), readonly(optional)}
+		 * @param fieldList	Array. Format: {name, field, type(optional: select, blob), rows(optional: number), description(optional), optional(optional), readonly(optional), valueList(optional)}
 		 * @param checkFunc	Check logic function. Return string will prevent access
 		 */
 		UI.updateConfirm = function(name, entity, fieldList, checkFunc) {
@@ -122,7 +131,7 @@
 		 * 			@param config.confirm			Boolean. Display or not confirm button
 		 * 			@param config.confirmDesc		Confirm button display description
 		 * @param entity		bind entity
-		 * @param fieldList	Array. Format: {name, field, type(optional: blob), rows(optional: number), description(optional), optional(optional), readonly(optional)}
+		 * @param fieldList	Array. Format: {name, field, type(optional: select, blob), rows(optional: number), description(optional), optional(optional), readonly(optional), valueList(optional)}
 		 * @param checkFunc	Check logic function. Return string will prevent access
 		 */
 		UI.fieldConfirm = function(config, entity, fieldList, checkFunc) {
@@ -191,8 +200,11 @@
 								'<span ng-if="!field.optional">*</span> ' +
 								'{{field.name || field.field}}' +
 							'</label>' +
-							'<textarea class="form-control" placeholder="{{field.description || field.name || field.field + \'...\'}}" ng-model="entity[field.field]" rows="{{ field.rows || 10 }}" ng-readonly="field.readonly" ng-disabled="lock" ng-switch-when="blob"></textarea>' +
-							'<input type="text" class="form-control" placeholder="{{field.description || field.name || field.field + \'...\'}}" ng-model="entity[field.field]" ng-readonly="field.readonly" ng-disabled="lock" ng-switch-default>' +
+							'<textarea class="form-control" placeholder="{{getFieldDescription(field)}}" ng-model="entity[field.field]" rows="{{ field.rows || 10 }}" ng-readonly="field.readonly" ng-disabled="lock" ng-switch-when="blob"></textarea>' +
+							'<select class="form-control" ng-model="entity[field.field]" ng-init="entity[field.field] = entity[field.field] || field.valueList[0]" ng-switch-when="select">' +
+								'<option ng-repeat="value in field.valueList">{{value}}</option>' +
+							'</select>' +
+							'<input type="text" class="form-control" placeholder="{{getFieldDescription(field)}}" ng-model="entity[field.field]" ng-readonly="field.readonly" ng-disabled="lock" ng-switch-default>' +
 						'</div>' +
 					'</div>' +
 					'<div class="modal-footer">' +

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/mkdocs.yml
----------------------------------------------------------------------
diff --git a/mkdocs.yml b/mkdocs.yml
index 6e8d1af..c07ed4a 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -55,5 +55,6 @@ pages:
     - Apache Eagle Development Environment Setup: development/eagle_development_setup.md
 - Tutorial:
    - Getting started with Eagle: tutorial/getting_started_with_eagle.md
+   - Application Manager Tutorial: tutorial/application_manager_tutorial.md
 - User Guide:
    - Installation: userguide/installation.md


[25/47] incubator-eagle git commit: [EAGLE-305] 306, 308 & 313: Fix several application manager minor bugs & update the doc

Posted by mw...@apache.org.
[EAGLE-305] 306, 308 & 313: Fix several application manager minor bugs & update the doc

https://issues.apache.org/jira/browse/EAGLE-305
https://issues.apache.org/jira/browse/EAGLE-306
https://issues.apache.org/jira/browse/EAGLE-308
https://issues.apache.org/jira/browse/EAGLE-313

Author: Zhao, Qingwen <qi...@ebay.com>
Author: jiljiang <ji...@ebay.com>
Author: Daniel <Da...@dataguise.com>

Closes #206 from qingwen220/EAGLE-305.


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/ffd5fddd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/ffd5fddd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/ffd5fddd

Branch: refs/heads/master
Commit: ffd5fddd357effae7aaf2384a2a9b6d479f9c930
Parents: fd39e6e
Author: Zhao, Qingwen <qi...@ebay.com>
Authored: Mon May 30 14:53:03 2016 +0800
Committer: Hao Chen <ha...@apache.org>
Committed: Mon May 30 14:53:03 2016 +0800

----------------------------------------------------------------------
 .../src/main/bin/eagle-topology-init.sh         |  2 +
 .../ApplicationManagementResource.java          | 16 +++--
 .../application/dao/ApplicationManagerDAO.java  |  1 +
 .../dao/ApplicationManagerDaoImpl.java          | 18 +++++-
 .../impl/StormExecutionPlatform.scala           |  2 +-
 .../tutorial/application_manager_tutorial.md    | 68 +++++++++++---------
 .../app/public/feature/topology/controller.js   |  2 +-
 .../src/main/webapp/app/public/js/app.config.js |  3 +-
 8 files changed, 73 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ffd5fddd/eagle-assembly/src/main/bin/eagle-topology-init.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/eagle-topology-init.sh b/eagle-assembly/src/main/bin/eagle-topology-init.sh
index be38a0d..dc9dd59 100755
--- a/eagle-assembly/src/main/bin/eagle-topology-init.sh
+++ b/eagle-assembly/src/main/bin/eagle-topology-init.sh
@@ -64,6 +64,8 @@ curl -silent -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Conten
 
 curl -silent -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=FeatureDescService" -d '[{"prefix":"eagleFeatureDesc","tags":{"feature":"metrics"},"description":"Metrics dashboard","version":"v0.3.0"}]'
 
+curl -silent -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=FeatureDescService" -d '[{"prefix":"eagleFeatureDesc","tags":{"feature":"topology"},"description":"Application topology management feature","version":"v0.4.0"}]'
+
 
 ## AlertStreamService: alert streams generated from data source
 echo ""

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ffd5fddd/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/ApplicationManagementResource.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/ApplicationManagementResource.java b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/ApplicationManagementResource.java
index 779fbe5..6e4521d 100644
--- a/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/ApplicationManagementResource.java
+++ b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/ApplicationManagementResource.java
@@ -21,6 +21,7 @@ package org.apache.eagle.service.application;
 
 import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
 import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
+import org.apache.eagle.policy.common.Constants;
 import org.apache.eagle.service.application.dao.ApplicationManagerDAO;
 import org.apache.eagle.service.application.dao.ApplicationManagerDaoImpl;
 import org.apache.eagle.service.application.entity.TopologyExecutionStatus;
@@ -28,10 +29,7 @@ import org.apache.eagle.service.application.entity.TopologyOperationEntity;
 import org.codehaus.jackson.map.ObjectMapper;
 import org.codehaus.jackson.map.type.TypeFactory;
 
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
+import javax.ws.rs.*;
 import javax.ws.rs.core.MediaType;
 import java.io.IOException;
 import java.io.InputStream;
@@ -98,4 +96,14 @@ public class ApplicationManagementResource {
         ObjectMapper objectMapper = new ObjectMapper();
         return objectMapper.readValue(inputStream, TypeFactory.defaultInstance().constructCollectionType(LinkedList.class, TopologyOperationEntity.class));
     }
+
+    @Path("topology")
+    @DELETE
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    public GenericServiceAPIResponseEntity deleteTopology(@QueryParam("topology") String topology) {
+        return dao.deleteTopology(topology);
+    }
+
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ffd5fddd/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/dao/ApplicationManagerDAO.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/dao/ApplicationManagerDAO.java b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/dao/ApplicationManagerDAO.java
index 189370b..dfa261b 100644
--- a/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/dao/ApplicationManagerDAO.java
+++ b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/dao/ApplicationManagerDAO.java
@@ -29,4 +29,5 @@ public interface ApplicationManagerDAO {
     String loadTopologyExecutionStatus(String site, String application, String topology);
     int loadTopologyOperationsInRunning(String site, String application, String topology) throws Exception;
     GenericServiceAPIResponseEntity createOperation(List<TopologyOperationEntity> entities) throws Exception;
+    GenericServiceAPIResponseEntity deleteTopology(String topology);
 }

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ffd5fddd/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/dao/ApplicationManagerDaoImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/dao/ApplicationManagerDaoImpl.java b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/dao/ApplicationManagerDaoImpl.java
index e21f624..4881cf4 100644
--- a/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/dao/ApplicationManagerDaoImpl.java
+++ b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/dao/ApplicationManagerDaoImpl.java
@@ -18,11 +18,9 @@
 
 package org.apache.eagle.service.application.dao;
 
-
 import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
 import org.apache.eagle.policy.common.Constants;
 import org.apache.eagle.service.application.entity.TopologyExecutionEntity;
-import org.apache.eagle.service.application.entity.TopologyExecutionStatus;
 import org.apache.eagle.service.application.entity.TopologyOperationEntity;
 import org.apache.eagle.service.generic.GenericEntityServiceResource;
 import org.slf4j.Logger;
@@ -73,5 +71,21 @@ public class ApplicationManagerDaoImpl implements ApplicationManagerDAO {
         return response;
     }
 
+    @Override
+    public GenericServiceAPIResponseEntity deleteTopology(String topology) {
+        String topologyQuery = Constants.TOPOLOGY_DESCRIPTION_SERVICE_ENDPOINT_NAME+ "[@topology=\"" + topology + "\"]{*}";
+        String executionQuery = Constants.TOPOLOGY_EXECUTION_SERVICE_ENDPOINT_NAME + "[@topology=\"" + topology + "\"]{*}";
+        int pageSize = Integer.MAX_VALUE;
+
+        GenericServiceAPIResponseEntity response = resource.deleteByQuery(topologyQuery, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
+        if(response.isSuccess()) {
+            response = resource.deleteByQuery(executionQuery, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
+        }
+        if(!response.isSuccess()) {
+            LOG.error(response.getException());
+        }
+        return response;
+    }
+
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ffd5fddd/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/impl/StormExecutionPlatform.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/impl/StormExecutionPlatform.scala b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/impl/StormExecutionPlatform.scala
index 5b1bb48..af4cafa 100644
--- a/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/impl/StormExecutionPlatform.scala
+++ b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/impl/StormExecutionPlatform.scala
@@ -166,7 +166,7 @@ class StormExecutionPlatform extends ExecutionPlatform {
         case None =>
           topologyExecution.setStatus(TopologyExecutionStatus.STOPPED)
           topologyExecution.setUrl("")
-          topologyExecution.setDescription(s"Fail to find topology: $name")
+          topologyExecution.setDescription("")
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ffd5fddd/eagle-docs/tutorial/application_manager_tutorial.md
----------------------------------------------------------------------
diff --git a/eagle-docs/tutorial/application_manager_tutorial.md b/eagle-docs/tutorial/application_manager_tutorial.md
index 4690428..4eccfa4 100644
--- a/eagle-docs/tutorial/application_manager_tutorial.md
+++ b/eagle-docs/tutorial/application_manager_tutorial.md
@@ -15,55 +15,63 @@ See the License for the specific language governing permissions and
 limitations under the License.
 -->
 
-> Application manager aims to manage topology status on EAGLE UI. Users can easily start/start topologies remotely or locally without shell commands.
+> Application manager aims to manage topology status on EAGLE UI. Users can easily start/start topologies remotely or locally without any shell commands. At the same, it should be capable to sync the latest status of topologies on the execution platform (e.g., storm cluster). 
 
-This tutorial will go through all parts of appliaction manager and then give an example to use it. 
+This tutorial will go through all parts of application manager and then give an example to use it. 
 
 ### Design
-Briefly speaking, Application manager consists of a deamon scheduler and the application manager. The scheduler loads user operations(start/stop), and the applicaiton manager is responsible to execute these operations. For more details, please refer to [here](https://cwiki.apache.org/confluence/display/EAG/Application+Management)
+Application manager consists of a daemon scheduler and an execution module. The scheduler periodically loads user operations(start/stop) from database, and the execution module executes these operations. For more details, please refer to [here](https://cwiki.apache.org/confluence/display/EAG/Application+Management)
 
-### Manual
+### Configurations
+The configuration file `eagle-scheduler.conf` defines scheduler parameters, execution platform settings and parts of default topology configuration.
 
-#### Step 1: configure the scheduler
-The configuration file `eagle-scheduler.conf` defines scheduler parameters, topology execution platform settings and parts of topology settings. Here are some important ones:
+* **Scheduler properties**
 
-* `envContextConfig.env`
+    **appCommandLoaderEnabled**: enable application manager. **TODO**: change it to true. <br />
+    **appCommandLoaderIntervalSecs**: defines the interval of the scheduler loads commands. Default value is 1 second.  <br />
+    **appHealthCheckIntervalSecs**: define the interval of health check, which tries to sync the topology execution status to Eagle. <br /><br />
 
-   application execution platform. Default value is storm
+* **Execution platform properties**
    
-* `envContextConfig.url`
-   
-   execution platform http url. Default is "http://sandbox.hortonworks.com:8744"
+    **envContextConfig.env**: application execution platform. Default value is storm.  <br />
+    **envContextConfig.url**: execution platform http url. Default is "http://sandbox.hortonworks.com:8744".  <br />
+    **envContextConfig.nimbusHost**: storm nimbus host. Default is "sandbox.hortonworks.com".  <br />
+    **envContextConfig.nimbusThriftPort**: default is 6627.  
+    **envContextConfig.jarFile**: storm fat jar path. **TODO**: change "/dir-to-jar/eagle-topology-0.3.0-incubating-assembly.jar" to your own jar path. <br /><br />
+
+* **Topology default properties**
+    
+    Some default topology properties are defined here. 
+    
+Note: these configurations can be overridden in the topology configurations, which is shown below. The only difference is to add a prefix `.app`. For example, 'app.envContextConfig.jarFile' is to override 'envContextConfig.jarFile' in eagle-schedule.conf
    
-* `envContextConfig.nimbusHost`
   
-   Storm nimbus host. Default is "sandbox.hortonworks.com"
-   
-* `envContextConfig.nimbusThriftPort`
-   
-   Default is 6627
-   
-* `envContextConfig.jarFile`
+#### Manual
+
+1. Editing eagle-scheduler.conf, and start Eagle service
 
-   Storm fat jar path. The only setting users must specify "/dir-to-jar/eagle-topology-0.3.0-incubating-assembly.jar"
+        # enable application manager         
+        appCommandLoaderEnabled=true
+        # provide jar path
+        envContextConfig.jarFile=/path-to-jar
    
-After the configuration is ready, start Eagle service `bin/eagle-service.sh start`. 
-  
-#### Step 2: add topologies on UI
-1. First of all, go to admin page 
+    For more configurations, please back to **Configuration**. <br />
+    After the configuration is ready, start Eagle service `bin/eagle-service.sh start`. 
+   
+2. Go to admin page 
    ![admin-page](/images/appManager/admin-page.png)
    ![topology-monitor](/images/appManager/topology-monitor.png)
     
-2. Go to management page, and create a topology description. There are three required fields
+3. Go to management page, and create a topology description. There are three required fields
     * name: topology name
     * type: topology type [CLASS, DYNAMIC]
-    * execution entry: either the class which implement interface TopologyExecutable or eagle [DSL](https://github.com/apache/incubator-eagle/blob/master/eagle-assembly/src/main/conf/sandbox-hadoopjmx-pipeline.conf) based topology definition
+    * execution entry: either the class which implements interface TopologyExecutable or eagle [DSL](https://github.com/apache/incubator-eagle/blob/master/eagle-assembly/src/main/conf/sandbox-hadoopjmx-pipeline.conf) based topology definition
    ![topology-description](/images/appManager/topology-description.png)
    
-3. Back to monitoring page, and choose the site/application to deploy the topology 
+4. Back to monitoring page, and choose the site/application to deploy the topology 
    ![topology-execution](/images/appManager/topology-execution.png)
    
-4. Go to site page, and edit site->application and add some new configurations. Blow are some example configurations for [site=sandbox, applicatoin=hbaseSecurityLog]
+5. Go to site page, and edit site->application and add some new configurations. Blow are some example configurations for [site=sandbox, applicatoin=hbaseSecurityLog]
    `These configurations have a higher priority than those in eagle-scheduler.conf`
    
            classification.hbase.zookeeper.property.clientPort=2181
@@ -97,11 +105,11 @@ After the configuration is ready, start Eagle service `bin/eagle-service.sh star
    ![topology-configuration-1](/images/appManager/topology-configuration-1.png)
    ![topology-configuration-2](/images/appManager/topology-configuration-2.png)
    
-5. Go to monitoring page, and start topologies
+6. Go to monitoring page, and start topologies
    ![start-topology-1](/images/appManager/start-topology-1.png)
    ![start-topology-2](/images/appManager/start-topology-2.png)
    
-6. stop topologies on monitoring page
+7. stop topologies on monitoring page
    ![stop-topology-1](/images/appManager/stop-topology-1.png)
    ![stop-topology-2](/images/appManager/stop-topology-2.png)
    ![stop-topology-3](/images/appManager/stop-topology-3.png)

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ffd5fddd/eagle-webservice/src/main/webapp/app/public/feature/topology/controller.js
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/app/public/feature/topology/controller.js b/eagle-webservice/src/main/webapp/app/public/feature/topology/controller.js
index 5504a77..94886c9 100644
--- a/eagle-webservice/src/main/webapp/app/public/feature/topology/controller.js
+++ b/eagle-webservice/src/main/webapp/app/public/feature/topology/controller.js
@@ -247,7 +247,7 @@
 
 		$scope.deleteTopology = function (topology) {
 			UI.deleteConfirm(topology.tags.topology).then(null, null, function(holder) {
-				Entities.deleteEntities("TopologyDescriptionService", {topology: topology.tags.topology})._promise.then(function() {
+				Entities.delete("TopologyDescriptionService", {topology: topology.tags.topology})._promise.then(function() {
 					holder.closeFunc();
 					common.array.remove(topology, $scope.topologyList);
 				});

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ffd5fddd/eagle-webservice/src/main/webapp/app/public/js/app.config.js
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/app/public/js/app.config.js b/eagle-webservice/src/main/webapp/app/public/js/app.config.js
index bd6d62c..ec30ccd 100644
--- a/eagle-webservice/src/main/webapp/app/public/js/app.config.js
+++ b/eagle-webservice/src/main/webapp/app/public/js/app.config.js
@@ -43,7 +43,8 @@
 			DELETE_HOOK: {
 				FeatureDescService: 'rest/module/feature?feature=${feature}',
 				ApplicationDescService: 'rest/module/application?application=${application}',
-				SiteDescService: 'rest/module/site?site=${site}'
+				SiteDescService: 'rest/module/site?site=${site}',
+				TopologyDescriptionService: 'rest/app/topology?topology=${topology}'
 			},
 			UPDATE_HOOK: {
 				SiteDescService: 'rest/module/siteApplication'


[39/47] incubator-eagle git commit: EAGLE-345 Removing -SNAPSHOT from 0.4 release branch

Posted by mw...@apache.org.
EAGLE-345 Removing -SNAPSHOT from 0.4 release branch

do the following 2:
1. erase "-SNAPSHOT" suffix from version of modules.
2. add "apache-" as a prefix of finalName in eagle-assembly/pom.xml, so that final assembled tarball starts with "apache-"

Author: anyway1021 <mw...@apache.org>
Reviewer: qingwzhao

Closes #243 from anyway1021/EAGLE-345.


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/73c8e023
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/73c8e023
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/73c8e023

Branch: refs/heads/master
Commit: 73c8e023bd2c9d620c4938773fa147756f48ce0a
Parents: 3823c01
Author: Zhao, Qingwen <qi...@ebay.com>
Authored: Wed Jun 29 10:31:27 2016 +0800
Committer: Zhao, Qingwen <qi...@ebay.com>
Committed: Wed Jun 29 10:31:27 2016 +0800

----------------------------------------------------------------------
 CHANGELOG.txt                                   | 114 +++++++++++++++++++
 eagle-assembly/pom.xml                          |   4 +-
 eagle-assembly/src/main/conf/eagle-service.conf |  24 ++--
 eagle-core/eagle-alert/eagle-alert-base/pom.xml |   2 +-
 .../eagle-alert-notification-plugin/pom.xml     |   2 +-
 .../eagle-alert/eagle-alert-process/pom.xml     |   2 +-
 .../eagle-alert/eagle-alert-service/pom.xml     |   2 +-
 eagle-core/eagle-alert/pom.xml                  |   2 +-
 .../eagle-application-service/pom.xml           |   2 +-
 .../eagle-stream-application-manager/pom.xml    |   2 +-
 eagle-core/eagle-application-management/pom.xml |   2 +-
 .../eagle-data-process/eagle-job-common/pom.xml |   2 +-
 .../eagle-storm-jobrunning-spout/pom.xml        |   2 +-
 .../eagle-stream-pipeline/pom.xml               |   2 +-
 .../eagle-stream-process-api/pom.xml            |   2 +-
 .../eagle-stream-process-base/pom.xml           |   2 +-
 eagle-core/eagle-data-process/pom.xml           |   2 +-
 .../eagle-embed/eagle-embed-hbase/pom.xml       |   2 +-
 .../eagle-embed/eagle-embed-server/pom.xml      |   2 +-
 eagle-core/eagle-embed/pom.xml                  |   2 +-
 .../eagle-machinelearning-base/pom.xml          |   2 +-
 eagle-core/eagle-machinelearning/pom.xml        |   2 +-
 eagle-core/eagle-metric/pom.xml                 |   2 +-
 .../eagle-policy/eagle-policy-base/pom.xml      |   2 +-
 eagle-core/eagle-policy/pom.xml                 |   2 +-
 eagle-core/eagle-query/eagle-antlr/pom.xml      |   2 +-
 eagle-core/eagle-query/eagle-audit-base/pom.xml |   2 +-
 .../eagle-query/eagle-client-base/pom.xml       |   2 +-
 eagle-core/eagle-query/eagle-common/pom.xml     |   2 +-
 .../eagle-query/eagle-entity-base/pom.xml       |   2 +-
 eagle-core/eagle-query/eagle-query-base/pom.xml |   2 +-
 .../eagle-query/eagle-service-base/pom.xml      |   2 +-
 .../eagle-query/eagle-storage-base/pom.xml      |   2 +-
 .../eagle-query/eagle-storage-hbase/pom.xml     |   2 +-
 .../eagle-query/eagle-storage-jdbc/pom.xml      |   2 +-
 eagle-core/eagle-query/pom.xml                  |   2 +-
 eagle-core/pom.xml                              |   2 +-
 eagle-examples/eagle-topology-example/pom.xml   |   2 +-
 eagle-examples/pom.xml                          |   2 +-
 eagle-external/eagle-kafka/pom.xml              |   2 +-
 eagle-external/eagle-log4jkafka/pom.xml         |   2 +-
 eagle-external/pom.xml                          |   2 +-
 eagle-gc/pom.xml                                |   2 +-
 eagle-hadoop-metric/pom.xml                     |   2 +-
 eagle-security/eagle-metric-collection/pom.xml  |   2 +-
 eagle-security/eagle-security-common/pom.xml    |   2 +-
 .../eagle-security-hbase-securitylog/pom.xml    |   2 +-
 eagle-security/eagle-security-hbase-web/pom.xml |   2 +-
 .../eagle-security-hdfs-auditlog/pom.xml        |   2 +-
 .../eagle-security-hdfs-securitylog/pom.xml     |   2 +-
 eagle-security/eagle-security-hdfs-web/pom.xml  |   2 +-
 eagle-security/eagle-security-hive-web/pom.xml  |   2 +-
 eagle-security/eagle-security-hive/pom.xml      |   2 +-
 .../eagle-security-maprfs-auditlog/pom.xml      |   2 +-
 .../eagle-security-maprfs-web/pom.xml           |   2 +-
 .../eagle-security-oozie-auditlog/pom.xml       |   2 +-
 eagle-security/eagle-security-oozie-web/pom.xml |   2 +-
 .../eagle-security-userprofile/common/pom.xml   |   2 +-
 .../detection/pom.xml                           |   2 +-
 .../eagle-security-userprofile/pom.xml          |   2 +-
 .../eagle-security-userprofile/training/pom.xml |   2 +-
 eagle-security/pom.xml                          |   2 +-
 eagle-topology-assembly/pom.xml                 |   2 +-
 eagle-webservice/pom.xml                        |   2 +-
 pom.xml                                         |   2 +-
 65 files changed, 189 insertions(+), 77 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/CHANGELOG.txt
----------------------------------------------------------------------
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
new file mode 100644
index 0000000..a2d84fc
--- /dev/null
+++ b/CHANGELOG.txt
@@ -0,0 +1,114 @@
+
+Release Notes - Eagle - Version v0.4.0
+
+** Highlights **
+    * JBDC Metadata Storage Extension
+    * Topology management in remote mode including start/stop/status operations
+    * Auditlogparser for MapR's audit log
+    * Oozie auditlog integration for Oozie security monitoring
+    * Add applicaiton "maprFSAuditLog"
+    * Refactor bin/eagle-sandbox-starter.sh to make it easier to use
+
+** New Feature
+    * [EAGLE-169] - Dynamic security event correlation in Eagle
+    * [EAGLE-203] - Metrics feature support merge chart
+    * [EAGLE-225] - Create eagle bootstrap scripts for examples 
+    * [EAGLE-226] - Refactor Eagle scripts to avoid heavily depending on Hortonworks Sandbox
+    * [EAGLE-232] - Create local Kafka/Zookeeper/Storm runner tools for quickstart examples and add related scripts to start/top zk/kafka
+    * [EAGLE-238] - Support scheduling topology in local mode including start/stop/status operations
+    * [EAGLE-266] - Integrate MkDocs for eagle-docs: http://www.mkdocs.org/
+    * [EAGLE-271] - Topology management in remote mode including start/stop/status operations
+    * [EAGLE-272] - Support topology management in UI including creating topology and monitoring status
+    * [EAGLE-282] - Auditlogparser for MapR's audit log 
+    * [EAGLE-284] - Connect to MapR's CLDB service
+    * [EAGLE-298] - Oozie auditlog integration for Oozie security monitoring
+    * [EAGLE-307] - Add applicaiton "maprFSAuditLog" 
+
+** Improvement
+    * [EAGLE-103] - add comments to readme to tell users: currently, eagle is tested under jdk1.7.x, may have compile error with jdk1.8.x
+    * [EAGLE-182] - Replace Legacy "dataSource" field with "application" in UI request
+    * [EAGLE-185] - UI create cache after building
+    * [EAGLE-190] - JBDC Metadata Storage Extension
+    * [EAGLE-193] - UI metric dashboard support sortable
+    * [EAGLE-194] - UI show exception alert if service error
+    * [EAGLE-195] - policy metric display with interval of 5 min or customized interval
+    * [EAGLE-196] - eagle-topology.sh should have jar file path as parameter
+    * [EAGLE-201] - Change maven group name to org.apache.eagle instead of eagle
+    * [EAGLE-205] - Metric dashboard support multi metrics
+    * [EAGLE-207] - Management page add tips
+    * [EAGLE-208] - UI metric dashboard should support order & rename
+    * [EAGLE-216] - Added RM Policy and GC Policies in Resource
+    * [EAGLE-223] - Notification plugin to enable multiple instance of given alert plugin 
+    * [EAGLE-237] - Add development tools for quickly starting zookeeper, kafka and webservice without depending on sandbox
+    * [EAGLE-248] - Rename directories according industrial common sense
+    * [EAGLE-287] - Make EagleStore as the default notification method
+    * [EAGLE-288] - Need to add "Alert De-Dup Interval" setting in "PolicyObjectBase" 
+    * [EAGLE-295] - Add configuration value to enable application Manager
+    * [EAGLE-303] - Refactor message format in the email template.
+    * [EAGLE-305] - Add a config tip to the document for "Application Manager Tutorial" - setting "appCommandLoaderEnabled=true"
+    * [EAGLE-306] - add metadata for showing "Topology" tab in left-nav by default
+    * [EAGLE-315] - Add tutorial for mapr audit log monitoring
+    * [EAGLE-316] - Feature topology should not be added into an application
+    * [EAGLE-339] - Create HBase tables if not exists 
+    * [EAGLE-340] - refactor bin/eagle-sandbox-starter.sh to make it easier to use 
+
+** Bug
+    * [EAGLE-8] - In eagle-check-env.sh shell , Itbad way to check kafka installation
+    * [EAGLE-18] - Follow up with infra about website creation
+    * [EAGLE-157] - policy metric should be refreshed every minute
+    * [EAGLE-171] - Policy listing table is messed up by too long policy name.
+    * [EAGLE-172] - Scripting string is allowed to create policy rules.
+    * [EAGLE-173] - Mark/Un-mark a sensitivity type does not sync status mark in the table list.
+    * [EAGLE-176] - Metric dashboard UI keep api refresh after page switch
+    * [EAGLE-192] - Uncaught ReferenceError: damControllers is not defined (doc.js:7628)
+    * [EAGLE-200] - GC Log Monitoring  Not Working
+    * [EAGLE-210] - UI application group not display correctly
+    * [EAGLE-211] - Fix sometime unit test failing at TestSiddhiStateSnapshotAndRestore
+    * [EAGLE-212] - Fix AlertDataSourceEntity Bug in Hive web
+    * [EAGLE-213] - Updates fail for MySql  
+    * [EAGLE-214] - Policy edit page need auto switch application
+    * [EAGLE-217] - Fix unstable unit tests about state snapshot management
+    * [EAGLE-224] - Column not found to EAGLE_METRIC when using JDBC
+    * [EAGLE-227] - java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/CursorableLinkedList$ListIter
+    * [EAGLE-228] - org.apache.eagle.notification.plugin.NotificationPluginManagerImpl - fail invoking plugin's onAlert, continue  java.lang.NullPointerException: null
+    * [EAGLE-229] - java.lang.IncompatibleClassChangeError: class net.sf.extcos.internal.JavaResourceAccessor$AnnotatedClassVisitor has interface org.objectweb.asm.ClassVisitor as super class
+    * [EAGLE-230] - Exception in persisting entitiesService side exception: org.codehaus.jackson.map.JsonMappingException: Conflicting setter definitions for property "alertContext"
+    * [EAGLE-235] - org.codehaus.jackson.map.JsonMappingException: Conflicting setter definitions for property "alertContext"
+    * [EAGLE-239] - Alert list and details are not correctly displayed
+    * [EAGLE-240] - java.lang.ArrayIndexOutOfBoundsException thrown by MetricKeyCodeDecoder
+    * [EAGLE-242] -  Import the notification plugin metadata when initializing
+    * [EAGLE-254] - HdfsAuditLog topology keeps alerting for one piece of log
+    * [EAGLE-258] - Automatically add apache-github and apache-git in pr tools
+    * [EAGLE-269] - Comparisons between 'LONG VARCHAR (UCS_BASIC)' and 'LONG VARCHAR (UCS_BASIC)' are not supported
+    * [EAGLE-270] - JDBC: Create table fail for some of the tables
+    * [EAGLE-273] -  Issue with creating MySql tables , only 14 were created out of 24, reason being varchar(30000) for multiple columns lead to exceeding the maximum row size of 65,535 bytes.
+    * [EAGLE-274] - 2016-04-15 15:50:20 b.s.d.worker [ERROR] Error on initialization of server mk-worker java.lang.RuntimeException: java.lang.ClassNotFoundException: org.slf4j.impl.Log4jLoggerAdapter
+    * [EAGLE-275] - Eagle email alert bug: $elem["dataSource"] Alert Detected
+    * [EAGLE-291] - JDBC: Update transactions fail in PostgreSQL
+    * [EAGLE-292] - Updated hbase policy failed: Data too long for column 'policyDef' when using mysql storage
+    * [EAGLE-294] - If a policy metadata field is not set, null attributes can not be able to add into input stream for SiddhiCEP 
+    * [EAGLE-297] - Email with authentication can not be validated and sent out.
+    * [EAGLE-300] - Disable spring debug log by default in webservice
+    * [EAGLE-301] - Tables omitted for using mysql
+    * [EAGLE-304] - Enable Advanced dedup configuration in policy definition 
+    * [EAGLE-308] - Consistency issue: deleting a topology doesn't delete existing topology-execution bound to it.
+    * [EAGLE-310] - already existing active topology status not displayed when a deleted topology+execution re-created with same name
+    * [EAGLE-311] - operations of items listed on topology-management monitoring page require buffering loading approaches
+    * [EAGLE-313] - normally stopped topology-execution shows error message in the description column
+    * [EAGLE-319] - java.sql.SQLSyntaxErrorException caught when querying from table topologyExecutionEntity
+    * [EAGLE-321] - java.lang.NoSuchMethodError: com.google.protobuf.LazyStringList.getUnmodifiableView
+    * [EAGLE-326] - typo found in eagle documentation
+    * [EAGLE-327] - java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
+    * [EAGLE-330] - Hive ql.Parser can't parser a hive query sql with keywords
+    * [EAGLE-338] - fix topology-assembly build issue because of module name change
+    * [EAGLE-346] - ClassNotFoundException thrown out when topology is executing
+
+** Task
+    * [EAGLE-73] - Put docker steps to site tutorial
+    * [EAGLE-221] - Support cusomized notification type in policy editor
+    * [EAGLE-222] - Documentation for eagle alert plugin mechnism
+    * [EAGLE-280] - Update logstash-kafka-conf.md
+    * [EAGLE-309] - Add code formatter template
+
+** Sub-task
+    * [EAGLE-219] - Use PUT method for updating request when possible in front-end.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-assembly/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-assembly/pom.xml b/eagle-assembly/pom.xml
index 9b2949c..d2eb676 100644
--- a/eagle-assembly/pom.xml
+++ b/eagle-assembly/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <artifactId>eagle-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
@@ -111,7 +111,7 @@
                 <artifactId>maven-assembly-plugin</artifactId>
                 <configuration>
                     <descriptor>src/assembly/eagle-bin.xml</descriptor>
-                    <finalName>eagle-${project.version}</finalName>
+                    <finalName>apache-eagle-${project.version}</finalName>
                 </configuration>
                 <executions>
                     <execution>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-assembly/src/main/conf/eagle-service.conf
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/conf/eagle-service.conf b/eagle-assembly/src/main/conf/eagle-service.conf
index 49e40ee..4bc2733 100644
--- a/eagle-assembly/src/main/conf/eagle-service.conf
+++ b/eagle-assembly/src/main/conf/eagle-service.conf
@@ -13,18 +13,16 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-
-eagle{
-	service{
-		storage-type="hbase"
-		hbase-zookeeper-quorum="sandbox.hortonworks.com"
-		hbase-zookeeper-property-clientPort=2181
-		zookeeper-znode-parent="/hbase-unsecure",
-		springActiveProfile="sandbox"
-		audit-enabled=true
+eagle {
+	service {
+		storage-type="jdbc"
+		storage-adapter="derby"
+		storage-username="eagle"
+		storage-password=eagle
+		storage-database=eagle
+		storage-connection-url="jdbc:derby:/tmp/eagle-db-dev;create=true"
+		storage-connection-props="encoding=UTF-8"
+		storage-driver-class="org.apache.derby.jdbc.EmbeddedDriver"
+		storage-connection-max=8
 	}
 }
-
-
-
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-alert/eagle-alert-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-base/pom.xml b/eagle-core/eagle-alert/eagle-alert-base/pom.xml
index b1d10fd..d14a8a1 100644
--- a/eagle-core/eagle-alert/eagle-alert-base/pom.xml
+++ b/eagle-core/eagle-alert/eagle-alert-base/pom.xml
@@ -23,7 +23,7 @@
 	<parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-alert-parent</artifactId>
-		<version>0.4.0-incubating-SNAPSHOT</version>
+		<version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
 	</parent>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-alert/eagle-alert-notification-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/pom.xml b/eagle-core/eagle-alert/eagle-alert-notification-plugin/pom.xml
index 504abb8..2db50f4 100644
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/pom.xml
+++ b/eagle-core/eagle-alert/eagle-alert-notification-plugin/pom.xml
@@ -21,7 +21,7 @@
   <parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-alert-parent</artifactId>
-    <version>0.4.0-incubating-SNAPSHOT</version>
+    <version>0.4.0-incubating</version>
   </parent>
   <artifactId>eagle-alert-notification-plugin</artifactId>
   <name>eagle-alert-notification-plugin</name>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-alert/eagle-alert-process/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/pom.xml b/eagle-core/eagle-alert/eagle-alert-process/pom.xml
index cdf321a..a658bb6 100644
--- a/eagle-core/eagle-alert/eagle-alert-process/pom.xml
+++ b/eagle-core/eagle-alert/eagle-alert-process/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.eagle</groupId>
         <artifactId>eagle-alert-parent</artifactId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 	<packaging>jar</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-alert/eagle-alert-service/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/pom.xml b/eagle-core/eagle-alert/eagle-alert-service/pom.xml
index 54226aa..bddfa5e 100644
--- a/eagle-core/eagle-alert/eagle-alert-service/pom.xml
+++ b/eagle-core/eagle-alert/eagle-alert-service/pom.xml
@@ -23,7 +23,7 @@
 	<parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-alert-parent</artifactId>
-		<version>0.4.0-incubating-SNAPSHOT</version>
+		<version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
 	</parent>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-alert/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/pom.xml b/eagle-core/eagle-alert/pom.xml
index d8585bd..8c036ce 100644
--- a/eagle-core/eagle-alert/pom.xml
+++ b/eagle-core/eagle-alert/pom.xml
@@ -21,7 +21,7 @@
 	<parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-core</artifactId>
-		<version>0.4.0-incubating-SNAPSHOT</version>
+		<version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
 	</parent>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-application-management/eagle-application-service/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-application-service/pom.xml b/eagle-core/eagle-application-management/eagle-application-service/pom.xml
index 96fa7ee..8304784 100644
--- a/eagle-core/eagle-application-management/eagle-application-service/pom.xml
+++ b/eagle-core/eagle-application-management/eagle-application-service/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <artifactId>eagle-application-management</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-application-management/eagle-stream-application-manager/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-stream-application-manager/pom.xml b/eagle-core/eagle-application-management/eagle-stream-application-manager/pom.xml
index e58f842..36a6040 100644
--- a/eagle-core/eagle-application-management/eagle-stream-application-manager/pom.xml
+++ b/eagle-core/eagle-application-management/eagle-stream-application-manager/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <artifactId>eagle-application-management</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-application-management/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/pom.xml b/eagle-core/eagle-application-management/pom.xml
index d633717..7952ee1 100644
--- a/eagle-core/eagle-application-management/pom.xml
+++ b/eagle-core/eagle-application-management/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <artifactId>eagle-core</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-data-process/eagle-job-common/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-job-common/pom.xml b/eagle-core/eagle-data-process/eagle-job-common/pom.xml
index 9369004..a5759ef 100644
--- a/eagle-core/eagle-data-process/eagle-job-common/pom.xml
+++ b/eagle-core/eagle-data-process/eagle-job-common/pom.xml
@@ -21,7 +21,7 @@
   <parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-data-process-parent</artifactId>
-    <version>0.4.0-incubating-SNAPSHOT</version>
+    <version>0.4.0-incubating</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
   <artifactId>eagle-job-common</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/pom.xml b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/pom.xml
index 46cfb75..2b14644 100644
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/pom.xml
+++ b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-data-process-parent</artifactId>
-    <version>0.4.0-incubating-SNAPSHOT</version>
+    <version>0.4.0-incubating</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
   <artifactId>eagle-storm-jobrunning-spout</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-data-process/eagle-stream-pipeline/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-pipeline/pom.xml b/eagle-core/eagle-data-process/eagle-stream-pipeline/pom.xml
index e6a5533..fcf4caa 100644
--- a/eagle-core/eagle-data-process/eagle-stream-pipeline/pom.xml
+++ b/eagle-core/eagle-data-process/eagle-stream-pipeline/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>eagle-data-process-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <artifactId>eagle-stream-pipeline</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-data-process/eagle-stream-process-api/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/pom.xml b/eagle-core/eagle-data-process/eagle-stream-process-api/pom.xml
index 9806fef..12aaa18 100644
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/pom.xml
+++ b/eagle-core/eagle-data-process/eagle-stream-process-api/pom.xml
@@ -21,7 +21,7 @@
   <parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-data-process-parent</artifactId>
-    <version>0.4.0-incubating-SNAPSHOT</version>
+    <version>0.4.0-incubating</version>
       <relativePath>../pom.xml</relativePath>
   </parent>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-data-process/eagle-stream-process-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-base/pom.xml b/eagle-core/eagle-data-process/eagle-stream-process-base/pom.xml
index d783398..53a0310 100644
--- a/eagle-core/eagle-data-process/eagle-stream-process-base/pom.xml
+++ b/eagle-core/eagle-data-process/eagle-stream-process-base/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.eagle</groupId>
         <artifactId>eagle-data-process-parent</artifactId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-data-process/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/pom.xml b/eagle-core/eagle-data-process/pom.xml
index 89f2ba3..06f18d9 100644
--- a/eagle-core/eagle-data-process/pom.xml
+++ b/eagle-core/eagle-data-process/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.eagle</groupId>
         <artifactId>eagle-core</artifactId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
     </parent>
     <artifactId>eagle-data-process-parent</artifactId>
     <packaging>pom</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-embed/eagle-embed-hbase/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-embed/eagle-embed-hbase/pom.xml b/eagle-core/eagle-embed/eagle-embed-hbase/pom.xml
index 5016481..d5e3b54 100644
--- a/eagle-core/eagle-embed/eagle-embed-hbase/pom.xml
+++ b/eagle-core/eagle-embed/eagle-embed-hbase/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <artifactId>eagle-embed-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-embed/eagle-embed-server/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-embed/eagle-embed-server/pom.xml b/eagle-core/eagle-embed/eagle-embed-server/pom.xml
index 317e857..897aa02 100644
--- a/eagle-core/eagle-embed/eagle-embed-server/pom.xml
+++ b/eagle-core/eagle-embed/eagle-embed-server/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-embed-parent</artifactId>
-		<version>0.4.0-incubating-SNAPSHOT</version>
+		<version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
 	</parent>
 	<artifactId>eagle-embed-server</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-embed/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-embed/pom.xml b/eagle-core/eagle-embed/pom.xml
index b05991a..9aa88f4 100644
--- a/eagle-core/eagle-embed/pom.xml
+++ b/eagle-core/eagle-embed/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <artifactId>eagle-core</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-machinelearning/eagle-machinelearning-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/pom.xml b/eagle-core/eagle-machinelearning/eagle-machinelearning-base/pom.xml
index 03641ea..6f25b21 100644
--- a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/pom.xml
+++ b/eagle-core/eagle-machinelearning/eagle-machinelearning-base/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-machinelearning-parent</artifactId>
-    <version>0.4.0-incubating-SNAPSHOT</version>
+    <version>0.4.0-incubating</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
   <artifactId>eagle-machinelearning-base</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-machinelearning/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-machinelearning/pom.xml b/eagle-core/eagle-machinelearning/pom.xml
index 1e945ab..1e38d65 100644
--- a/eagle-core/eagle-machinelearning/pom.xml
+++ b/eagle-core/eagle-machinelearning/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <artifactId>eagle-core</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-metric/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-metric/pom.xml b/eagle-core/eagle-metric/pom.xml
index 22b877f..5246524 100644
--- a/eagle-core/eagle-metric/pom.xml
+++ b/eagle-core/eagle-metric/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-core</artifactId>
-		<version>0.4.0-incubating-SNAPSHOT</version>
+		<version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
 	</parent>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-policy/eagle-policy-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/pom.xml b/eagle-core/eagle-policy/eagle-policy-base/pom.xml
index 2120b72..f2745af 100644
--- a/eagle-core/eagle-policy/eagle-policy-base/pom.xml
+++ b/eagle-core/eagle-policy/eagle-policy-base/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.eagle</groupId>
         <artifactId>eagle-policy-parent</artifactId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-policy/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/pom.xml b/eagle-core/eagle-policy/pom.xml
index 4a161a1..6da95d5 100644
--- a/eagle-core/eagle-policy/pom.xml
+++ b/eagle-core/eagle-policy/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.eagle</groupId>
         <artifactId>eagle-core</artifactId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-query/eagle-antlr/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-antlr/pom.xml b/eagle-core/eagle-query/eagle-antlr/pom.xml
index e2c9d96..7369fec 100644
--- a/eagle-core/eagle-query/eagle-antlr/pom.xml
+++ b/eagle-core/eagle-query/eagle-antlr/pom.xml
@@ -21,7 +21,7 @@
   <parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-query-parent</artifactId>
-		<version>0.4.0-incubating-SNAPSHOT</version>
+		<version>0.4.0-incubating</version>
       <relativePath>../pom.xml</relativePath>
   </parent>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-query/eagle-audit-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-audit-base/pom.xml b/eagle-core/eagle-query/eagle-audit-base/pom.xml
index f986953..e9cc615 100755
--- a/eagle-core/eagle-query/eagle-audit-base/pom.xml
+++ b/eagle-core/eagle-query/eagle-audit-base/pom.xml
@@ -24,7 +24,7 @@
 	<parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-query-parent</artifactId>
-		<version>0.4.0-incubating-SNAPSHOT</version>
+		<version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
 	</parent>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-query/eagle-client-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/pom.xml b/eagle-core/eagle-query/eagle-client-base/pom.xml
index bb645c8..353358c 100644
--- a/eagle-core/eagle-query/eagle-client-base/pom.xml
+++ b/eagle-core/eagle-query/eagle-client-base/pom.xml
@@ -23,7 +23,7 @@
 	<parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-query-parent</artifactId>
-		<version>0.4.0-incubating-SNAPSHOT</version>
+		<version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
 	</parent>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-query/eagle-common/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/pom.xml b/eagle-core/eagle-query/eagle-common/pom.xml
index 3fb98da..d708c89 100644
--- a/eagle-core/eagle-query/eagle-common/pom.xml
+++ b/eagle-core/eagle-query/eagle-common/pom.xml
@@ -23,7 +23,7 @@
 	<parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-query-parent</artifactId>
-		<version>0.4.0-incubating-SNAPSHOT</version>
+		<version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
 	</parent>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-query/eagle-entity-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/pom.xml b/eagle-core/eagle-query/eagle-entity-base/pom.xml
index c553507..c1f5573 100755
--- a/eagle-core/eagle-query/eagle-entity-base/pom.xml
+++ b/eagle-core/eagle-query/eagle-entity-base/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-query-parent</artifactId>
-		<version>0.4.0-incubating-SNAPSHOT</version>
+		<version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
 	</parent>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-query/eagle-query-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/pom.xml b/eagle-core/eagle-query/eagle-query-base/pom.xml
index 151158f..8153015 100644
--- a/eagle-core/eagle-query/eagle-query-base/pom.xml
+++ b/eagle-core/eagle-query/eagle-query-base/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <artifactId>eagle-query-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-query/eagle-service-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-service-base/pom.xml b/eagle-core/eagle-query/eagle-service-base/pom.xml
index 21ca218..b4c867c 100755
--- a/eagle-core/eagle-query/eagle-service-base/pom.xml
+++ b/eagle-core/eagle-query/eagle-service-base/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-query-parent</artifactId>
-		<version>0.4.0-incubating-SNAPSHOT</version>
+		<version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
 	</parent>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-query/eagle-storage-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/pom.xml b/eagle-core/eagle-query/eagle-storage-base/pom.xml
index a659a3e..ae1d55e 100644
--- a/eagle-core/eagle-query/eagle-storage-base/pom.xml
+++ b/eagle-core/eagle-query/eagle-storage-base/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>eagle-query-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-query/eagle-storage-hbase/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/pom.xml b/eagle-core/eagle-query/eagle-storage-hbase/pom.xml
index 3a471a3..7cb0420 100644
--- a/eagle-core/eagle-query/eagle-storage-hbase/pom.xml
+++ b/eagle-core/eagle-query/eagle-storage-hbase/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <artifactId>eagle-query-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-query/eagle-storage-jdbc/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/pom.xml b/eagle-core/eagle-query/eagle-storage-jdbc/pom.xml
index 7028589..1b1c6d3 100644
--- a/eagle-core/eagle-query/eagle-storage-jdbc/pom.xml
+++ b/eagle-core/eagle-query/eagle-storage-jdbc/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <artifactId>eagle-query-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/eagle-query/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/pom.xml b/eagle-core/eagle-query/pom.xml
index 25d940a..8d83f24 100644
--- a/eagle-core/eagle-query/pom.xml
+++ b/eagle-core/eagle-query/pom.xml
@@ -21,7 +21,7 @@
 	<parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-core</artifactId>
-		<version>0.4.0-incubating-SNAPSHOT</version>
+		<version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
 	</parent>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-core/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/pom.xml b/eagle-core/pom.xml
index f80efb3..108c34a 100644
--- a/eagle-core/pom.xml
+++ b/eagle-core/pom.xml
@@ -21,7 +21,7 @@
     <parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-parent</artifactId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
 	</parent>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-examples/eagle-topology-example/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/pom.xml b/eagle-examples/eagle-topology-example/pom.xml
index 806cfb0..4daa2d1 100644
--- a/eagle-examples/eagle-topology-example/pom.xml
+++ b/eagle-examples/eagle-topology-example/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>eagle-examples</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-examples/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-examples/pom.xml b/eagle-examples/pom.xml
index 3912583..caceea2 100644
--- a/eagle-examples/pom.xml
+++ b/eagle-examples/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>eagle-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-external/eagle-kafka/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-kafka/pom.xml b/eagle-external/eagle-kafka/pom.xml
index f69c77c..cfe6b89 100644
--- a/eagle-external/eagle-kafka/pom.xml
+++ b/eagle-external/eagle-kafka/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>eagle-external-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-external/eagle-log4jkafka/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-log4jkafka/pom.xml b/eagle-external/eagle-log4jkafka/pom.xml
index afc8a8d..fd455ce 100644
--- a/eagle-external/eagle-log4jkafka/pom.xml
+++ b/eagle-external/eagle-log4jkafka/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <artifactId>eagle-external-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <packaging>jar</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-external/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-external/pom.xml b/eagle-external/pom.xml
index 6cb0061..5f2b202 100644
--- a/eagle-external/pom.xml
+++ b/eagle-external/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <artifactId>eagle-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-gc/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-gc/pom.xml b/eagle-gc/pom.xml
index c32ad3a..d50281c 100644
--- a/eagle-gc/pom.xml
+++ b/eagle-gc/pom.xml
@@ -23,7 +23,7 @@
   <parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-parent</artifactId>
-		<version>0.4.0-incubating-SNAPSHOT</version>
+		<version>0.4.0-incubating</version>
       <relativePath>../pom.xml</relativePath>
   </parent>
   <artifactId>eagle-gc</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-hadoop-metric/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-hadoop-metric/pom.xml b/eagle-hadoop-metric/pom.xml
index 2e2f94a..0fd8d1e 100644
--- a/eagle-hadoop-metric/pom.xml
+++ b/eagle-hadoop-metric/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>eagle-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-security/eagle-metric-collection/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-metric-collection/pom.xml b/eagle-security/eagle-metric-collection/pom.xml
index bbd834f..0848d1c 100644
--- a/eagle-security/eagle-metric-collection/pom.xml
+++ b/eagle-security/eagle-metric-collection/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-security-parent</artifactId>
-    <version>0.4.0-incubating-SNAPSHOT</version>
+    <version>0.4.0-incubating</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
   <artifactId>eagle-metric-collection</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-security/eagle-security-common/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-common/pom.xml b/eagle-security/eagle-security-common/pom.xml
index 14605dc..ff1b82f 100644
--- a/eagle-security/eagle-security-common/pom.xml
+++ b/eagle-security/eagle-security-common/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-security-parent</artifactId>
-    <version>0.4.0-incubating-SNAPSHOT</version>
+    <version>0.4.0-incubating</version>
   </parent>
   <artifactId>eagle-security-common</artifactId>
   <name>eagle-security-common</name>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-security/eagle-security-hbase-securitylog/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hbase-securitylog/pom.xml b/eagle-security/eagle-security-hbase-securitylog/pom.xml
index 2be01ab..b8abcb8 100644
--- a/eagle-security/eagle-security-hbase-securitylog/pom.xml
+++ b/eagle-security/eagle-security-hbase-securitylog/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <artifactId>eagle-security-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-security/eagle-security-hbase-web/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hbase-web/pom.xml b/eagle-security/eagle-security-hbase-web/pom.xml
index ebca436..1d69581 100644
--- a/eagle-security/eagle-security-hbase-web/pom.xml
+++ b/eagle-security/eagle-security-hbase-web/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <artifactId>eagle-security-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-security/eagle-security-hdfs-auditlog/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hdfs-auditlog/pom.xml b/eagle-security/eagle-security-hdfs-auditlog/pom.xml
index d0e6f96..f7932c0 100644
--- a/eagle-security/eagle-security-hdfs-auditlog/pom.xml
+++ b/eagle-security/eagle-security-hdfs-auditlog/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-security-parent</artifactId>
-    <version>0.4.0-incubating-SNAPSHOT</version>
+    <version>0.4.0-incubating</version>
   </parent>
   <artifactId>eagle-security-hdfs-auditlog</artifactId>
   <packaging>jar</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-security/eagle-security-hdfs-securitylog/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hdfs-securitylog/pom.xml b/eagle-security/eagle-security-hdfs-securitylog/pom.xml
index 4668942..89c959a 100644
--- a/eagle-security/eagle-security-hdfs-securitylog/pom.xml
+++ b/eagle-security/eagle-security-hdfs-securitylog/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <artifactId>eagle-security-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-security/eagle-security-hdfs-web/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hdfs-web/pom.xml b/eagle-security/eagle-security-hdfs-web/pom.xml
index f0d54fe..28827e0 100644
--- a/eagle-security/eagle-security-hdfs-web/pom.xml
+++ b/eagle-security/eagle-security-hdfs-web/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-security-parent</artifactId>
-    <version>0.4.0-incubating-SNAPSHOT</version>
+    <version>0.4.0-incubating</version>
   </parent>
 
   <artifactId>eagle-security-hdfs-web</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-security/eagle-security-hive-web/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hive-web/pom.xml b/eagle-security/eagle-security-hive-web/pom.xml
index 60a99b1..98631c6 100644
--- a/eagle-security/eagle-security-hive-web/pom.xml
+++ b/eagle-security/eagle-security-hive-web/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-security-parent</artifactId>
-    <version>0.4.0-incubating-SNAPSHOT</version>
+    <version>0.4.0-incubating</version>
   </parent>
   <artifactId>eagle-security-hive-web</artifactId>
   <name>eagle-security-hive-web</name>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-security/eagle-security-hive/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hive/pom.xml b/eagle-security/eagle-security-hive/pom.xml
index 1f110a5..9d2a341 100644
--- a/eagle-security/eagle-security-hive/pom.xml
+++ b/eagle-security/eagle-security-hive/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-security-parent</artifactId>
-    <version>0.4.0-incubating-SNAPSHOT</version>
+    <version>0.4.0-incubating</version>
   </parent>
   <artifactId>eagle-security-hive</artifactId>
   <name>eagle-security-hive</name>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-security/eagle-security-maprfs-auditlog/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-maprfs-auditlog/pom.xml b/eagle-security/eagle-security-maprfs-auditlog/pom.xml
index 71d9127..b01bcbd 100644
--- a/eagle-security/eagle-security-maprfs-auditlog/pom.xml
+++ b/eagle-security/eagle-security-maprfs-auditlog/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.eagle</groupId>
         <artifactId>eagle-security-parent</artifactId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
     </parent>
     <artifactId>eagle-security-maprfs-auditlog</artifactId>
     <packaging>jar</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-security/eagle-security-maprfs-web/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-maprfs-web/pom.xml b/eagle-security/eagle-security-maprfs-web/pom.xml
index d10d21a..80b14ba 100644
--- a/eagle-security/eagle-security-maprfs-web/pom.xml
+++ b/eagle-security/eagle-security-maprfs-web/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-security-parent</artifactId>
-    <version>0.4.0-incubating-SNAPSHOT</version>
+    <version>0.4.0-incubating</version>
   </parent>
 
   <artifactId>eagle-security-maprfs-web</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-security/eagle-security-oozie-auditlog/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-auditlog/pom.xml b/eagle-security/eagle-security-oozie-auditlog/pom.xml
index b03eafc..a497cd1 100644
--- a/eagle-security/eagle-security-oozie-auditlog/pom.xml
+++ b/eagle-security/eagle-security-oozie-auditlog/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <artifactId>eagle-security-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-security/eagle-security-oozie-web/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-web/pom.xml b/eagle-security/eagle-security-oozie-web/pom.xml
index 3cbac74..9086418 100644
--- a/eagle-security/eagle-security-oozie-web/pom.xml
+++ b/eagle-security/eagle-security-oozie-web/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.eagle</groupId>
         <artifactId>eagle-security-parent</artifactId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
     </parent>
     <artifactId>eagle-security-oozie-web</artifactId>
     <name>eagle-security-oozie-web</name>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-security/eagle-security-userprofile/common/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-userprofile/common/pom.xml b/eagle-security/eagle-security-userprofile/common/pom.xml
index 3fcffb2..4d35165 100644
--- a/eagle-security/eagle-security-userprofile/common/pom.xml
+++ b/eagle-security/eagle-security-userprofile/common/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-security-userprofile-parent</artifactId>
-    <version>0.4.0-incubating-SNAPSHOT</version>
+    <version>0.4.0-incubating</version>
       <relativePath>../pom.xml</relativePath>
   </parent>
   <packaging>jar</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-security/eagle-security-userprofile/detection/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-userprofile/detection/pom.xml b/eagle-security/eagle-security-userprofile/detection/pom.xml
index 1f4811e..f32d632 100644
--- a/eagle-security/eagle-security-userprofile/detection/pom.xml
+++ b/eagle-security/eagle-security-userprofile/detection/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-security-userprofile-parent</artifactId>
-    <version>0.4.0-incubating-SNAPSHOT</version>
+    <version>0.4.0-incubating</version>
   <relativePath>../pom.xml</relativePath>
   </parent>
   <artifactId>eagle-security-userprofile-detection</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-security/eagle-security-userprofile/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-userprofile/pom.xml b/eagle-security/eagle-security-userprofile/pom.xml
index a295c3e..1106c72 100644
--- a/eagle-security/eagle-security-userprofile/pom.xml
+++ b/eagle-security/eagle-security-userprofile/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <artifactId>eagle-security-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-security/eagle-security-userprofile/training/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-userprofile/training/pom.xml b/eagle-security/eagle-security-userprofile/training/pom.xml
index d6a23a5..3e5fc60 100644
--- a/eagle-security/eagle-security-userprofile/training/pom.xml
+++ b/eagle-security/eagle-security-userprofile/training/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <artifactId>eagle-security-userprofile-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-security/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/pom.xml b/eagle-security/pom.xml
index 4735b69..f2c8efb 100644
--- a/eagle-security/pom.xml
+++ b/eagle-security/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.eagle</groupId>
         <artifactId>eagle-parent</artifactId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>eagle-security-parent</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-topology-assembly/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-topology-assembly/pom.xml b/eagle-topology-assembly/pom.xml
index 0ecd227..590eafb 100644
--- a/eagle-topology-assembly/pom.xml
+++ b/eagle-topology-assembly/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.eagle</groupId>
         <artifactId>eagle-parent</artifactId>
-        <version>0.4.0-incubating-SNAPSHOT</version>
+        <version>0.4.0-incubating</version>
     </parent>
     <artifactId>eagle-topology-assembly</artifactId>
     <name>eagle-topology-assembly</name>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/eagle-webservice/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-webservice/pom.xml b/eagle-webservice/pom.xml
index 9d379e7..7ac803d 100644
--- a/eagle-webservice/pom.xml
+++ b/eagle-webservice/pom.xml
@@ -17,7 +17,7 @@
 	<parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-parent</artifactId>
-		<version>0.4.0-incubating-SNAPSHOT</version>
+		<version>0.4.0-incubating</version>
 		<relativePath>../pom.xml</relativePath>
 	</parent>
 	<artifactId>eagle-webservice</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/73c8e023/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 4f967f0..000cd4e 100755
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
     </parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-parent</artifactId>
-    <version>0.4.0-incubating-SNAPSHOT</version>
+    <version>0.4.0-incubating</version>
     <packaging>pom</packaging>
     <name>Apache Eagle Parent</name>
     <url>https://eagle.incubator.apache.org</url>


[40/47] incubator-eagle git commit: Eagle 352 make necessary changes for preparing 0.4.0 release candidate 2 Change for 0.4.0 rc2

Posted by mw...@apache.org.
Eagle 352 make necessary changes for preparing 0.4.0 release candidate 2
Change for 0.4.0 rc2

Author: Michael, Wu <mw...@apache.org>
Reviewer: Edward Zhang <yo...@apache.org>

Closes: #249


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/23d3ca60
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/23d3ca60
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/23d3ca60

Branch: refs/heads/master
Commit: 23d3ca604a37ccb89d7a95e5c75cfba651673b2a
Parents: 73c8e02
Author: yonzhang <yo...@gmail.com>
Authored: Tue Jul 5 13:57:45 2016 -0700
Committer: yonzhang <yo...@gmail.com>
Committed: Tue Jul 5 13:57:45 2016 -0700

----------------------------------------------------------------------
 CHANGELOG.txt                              | 215 +++++++++++++++++++++++-
 README.md                                  |  10 +-
 eagle-docs/images/asf_logo.svg             |  16 ++
 eagle-webservice/src/main/webapp/README.md |  19 +++
 pom.xml                                    | 114 ++++++-------
 5 files changed, 312 insertions(+), 62 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/23d3ca60/CHANGELOG.txt
----------------------------------------------------------------------
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index a2d84fc..657e31d 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,5 +1,5 @@
 
-Release Notes - Eagle - Version v0.4.0
+Release Notes - Apache Eagle 0.4.0 (incubating)
 
 ** Highlights **
     * JBDC Metadata Storage Extension
@@ -111,4 +111,215 @@ Release Notes - Eagle - Version v0.4.0
     * [EAGLE-309] - Add code formatter template
 
 ** Sub-task
-    * [EAGLE-219] - Use PUT method for updating request when possible in front-end.
\ No newline at end of file
+    * [EAGLE-219] - Use PUT method for updating request when possible in front-end.
+
+
+
+Release Notes - Apache Eagle 0.3.1 (incubating)
+
+** Highlights **
+    * Hadoop JMX metric monitoring.
+    * NameNode log monitoring for GC alerts.
+    * Eagle UI Modularization (With new customizable UI options).
+    * Generic Notification Plugin Framework for integrating alerts with various third parties.
+    * Docker Image for Eagle.
+    * Provide analytic DSL support.
+
+** New Feature
+    * [EAGLE-15] - HBase auditlog integration for HBase security monitoring
+    * [EAGLE-17] - HDFS security log integration for HDFS security monitoring
+    * [EAGLE-46] - track the work before moving code to apache site
+    * [EAGLE-47] - Ability to audit who made changes to Eagle policies
+    * [EAGLE-53] - Docker Image for Eagle
+    * [EAGLE-79] - Provide analytic DSL support
+    * [EAGLE-81] - Notification Plugin Framework
+    * [EAGLE-100] - provide tools to collect hadoop jmx metrics
+    * [EAGLE-122] - Create a generic notification plugin for integrating alerts
+
+** Bug
+    * [EAGLE-4] - configure parallelism with bolt/spout friendly name
+    * [EAGLE-6] - group-by user between bolts and spouts for hdfs/hive audit log monitoring
+    * [EAGLE-10] - Bad way to check kafka installation in eagle-check-env.sh
+    * [EAGLE-28] - Znode root should be configurable.
+    * [EAGLE-30] - Topology run in storm local mode should not terminate after Integer.MAX_VALUE milliseconds
+    * [EAGLE-41] - Eagle policy engine supports customizable ExceptionHandler instead of using FetalExceptionHandler
+    * [EAGLE-48] - Alert message time is wrong in some cases
+    * [EAGLE-56] - Building failed for artifact jdk.tools:jdk.tools:jar:1.7 not found
+    * [EAGLE-69] - http 404 bug in accessing http://localhost:9099/eagle-service
+    * [EAGLE-70] - Fix Goovy into Groovy in pom
+    * [EAGLE-74] - in sandbox setup, change package name from eagle. to org.apache.eagle
+    * [EAGLE-76] - Disable creating newStream for common user role
+    * [EAGLE-85] - Fix unit test failure.
+    * [EAGLE-94] - fix the bug of eagle docker in Mac
+    * [EAGLE-95] - DAM HDFS topology fails to start, if there is invalid policy.
+    * [EAGLE-104] - Fix the unit test TestHDFSSecuritylogParser
+    * [EAGLE-118] - Siddhi contains is neither a function extension nor an aggregated attribute extension
+    * [EAGLE-119] - fix unit testing bugs
+    * [EAGLE-125] - Add LICENSE in eagle external
+    * [EAGLE-128] - Fix unit test failure
+    * [EAGLE-141] - fix some unit testing exception which is thrown within annoymous class
+    * [EAGLE-142] - Replace AlertDefinitionDAOImpl with PolicyDefinitionDAOImpl
+    * [EAGLE-148] - Master build failure due to siddhi ql test
+    * [EAGLE-163] - HDFS topology not working.
+
+** Improvement
+    * [EAGLE-7] - expose storm config as individual eagle topology config
+    * [EAGLE-13] - Eagle machine learning no longer needs hourly aggregation
+    * [EAGLE-14] - Re-assemble high level hdfs commands for better policy
+    * [EAGLE-24] - Load skew issue when partition by user
+    * [EAGLE-29] - Update Alert page for display more infomation
+    * [EAGLE-38] - reminder for Alerts in the UI
+    * [EAGLE-40] - Policy detail page support alert list display
+    * [EAGLE-42] - Customized partition support for Kafka spout
+    * [EAGLE-44] - previous page should be reloaded after login session is timed out and re-login
+    * [EAGLE-50] - Eagle internal metric framework
+    * [EAGLE-52] - Eagle framework should support custom group by function in addition to group by fields
+    * [EAGLE-55] - JobCompletedConfigServiceURLBuilderImpl in hive running spout miss anonymous paramter
+    * [EAGLE-58] - Enhance Hive query parse model
+    * [EAGLE-62] - Add jshint for front end UI building
+    * [EAGLE-66] - Eagle TypeSafe Stream Processing DSL
+    * [EAGLE-80] - remove httpd directory
+    * [EAGLE-86] - Rewrite HDFSAuditLogParser to a non-regular expression version
+    * [EAGLE-88] - Eagle web-service should have status url
+    * [EAGLE-99] - policy distribution statistics to be printed in log
+    * [EAGLE-106] - UI use same chart component
+    * [EAGLE-107] - Build Status Icon has been enabled for our github repo, please apply it to readme.md
+    * [EAGLE-108] - a tool tests performace between mongodb3.0 and couchDB1.6.1
+    * [EAGLE-109] - add hdfs related ports mapping from docker container to host
+    * [EAGLE-112] - Should support sum aggregation in front end for slide window function
+    * [EAGLE-114] - Enable RAT check and fix missing license headers
+    * [EAGLE-138] - Extend JMX Collector to support "hadoop.namenode.JournalTransaction"
+    * [EAGLE-143] - Create Eagle release 0.3.1
+    * [EAGLE-149] - Enable hadoop jmx metric cases
+    * [EAGLE-152] - hadoop-metric monitoring automation script
+    * [EAGLE-158] - Disable org.apache.eagle.datastream.EagleTuple
+    * [EAGLE-166] - Enhance metric collector script to extract hadoop ha status as metric
+
+** Task
+    * [EAGLE-83] - Integrate Jenkins with GitHub for checking pull requests
+    * [EAGLE-84] - Create scripts for merging PRs automatically
+    * [EAGLE-102] - ask jenkins-admin's help to setup "Embeddable Build Status Plugin" and make the status visible in Readme.md of incubator-eagle.git
+    * [EAGLE-117] - update Build Status Link and make it point to CI job building upon master
+    * [EAGLE-131] - make eagle main CI build pass
+    * [EAGLE-136] - Setup hadoop metric application
+    * [EAGLE-154] - hadoop-metric monitoring sandbox starter script
+    * [EAGLE-164] - Tutorial for setting up the development environment on mac
+    * [EAGLE-165] - Add more jmx metric cases
+
+** Sub-task
+    * [EAGLE-51] - Clean and manage external licensed static resource dependencies in eagle web with npm and grunt
+    * [EAGLE-60] - HBase sensitivity UI
+    * [EAGLE-63] - Improve docker image for quick preview
+    * [EAGLE-64] - Push eagle docker image to docker hub
+    * [EAGLE-65] - Eagle docker consistent port mapping
+    * [EAGLE-71] - Fix eagle docker run command
+    * [EAGLE-75] - Leverage dropwizard metrics for generating Eagle Topology and DataSource Metrics
+    * [EAGLE-78] - eagle-lib.sh script not work for mac osx and windows
+    * [EAGLE-130] - Eagle Pipeline DSL: Parser, Compiler, Runner
+    * [EAGLE-140] - Eagle Pipeline Package and Script
+
+
+
+Release Notes - Apache Eagle 0.3.0 (incubating)
+
+** Highlights **
+    * Hadoop JMX metric monitoring.
+    * NameNode log monitoring for GC alerts.
+    * Eagle UI Modularization (With new customizable UI options).
+    * Generic Notification Plugin Framework for integrating alerts with various third parties.
+    * Docker Image for Eagle.
+    * Provide analytic DSL support.
+
+** New Feature
+    * [EAGLE-15] - HBase auditlog integration for HBase security monitoring
+    * [EAGLE-17] - HDFS security log integration for HDFS security monitoring
+    * [EAGLE-46] - track the work before moving code to apache site
+    * [EAGLE-47] - Ability to audit who made changes to Eagle policies
+    * [EAGLE-53] - Docker Image for Eagle
+    * [EAGLE-79] - Provide analytic DSL support
+    * [EAGLE-81] - Notification Plugin Framework
+    * [EAGLE-100] - provide tools to collect hadoop jmx metrics
+    * [EAGLE-122] - Create a generic notification plugin for integrating alerts
+
+** Bug
+    * [EAGLE-4] - configure parallelism with bolt/spout friendly name
+    * [EAGLE-6] - group-by user between bolts and spouts for hdfs/hive audit log monitoring
+    * [EAGLE-10] - Bad way to check kafka installation in eagle-check-env.sh
+    * [EAGLE-28] - Znode root should be configurable.
+    * [EAGLE-30] - Topology run in storm local mode should not terminate after Integer.MAX_VALUE milliseconds
+    * [EAGLE-41] - Eagle policy engine supports customizable ExceptionHandler instead of using FetalExceptionHandler
+    * [EAGLE-48] - Alert message time is wrong in some cases
+    * [EAGLE-56] - Building failed for artifact jdk.tools:jdk.tools:jar:1.7 not found
+    * [EAGLE-69] - http 404 bug in accessing http://localhost:9099/eagle-service
+    * [EAGLE-70] - Fix Goovy into Groovy in pom
+    * [EAGLE-74] - in sandbox setup, change package name from eagle. to org.apache.eagle
+    * [EAGLE-76] - Disable creating newStream for common user role
+    * [EAGLE-85] - Fix unit test failure.
+    * [EAGLE-94] - fix the bug of eagle docker in Mac
+    * [EAGLE-95] - DAM HDFS topology fails to start, if there is invalid policy.
+    * [EAGLE-104] - Fix the unit test TestHDFSSecuritylogParser
+    * [EAGLE-118] - Siddhi contains is neither a function extension nor an aggregated attribute extension
+    * [EAGLE-119] - fix unit testing bugs
+    * [EAGLE-125] - Add LICENSE in eagle external
+    * [EAGLE-128] - Fix unit test failure
+    * [EAGLE-141] - fix some unit testing exception which is thrown within annoymous class
+    * [EAGLE-142] - Replace AlertDefinitionDAOImpl with PolicyDefinitionDAOImpl
+    * [EAGLE-148] - Master build failure due to siddhi ql test
+    * [EAGLE-163] - HDFS topology not working.
+
+** Improvement
+    * [EAGLE-7] - expose storm config as individual eagle topology config
+    * [EAGLE-13] - Eagle machine learning no longer needs hourly aggregation
+    * [EAGLE-14] - Re-assemble high level hdfs commands for better policy
+    * [EAGLE-24] - Load skew issue when partition by user
+    * [EAGLE-29] - Update Alert page for display more infomation
+    * [EAGLE-38] - reminder for Alerts in the UI
+    * [EAGLE-40] - Policy detail page support alert list display
+    * [EAGLE-42] - Customized partition support for Kafka spout
+    * [EAGLE-44] - previous page should be reloaded after login session is timed out and re-login
+    * [EAGLE-50] - Eagle internal metric framework
+    * [EAGLE-52] - Eagle framework should support custom group by function in addition to group by fields
+    * [EAGLE-55] - JobCompletedConfigServiceURLBuilderImpl in hive running spout miss anonymous paramter
+    * [EAGLE-58] - Enhance Hive query parse model
+    * [EAGLE-62] - Add jshint for front end UI building
+    * [EAGLE-66] - Eagle TypeSafe Stream Processing DSL
+    * [EAGLE-80] - remove httpd directory
+    * [EAGLE-86] - Rewrite HDFSAuditLogParser to a non-regular expression version
+    * [EAGLE-88] - Eagle web-service should have status url
+    * [EAGLE-99] - policy distribution statistics to be printed in log
+    * [EAGLE-106] - UI use same chart component
+    * [EAGLE-107] - Build Status Icon has been enabled for our github repo, please apply it to readme.md
+    * [EAGLE-108] - a tool tests performace between mongodb3.0 and couchDB1.6.1
+    * [EAGLE-109] - add hdfs related ports mapping from docker container to host
+    * [EAGLE-112] - Should support sum aggregation in front end for slide window function
+    * [EAGLE-114] - Enable RAT check and fix missing license headers
+    * [EAGLE-138] - Extend JMX Collector to support "hadoop.namenode.JournalTransaction"
+    * [EAGLE-143] - Create Eagle release 0.3.0
+    * [EAGLE-149] - Enable hadoop jmx metric cases
+    * [EAGLE-152] - hadoop-metric monitoring automation script
+    * [EAGLE-158] - Disable org.apache.eagle.datastream.EagleTuple
+    * [EAGLE-166] - Enhance metric collector script to extract hadoop ha status as metric
+
+** Task
+    * [EAGLE-83] - Integrate Jenkins with GitHub for checking pull requests
+    * [EAGLE-84] - Create scripts for merging PRs automatically
+    * [EAGLE-102] - ask jenkins-admin's help to setup "Embeddable Build Status Plugin" and make the status visible in Readme.md of incubator-eagle.git
+    * [EAGLE-117] - update Build Status Link and make it point to CI job building upon master
+    * [EAGLE-131] - make eagle main CI build pass
+    * [EAGLE-136] - Setup hadoop metric application
+    * [EAGLE-154] - hadoop-metric monitoring sandbox starter script
+    * [EAGLE-164] - Tutorial for setting up the development environment on mac
+    * [EAGLE-165] - Add more jmx metric cases
+
+** Sub-task
+    * [EAGLE-51] - Clean and manage external licensed static resource dependencies in eagle web with npm and grunt
+    * [EAGLE-60] - HBase sensitivity UI
+    * [EAGLE-63] - Improve docker image for quick preview
+    * [EAGLE-64] - Push eagle docker image to docker hub
+    * [EAGLE-65] - Eagle docker consistent port mapping
+    * [EAGLE-71] - Fix eagle docker run command
+    * [EAGLE-75] - Leverage dropwizard metrics for generating Eagle Topology and DataSource Metrics
+    * [EAGLE-78] - eagle-lib.sh script not work for mac osx and windows
+    * [EAGLE-130] - Eagle Pipeline DSL: Parser, Compiler, Runner
+    * [EAGLE-140] - Eagle Pipeline Package and Script
+

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/23d3ca60/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 9881fc9..cac233f 100755
--- a/README.md
+++ b/README.md
@@ -53,11 +53,15 @@ The fastest way to get started with Eagle is to run with [docker](https://github
 As another alternative option, you could [install eagle package in sandbox](https://eagle.incubator.apache.org/docs/deployment-in-sandbox.html) manualy as well.
 
 ## Building Eagle (Supports JDK-1.7.x)
-Eagle is built using [Apache Maven](https://maven.apache.org/). NPM should be installed (On MAC OS try "brew install node"). To build Eagle, run:
+_**Note:**_
 
-    mvn -DskipTests clean package
+1. Currently eagle is tested on **JDK-1.7.X**, currently (v0.4.0) not supporting JDK 1.8.
+2. **NPM** should be installed (On MAC OS try "brew install node"), this is a prerequisite.
+3. Eagle is built using [Apache Maven](https://maven.apache.org/). 
+
+To build Eagle, run:
 
-Note : Currently eagle is tested on JDK-1.7.X . Eagle does not support JDK 1.8.
+    mvn -DskipTests clean package
 
 After successfully building, you will find eagle binary tarball under _eagle-assembly/target/_
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/23d3ca60/eagle-docs/images/asf_logo.svg
----------------------------------------------------------------------
diff --git a/eagle-docs/images/asf_logo.svg b/eagle-docs/images/asf_logo.svg
index 620694c..4bbe5eb 100644
--- a/eagle-docs/images/asf_logo.svg
+++ b/eagle-docs/images/asf_logo.svg
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~    http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
 <!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg version="1.1" id="Layer_2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/23d3ca60/eagle-webservice/src/main/webapp/README.md
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/README.md b/eagle-webservice/src/main/webapp/README.md
index b4168d5..ff5601c 100644
--- a/eagle-webservice/src/main/webapp/README.md
+++ b/eagle-webservice/src/main/webapp/README.md
@@ -1,3 +1,22 @@
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
 Apache Eagle Web APP
 ==
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/23d3ca60/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 000cd4e..8c7b6e3 100755
--- a/pom.xml
+++ b/pom.xml
@@ -1021,65 +1021,65 @@
                         <goals>
                             <goal>check</goal>
                         </goals>
-                        <configuration>
-                            <useDefaultExcludes>true</useDefaultExcludes>
-                            <excludes>
-                                <!-- Git specific files -->
-                                <exclude>.git/</exclude>
-                                <exclude>.java-version</exclude>
-                                <exclude>.gitignore</exclude>
-                                <!-- IDE specific files-->
-                                <exclude>**/.idea/</exclude>
-                                <exclude>**/.cache-main</exclude>
-                                <exclude>**/.scalastyle/</exclude>
-                                <exclude>**/*.iml</exclude>
-                                <exclude>**/nb-configuration.xml</exclude>
-                                <exclude>**/.classpath</exclude>
-                                <exclude>**/.settings/**</exclude>
-                                <exclude>**/.project</exclude>
-                                <exclude>**/.metadata/</exclude>
-                                <!-- Maven working directory -->
-                                <exclude>**/target/**</exclude>
-                                <!-- Patch files which can be lying around -->
-                                <exclude>**/*.patch</exclude>
-                                <exclude>**/*.rej</exclude>
-                                <!-- Exclude generated files -->
-                                <exclude>**/gen/**</exclude>
-                                <!-- README and test data with exact format -->
-                                <exclude>README*</exclude>
-                                <exclude>**/*.log</exclude>
-                                <exclude>**/eagle.log*</exclude>
-                                <exclude>**/velocity.log*</exclude>
-                                <!-- all json files should be excluded -->
-                                <exclude>**/*.json</exclude>
-                                <exclude>**/resources/eagle.siddhiext</exclude>
-                                <exclude>**/test/resources/securityAuditLog</exclude>
-                                <exclude>**/resources/**/ml-policyDef-UserProfile.txt</exclude>
-                                <exclude>**/test/resources/onelinehiveauditlog.txt</exclude>
-                                <exclude>**/test/resources/ranger-policy-update-request.txt</exclude>
-                                <exclude>**/dev-supports/**/*.json</exclude>
-                                <exclude>**/dev-supports/**/useractivity-agg-json.txt</exclude>
-                                <exclude>**/conf/sandbox-userprofile-topology.conf</exclude>
-                                <exclude>**/kafka-python/**</exclude>
-                                <exclude>**/six/**</exclude>
-                                <!-- Fonts and Images -->
-                                <exclude>**/fonts/**</exclude>
-                                <exclude>**/images/**</exclude>
-                                <exclude>**/lib/js/**</exclude>
-                                <exclude>**/lib/css/**</exclude>
-                                <exclude>**/*.min.js</exclude>
-                                <exclude>**/jquery-*.js</exclude>
-                                <exclude>**/MANIFEST.MF</exclude>
-                                <!-- External dependency script -->
-                                <exclude>**/resource/serf/etc/ambari.json</exclude>
-
-                                <!-- TODO: fix it -->
-                                <exclude>**/webapp/**</exclude>
-
-                            </excludes>
-                        </configuration>
                     </execution>
                 </executions>
+                <configuration>
+                    <useDefaultExcludes>true</useDefaultExcludes>
+                    <excludes>
+                        <!-- Git specific files -->
+                        <exclude>.git/</exclude>
+                        <exclude>.java-version</exclude>
+                        <exclude>.gitignore</exclude>
+                        <!-- IDE specific files-->
+                        <exclude>**/.idea/</exclude>
+                        <exclude>**/.cache-main</exclude>
+                        <exclude>**/.scalastyle/</exclude>
+                        <exclude>**/*.iml</exclude>
+                        <exclude>**/nb-configuration.xml</exclude>
+                        <exclude>**/.classpath</exclude>
+                        <exclude>**/.settings/**</exclude>
+                        <exclude>**/.project</exclude>
+                        <exclude>**/.metadata/</exclude>
+                        <!-- Maven working directory -->
+                        <exclude>**/target/**</exclude>
+                        <!-- Patch files which can be lying around -->
+                        <exclude>**/*.patch</exclude>
+                        <exclude>**/*.rej</exclude>
+                        <!-- Exclude generated files -->
+                        <exclude>**/gen/**</exclude>
+                        <!-- README and test data with exact format -->
+                        <exclude>README*</exclude>
+                        <exclude>**/*.log</exclude>
+                        <exclude>**/eagle.log*</exclude>
+                        <exclude>**/velocity.log*</exclude>
+                        <!-- all json files should be excluded -->
+                        <exclude>**/*.json</exclude>
+                        <exclude>**/resources/eagle.siddhiext</exclude>
+                        <exclude>**/test/resources/securityAuditLog</exclude>
+                        <exclude>**/resources/**/ml-policyDef-UserProfile.txt</exclude>
+                        <exclude>**/test/resources/onelinehiveauditlog.txt</exclude>
+                        <exclude>**/test/resources/ranger-policy-update-request.txt</exclude>
+                        <exclude>**/dev-supports/**/*.json</exclude>
+                        <exclude>**/dev-supports/**/useractivity-agg-json.txt</exclude>
+                        <exclude>**/conf/sandbox-userprofile-topology.conf</exclude>
+                        <exclude>**/kafka-python/**</exclude>
+                        <exclude>**/six/**</exclude>
+                        <!-- Fonts and Images -->
+                        <exclude>**/fonts/**</exclude>
+                        <exclude>**/images/**</exclude>
+                        <exclude>**/lib/js/**</exclude>
+                        <exclude>**/lib/css/**</exclude>
+                        <exclude>**/*.min.js</exclude>
+                        <exclude>**/jquery-*.js</exclude>
+                        <exclude>**/MANIFEST.MF</exclude>
+                        <!-- External dependency script -->
+                        <exclude>**/resource/serf/etc/ambari.json</exclude>
+
+                        <!-- TODO: fix it -->
+                        <exclude>**/webapp/**</exclude>
+
+                    </excludes>
+                </configuration>
             </plugin>
         </plugins>
     </build>


[22/47] incubator-eagle git commit: EAGLE-316 Feature topology should not be added into an application add global mark to the topology which avoid add step in application

Posted by mw...@apache.org.
EAGLE-316 Feature topology should not be added into an application
add global mark to the topology which avoid add step in application

https://issues.apache.org/jira/browse/EAGLE-316

Author: @zombiej
Reviewer: @qingwen220

Closes #203


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/0a76242d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/0a76242d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/0a76242d

Branch: refs/heads/master
Commit: 0a76242d13c3163acc830877459a89dc20d16f42
Parents: 4ad4b5c
Author: jiljiang <ji...@ebay.com>
Authored: Fri May 27 14:02:39 2016 +0800
Committer: jiljiang <ji...@ebay.com>
Committed: Fri May 27 14:02:39 2016 +0800

----------------------------------------------------------------------
 .../webapp/app/public/feature/topology/controller.js   |  4 +++-
 eagle-webservice/src/main/webapp/app/public/js/app.js  | 13 +++++++++----
 .../app/public/js/ctrl/configurationController.js      |  4 +++-
 3 files changed, 15 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0a76242d/eagle-webservice/src/main/webapp/app/public/feature/topology/controller.js
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/app/public/feature/topology/controller.js b/eagle-webservice/src/main/webapp/app/public/feature/topology/controller.js
index 776edf7..5504a77 100644
--- a/eagle-webservice/src/main/webapp/app/public/feature/topology/controller.js
+++ b/eagle-webservice/src/main/webapp/app/public/feature/topology/controller.js
@@ -20,7 +20,9 @@
 	'use strict';
 
 	var featureControllers = angular.module('featureControllers');
-	var feature = featureControllers.register("topology");
+	var feature = featureControllers.register("topology", {
+		global: true	// Global Feature needn't add to applications
+	});
 
 	// ==============================================================
 	// =                       Initialization                       =

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0a76242d/eagle-webservice/src/main/webapp/app/public/js/app.js
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/app/public/js/app.js b/eagle-webservice/src/main/webapp/app/public/js/app.js
index a31219b..70b4afe 100644
--- a/eagle-webservice/src/main/webapp/app/public/js/app.js
+++ b/eagle-webservice/src/main/webapp/app/public/js/app.js
@@ -51,9 +51,9 @@ var app = {};
 		var _features = {};
 		var _services = {};
 
-		var Feature = function(name, version) {
+		var Feature = function(name, config) {
 			this.name = name;
-			this.version = version;
+			this.config = config || {};
 			this.features = {};
 		};
 
@@ -199,8 +199,8 @@ var app = {};
 		};
 
 		// Register
-		featureControllers.register = Feature.register = function(featureName) {
-			_features[featureName] = _features[featureName] || new Feature(featureName);
+		featureControllers.register = Feature.register = function(featureName, config) {
+			_features[featureName] = _features[featureName] || new Feature(featureName, config);
 			return _features[featureName];
 		};
 
@@ -220,6 +220,11 @@ var app = {};
 			}
 		};
 
+		// Get feature by name
+		Feature.get = function (featureName) {
+			return _features[featureName];
+		};
+
 		return Feature;
 	});
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0a76242d/eagle-webservice/src/main/webapp/app/public/js/ctrl/configurationController.js
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/app/public/js/ctrl/configurationController.js b/eagle-webservice/src/main/webapp/app/public/js/ctrl/configurationController.js
index a321ffe..e59198d 100644
--- a/eagle-webservice/src/main/webapp/app/public/js/ctrl/configurationController.js
+++ b/eagle-webservice/src/main/webapp/app/public/js/ctrl/configurationController.js
@@ -111,7 +111,7 @@
 	});
 
 	// ======================== Application ========================
-	eagleControllers.controller('configApplicationCtrl', function ($scope, $timeout, PageConfig, Application, Entities, UI) {
+	eagleControllers.controller('configApplicationCtrl', function ($scope, $timeout, PageConfig, Application, Entities, Feature, UI) {
 		PageConfig.hideApplication = true;
 		PageConfig.hideSite = true;
 		$scope._pageLock = false;
@@ -132,6 +132,8 @@
 		$.each(Application.list, function(i, application) {
 			var _application = $scope.applications[application.tags.application] = $.extend({}, application, {features: application.features.slice()}, true);
 			_application.optionalFeatures = $.map(Application.featureList, function(feature) {
+				var featurePlugin = Feature.get(feature.tags.feature);
+				if(featurePlugin.config.global) return null;
 				if(!common.array.find(feature.tags.feature, _application.features)) {
 					return feature.tags.feature;
 				}


[28/47] incubator-eagle git commit: EAGLE-327: Fix topologyOperation start exception: java.lang.ClassCastException

Posted by mw...@apache.org.
EAGLE-327: Fix topologyOperation start exception: java.lang.ClassCastException

https://issues.apache.org/jira/browse/EAGLE-327

Author: Zhao, Qingwen <qi...@ebay.com>
Reviewer: Wu, Michael
Closes #218


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/f51474de
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/f51474de
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/f51474de

Branch: refs/heads/master
Commit: f51474dee0c6ab40b4df965871b5d723c06f84a3
Parents: 5a5a17c
Author: Zhao, Qingwen <qi...@ebay.com>
Authored: Mon Jun 6 10:25:05 2016 +0800
Committer: Zhao, Qingwen <qi...@ebay.com>
Committed: Mon Jun 6 10:25:05 2016 +0800

----------------------------------------------------------------------
 .../apache/eagle/alert/executor/AlertExecutorCreationUtils.java  | 2 +-
 .../eagle/datastream/core/StreamParallelismConfigExpansion.scala | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/f51474de/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutorCreationUtils.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutorCreationUtils.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutorCreationUtils.java
index 8ab290e..8377267 100644
--- a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutorCreationUtils.java
+++ b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutorCreationUtils.java
@@ -81,7 +81,7 @@ public class AlertExecutorCreationUtils {
             if(alertExecutorConfigs !=null && alertExecutorConfigs.containsKey(alertExecutorId)) {
                 Map<String, Object> alertExecutorConfig = (Map<String, Object>) alertExecutorConfigs.get(alertExecutorId).unwrapped();
                 int parts = 0;
-                if(alertExecutorConfig.containsKey("parallelism")) parts = (int) (alertExecutorConfig.get("parallelism"));
+                if(alertExecutorConfig.containsKey("parallelism")) parts = Integer.parseInt(alertExecutorConfig.get("parallelism").toString());
                 numPartitions = parts == 0 ? 1 : parts;
                 if(alertExecutorConfig.containsKey("partitioner")) partitionerCls = (String) alertExecutorConfig.get("partitioner");
             }

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/f51474de/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamParallelismConfigExpansion.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamParallelismConfigExpansion.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamParallelismConfigExpansion.scala
index 8699da6..7ac9ff5 100644
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamParallelismConfigExpansion.scala
+++ b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamParallelismConfigExpansion.scala
@@ -19,7 +19,7 @@ package org.apache.eagle.datastream.core
 
 import java.util.regex.Pattern
 
-import com.typesafe.config.{Config, ConfigObject, ConfigValue}
+import com.typesafe.config.{Config, ConfigObject}
 import org.jgrapht.experimental.dag.DirectedAcyclicGraph
 import org.slf4j.LoggerFactory
 
@@ -48,7 +48,7 @@ case class StreamParallelismConfigExpansion(config: Config) extends StreamDAGExp
     if(config.hasPath("envContextConfig.parallelismConfig")) {
       val parallelismConfig: ConfigObject = config.getObject("envContextConfig.parallelismConfig")
       parallelismConfig.asScala.toMap map {
-        case (name, value) => (Pattern.compile(name), value.asInstanceOf[ConfigValue].unwrapped().asInstanceOf[Int])
+        case (name, value) => (Pattern.compile(name), Integer.parseInt(value.unwrapped().toString))
       }
     }else{
       Map[Pattern,Int]()


[38/47] incubator-eagle git commit: EAGLE-346: ClassNotFoundException ClassNotFoundException thrown out when topology is executing

Posted by mw...@apache.org.
EAGLE-346: ClassNotFoundException
ClassNotFoundException thrown out when topology is executing

Author: @qingwen
Reviewer: @yonzhang

Closes: #244


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/3823c019
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/3823c019
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/3823c019

Branch: refs/heads/master
Commit: 3823c019c8993608085989b27edbd67539ba4acb
Parents: 2eb5d53
Author: yonzhang <yo...@gmail.com>
Authored: Fri Jun 17 11:04:08 2016 -0700
Committer: yonzhang <yo...@gmail.com>
Committed: Fri Jun 17 11:04:08 2016 -0700

----------------------------------------------------------------------
 eagle-assembly/src/assembly/eagle-bin.xml       | 1 +
 eagle-security/eagle-security-oozie-web/pom.xml | 2 +-
 pom.xml                                         | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/3823c019/eagle-assembly/src/assembly/eagle-bin.xml
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/assembly/eagle-bin.xml b/eagle-assembly/src/assembly/eagle-bin.xml
index c4a8e10..aecc327 100644
--- a/eagle-assembly/src/assembly/eagle-bin.xml
+++ b/eagle-assembly/src/assembly/eagle-bin.xml
@@ -174,6 +174,7 @@
                 <exclude>WEB-INF/lib/jsp-api-*.jar</exclude>
                 <!--<exclude>WEB-INF/lib/storm-*.jar</exclude> -->
                 <!--<exclude>WEB-INF/lib/kafka_*.jar</exclude> -->
+                <exclude>WEB-INF/lib/slf4j-simple-*.jar</exclude>
                 <exclude>WEB-INF/lib/slf4j-log4j12-*.jar</exclude>
                 <exclude>WEB-INF/lib/*-tests.jar</exclude>
                 <exclude>WEB-INF/lib/hadoop-mapreduce-*.jar</exclude>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/3823c019/eagle-security/eagle-security-oozie-web/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-web/pom.xml b/eagle-security/eagle-security-oozie-web/pom.xml
index ac11b7c..3cbac74 100644
--- a/eagle-security/eagle-security-oozie-web/pom.xml
+++ b/eagle-security/eagle-security-oozie-web/pom.xml
@@ -67,7 +67,7 @@
         <dependency>
             <groupId>org.apache.oozie</groupId>
             <artifactId>oozie-client</artifactId>
-            <version>4.1.0</version>
+            <version>${oozie.version}</version>
         </dependency>
         <dependency>
             <groupId>org.powermock</groupId>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/3823c019/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 49c2971..4f967f0 100755
--- a/pom.xml
+++ b/pom.xml
@@ -164,6 +164,7 @@
         <hadoop.version>2.6.0.2.2.5.1-3</hadoop.version>
         <hbase.version>0.98.4.2.2.5.1-3-hadoop2</hbase.version>
         <hive.version>1.2.1</hive.version>
+        <oozie.version>4.1.0</oozie.version>
 
         <mapr-hive.version>1.2.0-mapr-1510</mapr-hive.version>
         <mapr-hadoop.version>2.7.0-mapr-1506</mapr-hadoop.version>


[24/47] incubator-eagle git commit: [EAGLE-298] Oozie auditlog integration for Oozie security monitoring

Posted by mw...@apache.org.
[EAGLE-298] Oozie auditlog integration for Oozie security monitoring

- Add oozie auditlog parse code and related test code.
- Add job.html and controll.js code for new view type job.
- Add oozie auditlog entity ,oozie metatdata access config code and related test code.

https://issues.apache.org/jira/browse/EAGLE-298

Author: r7raul1984 <ta...@yhd.com>
Author: yonzhang <yo...@gmail.com>
Author: JiJun Tang <ta...@yhd.com>

Closes #208 from r7raul1984/dev.


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/fd39e6e1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/fd39e6e1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/fd39e6e1

Branch: refs/heads/master
Commit: fd39e6e14ed5cdca1e7b4314b2b4e5e1d1d97425
Parents: 0a76242
Author: r7raul1984 <ta...@yhd.com>
Authored: Mon May 30 14:21:46 2016 +0800
Committer: Hao Chen <ha...@apache.org>
Committed: Mon May 30 14:21:46 2016 +0800

----------------------------------------------------------------------
 .../src/main/bin/eagle-topology-init.sh         |  24 ++++
 .../security/entity/OozieResourceEntity.java    |  82 +++++++++++++
 .../OozieResourceSensitivityAPIEntity.java      |  46 +++++++
 .../entity/SecurityEntityRepository.java        |   1 +
 .../audit/TestMetaDataAccessConfigRepo.java     |  13 +-
 .../dao/HiveSensitivityMetadataDAOImpl.java     |   2 -
 .../hive/resolver/HiveMetadataResolver.java     |   2 -
 .../eagle-security-oozie-auditlog/pom.xml       |  40 +++++++
 .../parse/OozieAuditLogKafkaDeserializer.java   |  71 +++++++++++
 .../oozie/parse/OozieAuditLogObject.java        |  35 ++++++
 .../oozie/parse/OozieAuditLogParser.java        | 110 +++++++++++++++++
 .../oozie/parse/OozieAuditLogProcessorMain.java |  33 +++++
 ...ozieResourceSensitivityDataJoinExecutor.java |  89 ++++++++++++++
 .../OozieResourceSensitivityPollingJob.java     |  63 ++++++++++
 .../src/main/resources/application.conf         |  66 ++++++++++
 .../oozie/parse/TestOozieAuditLogParser.java    |  56 +++++++++
 eagle-security/eagle-security-oozie-web/pom.xml |  91 ++++++++++++++
 .../OozieResourceSensitivityDataJoiner.java     |  47 ++++++++
 .../BadOozieMetadataAccessConfigException.java  |  27 +++++
 .../oozie/dao/OozieMetadataAccessConfig.java    |  87 ++++++++++++++
 .../oozie/dao/OozieMetadataAccessConfigDAO.java |  23 ++++
 .../dao/OozieMetadataAccessConfigDAOImpl.java   |  29 +++++
 .../security/oozie/dao/OozieMetadataDAO.java    |  25 ++++
 .../oozie/dao/OozieMetadataDAOImpl.java         |  54 +++++++++
 .../oozie/dao/OozieSensitivityMetadataDAO.java  |  29 +++++
 .../dao/OozieSensitivityMetadataDAOImpl.java    |  81 +++++++++++++
 .../res/OozieMetadataBrowseWebResource.java     |  58 +++++++++
 .../res/OozieMetadataBrowseWebResponse.java     |  44 +++++++
 .../TestOozieResourceSensitivityDataJoiner.java |  92 ++++++++++++++
 .../dao/TestOozieMetadataAccessConfig.java      |  43 +++++++
 .../TestOozieSensitivityMetadataDAOImpl.java    | 120 +++++++++++++++++++
 .../src/test/resources/coordinatorJob.json      |  94 +++++++++++++++
 eagle-security/pom.xml                          |  55 +++++----
 eagle-topology-assembly/pom.xml                 |  42 ++++---
 eagle-webservice/pom.xml                        |  61 +++++++---
 .../public/feature/classification/controller.js |  58 ++++++++-
 .../classification/page/sensitivity/job.html    |  92 ++++++++++++++
 pom.xml                                         |   6 +
 38 files changed, 1926 insertions(+), 65 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-assembly/src/main/bin/eagle-topology-init.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/eagle-topology-init.sh b/eagle-assembly/src/main/bin/eagle-topology-init.sh
index 9d296fc..be38a0d 100755
--- a/eagle-assembly/src/main/bin/eagle-topology-init.sh
+++ b/eagle-assembly/src/main/bin/eagle-topology-init.sh
@@ -40,6 +40,8 @@ curl -silent -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Conten
 
 curl -silent -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=SiteApplicationService" -d '[{"prefix":"eagleSiteApplication","tags":{"site" : "sandbox", "application":"hiveQueryLog"}, "enabled": true, "config":"classification.accessType=metastoredb_jdbc\nclassification.password=hive\nclassification.user=hive\nclassification.jdbcDriverClassName=com.mysql.jdbc.Driver\nclassification.jdbcUrl=jdbc:mysql://sandbox.hortonworks.com/hive?createDatabaseIfNotExist=true"}]'
 
+curl -silent -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=SiteApplicationService" -d '[{"prefix":"eagleSiteApplication","tags":{"site" : "sandbox", "application":"oozieAuditLog"}, "enabled": true, "config" : "classification.accessType=oozie_api\nclassification.oozieUrl=http://localhost:11000/oozie\nclassification.filter=status=RUNNING\nclassification.authType=SIMPLE"}]'
+
 echo ""
 echo "Importing application definitions ..."
 curl -silent -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=ApplicationDescService" -d '[{"prefix":"eagleApplicationDesc","tags":{"application":"hdfsAuditLog"},"description":"HDFS audit log security check application","alias":"HDFS","groupName":"DAM","features":["common","classification","userProfile","metadata"],"config":"{\n\t\"view\": {\n\t\t\"prefix\": \"fileSensitivity\",\n\t\t\"service\": \"FileSensitivityService\",\n\t\t\"keys\": [\n\t\t\t\"filedir\",\n\t\t\t\"sensitivityType\"\n\t\t],\n\t\t\"type\": \"folder\",\n\t\t\"api\": \"hdfsResource\"\n\t}\n}"}]'
@@ -48,6 +50,8 @@ curl -silent -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Conten
 
 curl -silent -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=ApplicationDescService" -d '[{"prefix":"eagleApplicationDesc","tags":{"application":"hiveQueryLog"},"description":"Hive query log security check application","alias":"HIVE","groupName":"DAM","features":["common","classification","userProfile","metadata"], "config":"{\n\t\"view\": {\n\t\t\"prefix\": \"hiveResourceSensitivity\",\n\t\t\"service\": \"HiveResourceSensitivityService\",\n\t\t\"keys\": [\n\t\t\t\"hiveResource\",\n\t\t\t\"sensitivityType\"\n\t\t],\n\t\t\"type\": \"table\",\n\t\t\"api\": {\n\t\t\t\"database\": \"hiveResource/databases\",\n\t\t\t\"table\": \"hiveResource/tables\",\n\t\t\t\"column\": \"hiveResource/columns\"\n\t\t},\n\t\t\"mapping\": {\n\t\t\t\"database\": \"database\",\n\t\t\t\"table\": \"table\",\n\t\t\t\"column\": \"column\"\n\t\t}\n\t}\n}"}]'
 
+curl -silent -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=ApplicationDescService" -d '[{"prefix":"eagleApplicationDesc","tags":{"application":"oozieAuditLog"},"description":"Oozie audit log security check application","alias":"OOZIE","groupName":"DAM","features":["common","classification","metadata"],"config":"{\n\t\"view\": {\n\t\t\"prefix\": \"oozieResourceSensitivity\",\n\t\t\"service\": \"OozieResourceSensitivityService\",\n\t\t\"keys\": [\n\t\t\t\"oozieResource\",\n\t\t\t\"sensitivityType\"\n\t\t],\n\t\t\"type\": \"job\",\n\t\t\"api\": \"oozieResource/coordinators\"\n\t}\n}"}]'
+
 echo ""
 echo "Importing feature definitions ..."
 curl -silent -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=FeatureDescService" -d '[{"prefix":"eagleFeatureDesc","tags":{"feature":"common"},"description":"Provide the Policy & Alert feature.","version":"v0.3.0"}]'
@@ -139,6 +143,26 @@ curl -silent -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H "Conten
      -d '[ { "prefix": "alertStream", "tags": { "streamName": "userActivity", "site":"sandbox", "application":"userProfile" }, "alertExecutorIdList": [ "userProfileAnomalyDetectionExecutor" ] } ]'
 
 #####################################################################
+#            Import stream metadata for OOZIE
+#####################################################################
+
+## AlertStreamService: alert streams generated from data source
+echo ""
+echo "Importing AlertStreamService for OOZIE... "
+curl -silent -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamService" -d '[{"prefix":"alertStream","tags":{"application":"oozieAuditLog","streamName":"oozieSecurityLogEventStream"},"description":"alert event stream from oozie audit log"}]'
+
+## AlertExecutorService: what alert streams are consumed by alert executor
+echo ""
+echo "Importing AlertExecutorService for OOZIE... "
+curl -silent -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertExecutorService" -d '[{"prefix":"alertExecutor","tags":{"application":"oozieAuditLog","alertExecutorId":"oozieAuditLogAlertExecutor","streamName":"oozieSecurityLogEventStream"},"description":"alert executor for oozie audit log event stream"}]'
+
+## AlertStreamSchemaServiceService: schema for event from alert stream
+echo ""
+echo "Importing AlertStreamSchemaService for OOZIE... "
+curl -silent -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamSchemaService" -d '[{"prefix":"alertStreamSchema","category":"","attrType":"string","attrDescription":"","attrValueResolver":"","tags":{"application":"oozieAuditLog","streamName":"oozieSecurityLogEventStream","attrName":"errorcode"}},{"prefix":"alertStreamSchema","category":"","attrType":"string","attrDescription":"","attrValueResolver":"","tags":{"application":"oozieAuditLog","streamName":"oozieSecurityLogEventStream","attrName":"httpcode"}},{"prefix":"alertStreamSchema","category":"","attrType":"string","attrDescription":"log level such as INFO,DEBUG","attrValueResolver":"","tags":{"application":"oozieAuditLog","streamName":"oozieSecurityLogEventStream","attrName":"level"}},{"prefix":"alertStreamSchema","category":"","attrType":"long","attrDescription":"milliseconds of the dat
 etime","attrValueResolver":"","tags":{"application":"oozieAuditLog","streamName":"oozieSecurityLogEventStream","attrName":"timestamp"}},{"prefix":"alertStreamSchema","category":"","attrType":"string","attrDescription":"","attrValueResolver":"","tags":{"application":"oozieAuditLog","streamName":"oozieSecurityLogEventStream","attrName":"ip"}},{"prefix":"alertStreamSchema","category":"","attrType":"string","attrDescription":"","attrValueResolver":"","tags":{"application":"oozieAuditLog","streamName":"oozieSecurityLogEventStream","attrName":"user"}},{"prefix":"alertStreamSchema","category":"","attrType":"string","attrDescription":"","attrValueResolver":"","tags":{"application":"oozieAuditLog","streamName":"oozieSecurityLogEventStream","attrName":"app"}},{"prefix":"alertStreamSchema","category":"","attrType":"string","attrDescription":"","attrValueResolver":"","tags":{"application":"oozieAuditLog","streamName":"oozieSecurityLogEventStream","attrName":"group"}},{"prefix":"alertStreamSchem
 a","category":"","attrType":"string","attrDescription":"such as start kill suspend resume","attrValueResolver":"","tags":{"application":"oozieAuditLog","streamName":"oozieSecurityLogEventStream","attrName":"operation"}},{"prefix":"alertStreamSchema","category":"","attrType":"string","attrDescription":"","attrValueResolver":"","tags":{"application":"oozieAuditLog","streamName":"oozieSecurityLogEventStream","attrName":"jobId"}},{"prefix":"alertStreamSchema","category":"","attrType":"string","attrDescription":"","attrValueResolver":"","tags":{"application":"oozieAuditLog","streamName":"oozieSecurityLogEventStream","attrName":"status"}},{"prefix":"alertStreamSchema","category":"","attrType":"string","attrDescription":"","attrValueResolver":"","tags":{"application":"oozieAuditLog","streamName":"oozieSecurityLogEventStream","attrName":"errormessage"}},{"prefix":"alertStreamSchema","category":"","attrType":"string","attrDescription":"","attrValueResolver":"","tags":{"application":"oozieAud
 itLog","streamName":"oozieSecurityLogEventStream","attrName":"sensitivityType"}},{"prefix":"alertStreamSchema","category":"","attrType":"string","attrDescription":"","attrValueResolver":"","tags":{"application":"oozieAuditLog","streamName":"oozieSecurityLogEventStream","attrName":"parameter"}}]'
+
+
+#####################################################################
 #     Import notification plugin configuration into Eagle Service   #
 #####################################################################
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/entity/OozieResourceEntity.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/entity/OozieResourceEntity.java b/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/entity/OozieResourceEntity.java
new file mode 100644
index 0000000..0506dd2
--- /dev/null
+++ b/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/entity/OozieResourceEntity.java
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.security.entity;
+
+import com.google.common.base.Objects;
+
+import java.io.Serializable;
+
+public class OozieResourceEntity implements Serializable {
+    private String jobId;
+    private String name;
+    private String sensitiveType;
+
+    public OozieResourceEntity(String jobId, String name, String sensitiveType) {
+        this.jobId = jobId;
+        this.name = name;
+        this.sensitiveType = sensitiveType;
+    }
+
+    public OozieResourceEntity(String jobId, String name) {
+        this(jobId,name,null);
+    }
+
+    public String getJobId() {
+        return jobId;
+    }
+
+    public void setJobId(String jobId) {
+        this.jobId = jobId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getSensitiveType() {
+        return sensitiveType;
+    }
+
+    public void setSensitiveType(String sensitiveType) {
+        this.sensitiveType = sensitiveType;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (obj == null || getClass() != obj.getClass()) {
+            return false;
+        }
+        final OozieResourceEntity other = (OozieResourceEntity) obj;
+        return Objects.equal(this.jobId, other.jobId)
+                && this.name.equals(other.name)
+                && this.sensitiveType.equals(other.sensitiveType);
+    }
+
+    @Override
+    public String toString() {
+        return "OozieResourceEntity{" +
+                "jobId='" + jobId + '\'' +
+                ", name='" + name + '\'' +
+                ", sensitiveType='" + sensitiveType + '\'' +
+                '}';
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/entity/OozieResourceSensitivityAPIEntity.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/entity/OozieResourceSensitivityAPIEntity.java b/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/entity/OozieResourceSensitivityAPIEntity.java
new file mode 100644
index 0000000..82953f5
--- /dev/null
+++ b/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/entity/OozieResourceSensitivityAPIEntity.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.security.entity;
+
+import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
+import org.apache.eagle.log.entity.meta.*;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
+@Table("oozieResourceSensitivity")
+@ColumnFamily("f")
+@Prefix("oozieResourceSensitivity")
+@Service("OozieResourceSensitivityService")
+@TimeSeries(false)
+@Tags({"site", "oozieResource"})
+public class OozieResourceSensitivityAPIEntity extends TaggedLogAPIEntity {
+    private static final long serialVersionUID = 2L;
+    /**
+     * sensitivityType can be multi-value attribute, and values can be separated by "|"
+     */
+    @Column("a")
+    private String sensitivityType;
+
+    public String getSensitivityType() {
+        return sensitivityType;
+    }
+
+    public void setSensitivityType(String sensitivityType) {
+        this.sensitivityType = sensitivityType;
+        valueChanged("sensitivityType");
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/entity/SecurityEntityRepository.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/entity/SecurityEntityRepository.java b/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/entity/SecurityEntityRepository.java
index a313983..5d63690 100644
--- a/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/entity/SecurityEntityRepository.java
+++ b/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/entity/SecurityEntityRepository.java
@@ -28,5 +28,6 @@ public class SecurityEntityRepository extends EntityRepository {
         entitySet.add(IPZoneEntity.class);
         entitySet.add(HdfsUserCommandPatternEntity.class);
         entitySet.add(HiveResourceSensitivityAPIEntity.class);
+        entitySet.add(OozieResourceSensitivityAPIEntity.class);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-common/src/test/java/org/apache/eagle/security/crawler/audit/TestMetaDataAccessConfigRepo.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-common/src/test/java/org/apache/eagle/security/crawler/audit/TestMetaDataAccessConfigRepo.java b/eagle-security/eagle-security-common/src/test/java/org/apache/eagle/security/crawler/audit/TestMetaDataAccessConfigRepo.java
index 3306c40..93deeab 100644
--- a/eagle-security/eagle-security-common/src/test/java/org/apache/eagle/security/crawler/audit/TestMetaDataAccessConfigRepo.java
+++ b/eagle-security/eagle-security-common/src/test/java/org/apache/eagle/security/crawler/audit/TestMetaDataAccessConfigRepo.java
@@ -60,5 +60,16 @@ public class TestMetaDataAccessConfigRepo {
             appConfig = config.getConfig(EagleConfigConstants.APP_CONFIG);
             Assert.assertTrue(appConfig.getString("envContextConfig.mode").equals("cluster"));
         }
+
+        String oozieConfigStr = "classification.accessType=oozie_api\nclassification.oozieUrl=http://localhost:11000/oozie\nclassification.filter=status=RUNNING\nclassification.authType=SIMPLE";
+        config = ConfigFactory.parseString(oozieConfigStr,options);
+        Config oozieConfig = null;
+        if(config.hasPath(EagleConfigConstants.CLASSIFICATION_CONFIG)) {
+            oozieConfig = config.getConfig(EagleConfigConstants.CLASSIFICATION_CONFIG);
+            Assert.assertTrue(oozieConfig.getString("accessType").equals("oozie_api"));
+            Assert.assertTrue(oozieConfig.getString("oozieUrl").equals("http://localhost:11000/oozie"));
+            Assert.assertTrue(oozieConfig.getString("filter").equals("status=RUNNING"));
+            Assert.assertTrue(oozieConfig.getString("authType").equals("SIMPLE"));
+        }
     }
-}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-hive-web/src/main/java/org/apache/eagle/service/security/hive/dao/HiveSensitivityMetadataDAOImpl.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hive-web/src/main/java/org/apache/eagle/service/security/hive/dao/HiveSensitivityMetadataDAOImpl.java b/eagle-security/eagle-security-hive-web/src/main/java/org/apache/eagle/service/security/hive/dao/HiveSensitivityMetadataDAOImpl.java
index 90ee845..96f3f27 100644
--- a/eagle-security/eagle-security-hive-web/src/main/java/org/apache/eagle/service/security/hive/dao/HiveSensitivityMetadataDAOImpl.java
+++ b/eagle-security/eagle-security-hive-web/src/main/java/org/apache/eagle/service/security/hive/dao/HiveSensitivityMetadataDAOImpl.java
@@ -17,9 +17,7 @@
 package org.apache.eagle.service.security.hive.dao;
 
 import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import org.apache.eagle.log.entity.ListQueryAPIResponseEntity;
 import org.apache.eagle.service.generic.GenericEntityServiceResource;
-import org.apache.eagle.service.generic.ListQueryResource;
 import org.apache.eagle.security.entity.HiveResourceSensitivityAPIEntity;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-hive-web/src/main/java/org/apache/eagle/service/security/hive/resolver/HiveMetadataResolver.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hive-web/src/main/java/org/apache/eagle/service/security/hive/resolver/HiveMetadataResolver.java b/eagle-security/eagle-security-hive-web/src/main/java/org/apache/eagle/service/security/hive/resolver/HiveMetadataResolver.java
index fad679d..29ea183 100644
--- a/eagle-security/eagle-security-hive-web/src/main/java/org/apache/eagle/service/security/hive/resolver/HiveMetadataResolver.java
+++ b/eagle-security/eagle-security-hive-web/src/main/java/org/apache/eagle/service/security/hive/resolver/HiveMetadataResolver.java
@@ -35,8 +35,6 @@ public class HiveMetadataResolver implements AttributeResolvable<GenericAttribut
 	private final static Logger LOG = LoggerFactory.getLogger(HiveMetadataResolver.class);
     private final static String HIVE_ATTRIBUTE_RESOLVE_FORMAT_HINT =
             "hive metadata resolve must be {\"site\":\"${site}\", \"query\"=\"/{db}/{table}/{column}\"}";
-    private HiveSensitivityMetadataDAOImpl dao = new HiveSensitivityMetadataDAOImpl();
-    private Map<String, Map<String, String>> maps = dao.getAllHiveSensitivityMap();
 
     @Override
     public List<String> resolve(GenericAttributeResolveRequest request) throws AttributeResolveException {

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-oozie-auditlog/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-auditlog/pom.xml b/eagle-security/eagle-security-oozie-auditlog/pom.xml
new file mode 100644
index 0000000..b03eafc
--- /dev/null
+++ b/eagle-security/eagle-security-oozie-auditlog/pom.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ /*
+  ~  * Licensed to the Apache Software Foundation (ASF) under one or more
+  ~  * contributor license agreements.  See the NOTICE file distributed with
+  ~  * this work for additional information regarding copyright ownership.
+  ~  * The ASF licenses this file to You under the Apache License, Version 2.0
+  ~  * (the "License"); you may not use this file except in compliance with
+  ~  * the License.  You may obtain a copy of the License at
+  ~  *
+  ~  *    http://www.apache.org/licenses/LICENSE-2.0
+  ~  *
+  ~  * Unless required by applicable law or agreed to in writing, software
+  ~  * distributed under the License is distributed on an "AS IS" BASIS,
+  ~  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  * See the License for the specific language governing permissions and
+  ~  * limitations under the License.
+  ~  */
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>eagle-security-parent</artifactId>
+        <groupId>org.apache.eagle</groupId>
+        <version>0.4.0-incubating-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>eagle-security-oozie-auditlog</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.eagle</groupId>
+            <artifactId>eagle-security-common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-oozie-auditlog/src/main/java/org/apache/eagle/security/oozie/parse/OozieAuditLogKafkaDeserializer.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-auditlog/src/main/java/org/apache/eagle/security/oozie/parse/OozieAuditLogKafkaDeserializer.java b/eagle-security/eagle-security-oozie-auditlog/src/main/java/org/apache/eagle/security/oozie/parse/OozieAuditLogKafkaDeserializer.java
new file mode 100644
index 0000000..06d6a3e
--- /dev/null
+++ b/eagle-security/eagle-security-oozie-auditlog/src/main/java/org/apache/eagle/security/oozie/parse/OozieAuditLogKafkaDeserializer.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.eagle.security.oozie.parse;
+
+
+import org.apache.eagle.dataproc.impl.storm.kafka.SpoutKafkaMessageDeserializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Map;
+import java.util.Properties;
+import java.util.TreeMap;
+
+
+public class OozieAuditLogKafkaDeserializer implements SpoutKafkaMessageDeserializer {
+    private static Logger LOG = LoggerFactory.getLogger(OozieAuditLogKafkaDeserializer.class);
+    private Properties props;
+
+    public OozieAuditLogKafkaDeserializer(Properties props){
+        this.props = props;
+    }
+
+    @Override
+    public Object deserialize(byte[] arg0) {
+        String logLine = new String(arg0);
+
+        OozieAuditLogParser parser = new OozieAuditLogParser();
+        OozieAuditLogObject entity = null;
+        try{
+            entity = parser.parse(logLine);
+        }catch(Exception ex){
+            LOG.error("Failing oozie parse audit log message", ex);
+        }
+        if(entity == null){
+            LOG.warn("Event ignored as it can't be correctly parsed, the log is ", logLine);
+            return null;
+        }
+        Map<String, Object> map = new TreeMap<String, Object>();
+        map.put("timestamp", entity.timestamp);
+        map.put("level", entity.level);
+        map.put("ip", entity.ip);
+        map.put("user", entity.user);
+        map.put("group", entity.group);
+        map.put("app", entity.app);
+        map.put("jobId", entity.jobId);
+        map.put("operation", entity.operation);
+        map.put("parameter", entity.parameter);
+        map.put("status", entity.status);
+        map.put("httpcode", entity.httpcode);
+        map.put("errorcode", entity.errorcode);
+        map.put("errormessage", entity.errormessage);
+
+        return map;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-oozie-auditlog/src/main/java/org/apache/eagle/security/oozie/parse/OozieAuditLogObject.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-auditlog/src/main/java/org/apache/eagle/security/oozie/parse/OozieAuditLogObject.java b/eagle-security/eagle-security-oozie-auditlog/src/main/java/org/apache/eagle/security/oozie/parse/OozieAuditLogObject.java
new file mode 100644
index 0000000..05ab77f
--- /dev/null
+++ b/eagle-security/eagle-security-oozie-auditlog/src/main/java/org/apache/eagle/security/oozie/parse/OozieAuditLogObject.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.eagle.security.oozie.parse;
+
+public class OozieAuditLogObject {
+
+    public long timestamp;
+    public String level = "";
+    public String ip = "";
+    public String user = "";
+    public String group = "";
+    public String app = "";
+    public String jobId = "";
+    public String operation = "";
+    public String parameter = "";
+    public String status = "";
+    public String httpcode = "";
+    public String errorcode = "";
+    public String errormessage = "";
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-oozie-auditlog/src/main/java/org/apache/eagle/security/oozie/parse/OozieAuditLogParser.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-auditlog/src/main/java/org/apache/eagle/security/oozie/parse/OozieAuditLogParser.java b/eagle-security/eagle-security-oozie-auditlog/src/main/java/org/apache/eagle/security/oozie/parse/OozieAuditLogParser.java
new file mode 100644
index 0000000..56228f8
--- /dev/null
+++ b/eagle-security/eagle-security-oozie-auditlog/src/main/java/org/apache/eagle/security/oozie/parse/OozieAuditLogParser.java
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.eagle.security.oozie.parse;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.eagle.common.DateTimeUtil;
+
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class OozieAuditLogParser {
+
+    public static final String MESSAGE_SPLIT_FLAG = "( - )";
+    private static final String COMMON_REGEX = "\\s([^\\]]*\\])";
+    public static final String ALLOW_ALL_REGEX = "(.*)";
+    private static final String TIMESTAMP_REGEX = "(\\d\\d\\d\\d-\\d\\d-\\d\\d \\d\\d:\\d\\d:\\d\\d,\\d\\d\\d)";
+    private static final String WHITE_SPACE_REGEX = "\\s+";
+    private static final String LOG_LEVEL_REGEX = "(\\w+)";
+    private static final String OOZIEAUDIT_FLAG = "(\\w+:\\d+)";
+    private static final String PREFIX_REGEX = TIMESTAMP_REGEX + WHITE_SPACE_REGEX + LOG_LEVEL_REGEX
+            + WHITE_SPACE_REGEX;
+    private final static String IP = "IP";
+    private final static String USER = "USER";
+    private final static String GROUP = "GROUP";
+    private final static String APP = "APP";
+    private final static String JOBID = "JOBID";
+    private final static String OPERATION = "OPERATION";
+    private final static String PARAMETER = "PARAMETER";
+    private final static String STATUS = "STATUS";
+    private final static String HTTPCODE = "HTTPCODE";
+    private final static String ERRORCODE = "ERRORCODE";
+    private final static String ERRORMESSAGE = "ERRORMESSAGE";
+    private static final Pattern LOG_PATTERN = constructPattern();
+
+    public OozieAuditLogObject parse(String logLine) throws Exception {
+
+        OozieAuditLogObject oozieAuditLogObject = new OozieAuditLogObject();
+        Matcher matcher = LOG_PATTERN.matcher(logLine);
+        if (!matcher.matches()) {
+            return null;
+        }
+        applyValueTo(oozieAuditLogObject, matcher);
+
+        return oozieAuditLogObject;
+    }
+
+
+    private static Pattern constructPattern() {
+        List<String> patterns = new ArrayList<String>(11);
+        patterns.add(IP);
+        patterns.add(USER);
+        patterns.add(GROUP);
+        patterns.add(APP);
+        patterns.add(JOBID);
+        patterns.add(OPERATION);
+        patterns.add(PARAMETER);
+        patterns.add(STATUS);
+        patterns.add(HTTPCODE);
+        patterns.add(ERRORCODE);
+        patterns.add(ERRORMESSAGE);
+
+        StringBuilder sb = new StringBuilder();
+        sb.append(PREFIX_REGEX + OOZIEAUDIT_FLAG);
+        sb.append(MESSAGE_SPLIT_FLAG);
+        for (int i = 0; i < patterns.size(); i++) {
+            sb.append("(");
+            sb.append(patterns.get(i) + COMMON_REGEX);
+            sb.append(")");
+            sb.append(ALLOW_ALL_REGEX);
+        }
+        String rs = StringUtils.removeEnd(sb.toString(), ALLOW_ALL_REGEX);
+        return Pattern.compile(rs);
+    }
+
+    private void applyValueTo(OozieAuditLogObject oozieAuditLogObject, Matcher matcher) throws ParseException {
+        oozieAuditLogObject.timestamp = DateTimeUtil.humanDateToMilliseconds(matcher.group(1));
+        oozieAuditLogObject.level = matcher.group(2);
+        oozieAuditLogObject.ip = StringUtils.removeEnd(StringUtils.removeStart(matcher.group(6), "["), "]");
+        oozieAuditLogObject.user = StringUtils.removeEnd(StringUtils.removeStart(matcher.group(9), "["), "]");
+        oozieAuditLogObject.group = StringUtils.removeEnd(StringUtils.removeStart(matcher.group(12), "["), "]");
+        oozieAuditLogObject.app = StringUtils.removeEnd(StringUtils.removeStart(matcher.group(15), "["), "]");
+        oozieAuditLogObject.jobId = StringUtils.removeEnd(StringUtils.removeStart(matcher.group(18), "["), "]");
+        oozieAuditLogObject.operation = StringUtils.removeEnd(StringUtils.removeStart(matcher.group(21), "["), "]");
+        oozieAuditLogObject.parameter = StringUtils.removeEnd(StringUtils.removeStart(matcher.group(24), "["), "]");
+        oozieAuditLogObject.status = StringUtils.removeEnd(StringUtils.removeStart(matcher.group(27), "["), "]");
+        oozieAuditLogObject.httpcode = StringUtils.removeEnd(StringUtils.removeStart(matcher.group(30), "["), "]");
+        oozieAuditLogObject.errorcode = StringUtils.removeEnd(StringUtils.removeStart(matcher.group(33), "["), "]");
+        oozieAuditLogObject.errormessage = StringUtils.removeEnd(StringUtils.removeStart(matcher.group(36), "["), "]");
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-oozie-auditlog/src/main/java/org/apache/eagle/security/oozie/parse/OozieAuditLogProcessorMain.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-auditlog/src/main/java/org/apache/eagle/security/oozie/parse/OozieAuditLogProcessorMain.java b/eagle-security/eagle-security-oozie-auditlog/src/main/java/org/apache/eagle/security/oozie/parse/OozieAuditLogProcessorMain.java
new file mode 100644
index 0000000..85dfa74
--- /dev/null
+++ b/eagle-security/eagle-security-oozie-auditlog/src/main/java/org/apache/eagle/security/oozie/parse/OozieAuditLogProcessorMain.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.eagle.security.oozie.parse;
+
+import org.apache.eagle.dataproc.impl.storm.kafka.KafkaSourcedSpoutProvider;
+import org.apache.eagle.datastream.ExecutionEnvironments;
+import org.apache.eagle.datastream.storm.StormExecutionEnvironment;
+import org.apache.eagle.security.oozie.parse.sensitivity.OozieResourceSensitivityDataJoinExecutor;
+
+public class OozieAuditLogProcessorMain {
+    public static void main(String[] args) throws Exception {
+        StormExecutionEnvironment env = ExecutionEnvironments.getStorm(args);
+        env.fromSpout(new KafkaSourcedSpoutProvider()).withOutputFields(1).nameAs("kafkaMsgConsumer")
+                .flatMap(new OozieResourceSensitivityDataJoinExecutor())
+                .alertWithConsumer("oozieSecurityLogEventStream", "oozieAuditLogAlertExecutor");
+        env.execute();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-oozie-auditlog/src/main/java/org/apache/eagle/security/oozie/parse/sensitivity/OozieResourceSensitivityDataJoinExecutor.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-auditlog/src/main/java/org/apache/eagle/security/oozie/parse/sensitivity/OozieResourceSensitivityDataJoinExecutor.java b/eagle-security/eagle-security-oozie-auditlog/src/main/java/org/apache/eagle/security/oozie/parse/sensitivity/OozieResourceSensitivityDataJoinExecutor.java
new file mode 100644
index 0000000..51f11af
--- /dev/null
+++ b/eagle-security/eagle-security-oozie-auditlog/src/main/java/org/apache/eagle/security/oozie/parse/sensitivity/OozieResourceSensitivityDataJoinExecutor.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.eagle.security.oozie.parse.sensitivity;
+
+import com.typesafe.config.Config;
+import org.apache.eagle.datastream.Collector;
+import org.apache.eagle.datastream.JavaStormStreamExecutor2;
+import org.apache.eagle.security.entity.OozieResourceSensitivityAPIEntity;
+import org.apache.eagle.security.util.ExternalDataCache;
+import org.apache.eagle.security.util.ExternalDataJoiner;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import scala.Tuple2;
+
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+import java.util.regex.Pattern;
+
+public class OozieResourceSensitivityDataJoinExecutor extends JavaStormStreamExecutor2<String, Map> {
+    private final static Logger LOG = LoggerFactory.getLogger(OozieResourceSensitivityDataJoinExecutor.class);
+    private Config config;
+
+    @Override
+    public void prepareConfig(Config config) {
+        this.config = config;
+    }
+
+    @Override
+    public void init() {
+        // start hive resource data polling
+        try {
+            ExternalDataJoiner joiner = new ExternalDataJoiner(OozieResourceSensitivityPollingJob.class, config);
+            joiner.start();
+        } catch (Exception ex) {
+            LOG.error("Fail to bring up quartz scheduler.", ex);
+            throw new IllegalStateException(ex);
+        }
+    }
+
+    @Override
+    public void flatMap(List<Object> input, Collector<Tuple2<String, Map>> outputCollector) {
+        @SuppressWarnings("unchecked")
+        Map<String, Object> event = (Map<String, Object>) input.get(0);
+        @SuppressWarnings("unchecked")
+        Map<String, OozieResourceSensitivityAPIEntity> map =
+                (Map<String, OozieResourceSensitivityAPIEntity>) ExternalDataCache
+                        .getInstance()
+                        .getJobResult(OozieResourceSensitivityPollingJob.class);
+        LOG.info(">>>> event: " + event + " >>>> map: " + map);
+
+        String resource = (String) event.get("jobId");
+
+        OozieResourceSensitivityAPIEntity sensitivityEntity = null;
+
+        if (map != null && resource != "") {
+            for (String key : map.keySet()) {
+                Pattern pattern = Pattern.compile(key, Pattern.CASE_INSENSITIVE);
+                if (pattern.matcher(resource).find()) {
+                    sensitivityEntity = map.get(key);
+                    break;
+                }
+            }
+        }
+        Map<String, Object> newEvent = new TreeMap<String, Object>(event);
+        newEvent.put("sensitivityType", sensitivityEntity == null ? "NA" : sensitivityEntity.getSensitivityType());
+        //newEvent.put("jobId", resource);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("After oozie resource sensitivity lookup: " + newEvent);
+        }
+        LOG.info("After oozie resource sensitivity lookup: " + newEvent);
+        outputCollector.collect(new Tuple2(newEvent.get("user"), newEvent));
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-oozie-auditlog/src/main/java/org/apache/eagle/security/oozie/parse/sensitivity/OozieResourceSensitivityPollingJob.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-auditlog/src/main/java/org/apache/eagle/security/oozie/parse/sensitivity/OozieResourceSensitivityPollingJob.java b/eagle-security/eagle-security-oozie-auditlog/src/main/java/org/apache/eagle/security/oozie/parse/sensitivity/OozieResourceSensitivityPollingJob.java
new file mode 100644
index 0000000..3ef2934
--- /dev/null
+++ b/eagle-security/eagle-security-oozie-auditlog/src/main/java/org/apache/eagle/security/oozie/parse/sensitivity/OozieResourceSensitivityPollingJob.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.eagle.security.oozie.parse.sensitivity;
+
+import com.google.common.base.Function;
+import com.google.common.collect.Maps;
+import org.apache.eagle.security.entity.OozieResourceSensitivityAPIEntity;
+import org.apache.eagle.security.util.AbstractResourceSensitivityPollingJob;
+import org.apache.eagle.security.util.ExternalDataCache;
+import org.quartz.Job;
+import org.quartz.JobDataMap;
+import org.quartz.JobExecutionContext;
+import org.quartz.JobExecutionException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+import java.util.Map;
+
+public class OozieResourceSensitivityPollingJob extends AbstractResourceSensitivityPollingJob implements Job {
+    private final static Logger LOG = LoggerFactory.getLogger(OozieResourceSensitivityPollingJob.class);
+
+    @Override
+    public void execute(JobExecutionContext context)
+            throws JobExecutionException {
+        JobDataMap jobDataMap = context.getJobDetail().getJobDataMap();
+        try {
+            List<OozieResourceSensitivityAPIEntity>
+                    oozieResourceSensitivity = load(jobDataMap, "OozieResourceSensitivityService");
+            if (oozieResourceSensitivity == null) {
+                LOG.warn("Oozie resource sensitivity information is empty");
+                return;
+            }
+            Map<String, OozieResourceSensitivityAPIEntity> map = Maps.uniqueIndex(
+                    oozieResourceSensitivity,
+                    new Function<OozieResourceSensitivityAPIEntity, String>() {
+                        @Override
+                        public String apply(OozieResourceSensitivityAPIEntity input) {
+                            return input.getTags().get("oozieResource");
+                        }
+                    });
+            ExternalDataCache.getInstance().setJobResult(getClass(), map);
+        } catch (Exception ex) {
+            LOG.error("Fail to load oozie resource sensitivity data", ex);
+        }
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-oozie-auditlog/src/main/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-auditlog/src/main/resources/application.conf b/eagle-security/eagle-security-oozie-auditlog/src/main/resources/application.conf
new file mode 100644
index 0000000..c9208c3
--- /dev/null
+++ b/eagle-security/eagle-security-oozie-auditlog/src/main/resources/application.conf
@@ -0,0 +1,66 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{
+  "envContextConfig" : {
+    "env" : "storm",
+    "mode" : "local",
+    "topologyName" : "sandbox-oozieAuditLog-topology",
+    "stormConfigFile" : "security-auditlog-storm.yaml",
+    "parallelismConfig" : {
+      "kafkaMsgConsumer" : 1,
+      "oozieAuditLogAlertExecutor*" : 1
+    }
+  },
+  "dataSourceConfig": {
+    "topic" : "sandbox_oozie_audit_log",
+    "zkConnection" : "sandbox.hortonworks.com:2181",
+    "zkConnectionTimeoutMS" : 15000,
+    "consumerGroupId" : "EagleConsumer",
+    "fetchSize" : 1048586,
+    "deserializerClass" : "org.apache.eagle.security.oozie.parse.OozieAuditLogKafkaDeserializer",
+    "transactionZKServers" : "sandbox.hortonworks.com",
+    "transactionZKPort" : 2181,
+    "transactionZKRoot" : "/consumers",
+    "consumerGroupId" : "eagle.ooziesecurity.consumer",
+    "transactionStateUpdateMS" : 2000
+  },
+  "alertExecutorConfigs" : {
+    "hbaseSecurityLogAlertExecutor" : {
+      "parallelism" : 1,
+      "partitioner" : "org.apache.eagle.policy.DefaultPolicyPartitioner"
+      "needValidation" : "true"
+    }
+  },
+  "eagleProps" : {
+    "site" : "sandbox",
+    "application": "oozieAuditLog",
+    "dataJoinPollIntervalSec" : 30,
+    "mailHost" : "mailHost.com",
+    "mailSmtpPort":"25",
+    "mailDebug" : "true",
+    "eagleService": {
+      "host": "localhost",
+      "port": 9098
+      "username": "admin",
+      "password": "secret"
+    }
+  },
+  "dynamicConfigSource" : {
+    "enabled" : true,
+    "initDelayMillis" : 0,
+    "delayMillis" : 30000
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-oozie-auditlog/src/test/java/org/apache/eagle/security/oozie/parse/TestOozieAuditLogParser.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-auditlog/src/test/java/org/apache/eagle/security/oozie/parse/TestOozieAuditLogParser.java b/eagle-security/eagle-security-oozie-auditlog/src/test/java/org/apache/eagle/security/oozie/parse/TestOozieAuditLogParser.java
new file mode 100644
index 0000000..b2546cb
--- /dev/null
+++ b/eagle-security/eagle-security-oozie-auditlog/src/test/java/org/apache/eagle/security/oozie/parse/TestOozieAuditLogParser.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.eagle.security.oozie.parse;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+
+public class TestOozieAuditLogParser {
+    OozieAuditLogParser parser = new OozieAuditLogParser();
+
+    @Test
+    public void testParser() throws Exception {
+
+
+        String logline = "2016-04-27 15:01:14,526  INFO oozieaudit:520 - IP [192.168.7.199], USER [tangjijun], GROUP [pms], APP [My_Workflow], JOBID [0000000-160427140648764-oozie-oozi-W], " +
+                "OPERATION [start], PARAMETER [0000000-160427140648764-oozie-oozi-W], STATUS [SUCCESS], HTTPCODE [200], ERRORCODE [501], ERRORMESSAGE [no problem]";
+        OozieAuditLogObject obj = parser.parse(logline);
+        Assert.assertEquals("192.168.7.199",obj.ip);
+        Assert.assertEquals("tangjijun",obj.user);
+        Assert.assertEquals("pms",obj.group);
+        Assert.assertEquals("My_Workflow",obj.app);
+        Assert.assertEquals("0000000-160427140648764-oozie-oozi-W",obj.jobId);
+        Assert.assertEquals("start",obj.operation);
+        Assert.assertEquals("0000000-160427140648764-oozie-oozi-W",obj.parameter);
+        Assert.assertEquals("SUCCESS",obj.status);
+        Assert.assertEquals("200",obj.httpcode);
+        Assert.assertEquals("501",obj.errorcode);
+        Assert.assertEquals("no problem",obj.errormessage);
+        Assert.assertEquals("INFO",obj.level);
+        Assert.assertEquals(1461769274526L,obj.timestamp);
+
+    }
+    @Test
+    public void testParserNotMatch() throws Exception {
+        String logline ="   2016-04-27 16:11:37,156  INFO oozieaudit:520 - Proxy user [hue] DoAs user [tangjijun] Request [http://zhangqihui:11000/oozie/v1/job/0000001-160427140648764-oozie-oozi-W?action=rerun&timezone=America%2FLos_Angeles&user.name=hue&doAs=tangjijun]";
+        OozieAuditLogObject obj = parser.parse(logline);
+        Assert.assertTrue(obj == null);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-oozie-web/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-web/pom.xml b/eagle-security/eagle-security-oozie-web/pom.xml
new file mode 100644
index 0000000..ac11b7c
--- /dev/null
+++ b/eagle-security/eagle-security-oozie-web/pom.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~    http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+         xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.eagle</groupId>
+        <artifactId>eagle-security-parent</artifactId>
+        <version>0.4.0-incubating-SNAPSHOT</version>
+    </parent>
+    <artifactId>eagle-security-oozie-web</artifactId>
+    <name>eagle-security-oozie-web</name>
+    <url>http://maven.apache.org</url>
+    <properties>
+        <powermock.version>1.6.5</powermock.version>
+        <easymock.version>3.4</easymock.version>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.eagle</groupId>
+            <artifactId>eagle-entity-base</artifactId>
+            <version>${project.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>log4j-over-slf4j</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.eagle</groupId>
+            <artifactId>eagle-service-base</artifactId>
+            <version>${project.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>log4j-over-slf4j</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.jersey</groupId>
+            <artifactId>jersey-server</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.eagle</groupId>
+            <artifactId>eagle-security-common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.oozie</groupId>
+            <artifactId>oozie-client</artifactId>
+            <version>4.1.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.powermock</groupId>
+            <artifactId>powermock-module-junit4</artifactId>
+            <version>${powermock.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.powermock</groupId>
+            <artifactId>powermock-api-easymock</artifactId>
+            <version>${powermock.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.easymock</groupId>
+            <artifactId>easymock</artifactId>
+            <version>${easymock.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/OozieResourceSensitivityDataJoiner.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/OozieResourceSensitivityDataJoiner.java b/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/OozieResourceSensitivityDataJoiner.java
new file mode 100644
index 0000000..4bfe814
--- /dev/null
+++ b/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/OozieResourceSensitivityDataJoiner.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.service.security.oozie;
+
+import org.apache.eagle.security.entity.OozieResourceEntity;
+import org.apache.eagle.service.security.oozie.dao.OozieSensitivityMetadataDAO;
+import org.apache.eagle.service.security.oozie.dao.OozieSensitivityMetadataDAOImpl;
+import org.apache.oozie.client.CoordinatorJob;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public class OozieResourceSensitivityDataJoiner {
+
+    private final static Logger LOG = LoggerFactory.getLogger(OozieResourceSensitivityDataJoiner.class);
+
+    public List<OozieResourceEntity> joinOozieResourceSensitivity(String site, List<CoordinatorJob> coordinatorJobs) {
+
+        OozieSensitivityMetadataDAO oozieSensitivityMetadataDAO = new OozieSensitivityMetadataDAOImpl();
+        Map<String, String> sensitivityMap = oozieSensitivityMetadataDAO.getOozieSensitivityMap(site);
+        LOG.info("Joining Resource with Sensitivity data ..");
+        List<OozieResourceEntity> result = new ArrayList<>();
+        for (CoordinatorJob eachJob : coordinatorJobs) {
+            OozieResourceEntity entity = new OozieResourceEntity(eachJob.getId(), eachJob.getAppName(), sensitivityMap.get(eachJob.getId()));
+            result.add(entity);
+        }
+        return result;
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/BadOozieMetadataAccessConfigException.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/BadOozieMetadataAccessConfigException.java b/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/BadOozieMetadataAccessConfigException.java
new file mode 100644
index 0000000..7c8b650
--- /dev/null
+++ b/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/BadOozieMetadataAccessConfigException.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.service.security.oozie.dao;
+
+public class BadOozieMetadataAccessConfigException extends RuntimeException{
+    public BadOozieMetadataAccessConfigException(Exception ex){
+        super(ex);
+    }
+
+    public BadOozieMetadataAccessConfigException(String msg){
+        super(msg);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieMetadataAccessConfig.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieMetadataAccessConfig.java b/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieMetadataAccessConfig.java
new file mode 100644
index 0000000..d2e6a76
--- /dev/null
+++ b/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieMetadataAccessConfig.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.service.security.oozie.dao;
+
+import com.typesafe.config.Config;
+
+public class OozieMetadataAccessConfig {
+    private String accessType;
+    private String oozieUrl;
+    private String filter;
+    private String authType;
+
+    public String getAccessType() {
+        return accessType;
+    }
+
+    public void setAccessType(String accessType) {
+        this.accessType = accessType;
+    }
+
+    public String getFilter() {
+        return filter;
+    }
+
+    public void setFilter(String filter) {
+        this.filter = filter;
+    }
+
+    public String getAuthType() {
+        return authType;
+    }
+
+    public void setAuthType(String authType) {
+        this.authType = authType;
+    }
+
+    public String getOozieUrl() {
+        return oozieUrl;
+    }
+
+    public void setOozieUrl(String oozieUrl) {
+        this.oozieUrl = oozieUrl;
+    }
+
+    @Override
+    public String toString() {
+        return "accessType:" + accessType + ",oozieUrl:" + oozieUrl + ",filter:" + filter + ",authType:" + authType;
+    }
+
+    public final static class OOZIECONF {
+        public final static String ACCESSTYPE = "accessType";
+        public final static String OOZIEURL = "oozieUrl";
+        public final static String FILTER = "filter";
+        public final static String AUTHTYPE = "authType";
+    }
+
+    public static OozieMetadataAccessConfig config2Entity(Config config) {
+        OozieMetadataAccessConfig oozieconf = new OozieMetadataAccessConfig();
+        if(config.hasPath(OOZIECONF.ACCESSTYPE)) {
+            oozieconf.setAccessType(config.getString(OOZIECONF.ACCESSTYPE));
+        }
+        if(config.hasPath(OOZIECONF.OOZIEURL)) {
+            oozieconf.setOozieUrl(config.getString(OOZIECONF.OOZIEURL));
+        }
+        if(config.hasPath(OOZIECONF.FILTER)) {
+            oozieconf.setFilter(config.getString(OOZIECONF.FILTER));
+        }
+        if(config.hasPath(OOZIECONF.AUTHTYPE)) {
+            oozieconf.setAuthType(config.getString(OOZIECONF.AUTHTYPE));
+        }
+        return oozieconf;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieMetadataAccessConfigDAO.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieMetadataAccessConfigDAO.java b/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieMetadataAccessConfigDAO.java
new file mode 100644
index 0000000..7a253fb
--- /dev/null
+++ b/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieMetadataAccessConfigDAO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.service.security.oozie.dao;
+
+public interface OozieMetadataAccessConfigDAO {
+
+    OozieMetadataAccessConfig getConfig(String site) throws Exception;
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieMetadataAccessConfigDAOImpl.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieMetadataAccessConfigDAOImpl.java b/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieMetadataAccessConfigDAOImpl.java
new file mode 100644
index 0000000..8cab617
--- /dev/null
+++ b/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieMetadataAccessConfigDAOImpl.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.service.security.oozie.dao;
+
+import com.typesafe.config.Config;
+import org.apache.eagle.security.resolver.MetadataAccessConfigRepo;
+
+public class OozieMetadataAccessConfigDAOImpl implements OozieMetadataAccessConfigDAO{
+    @Override
+    public OozieMetadataAccessConfig getConfig(String site) throws Exception{
+        MetadataAccessConfigRepo repo = new MetadataAccessConfigRepo();
+        Config config = repo.getConfig("oozieAuditLog", site);
+        return OozieMetadataAccessConfig.config2Entity(config);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieMetadataDAO.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieMetadataDAO.java b/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieMetadataDAO.java
new file mode 100644
index 0000000..c8461a9
--- /dev/null
+++ b/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieMetadataDAO.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.service.security.oozie.dao;
+
+import org.apache.oozie.client.CoordinatorJob;
+
+import java.util.List;
+
+public interface OozieMetadataDAO {
+    List<CoordinatorJob> getCoordJobs() throws Exception;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieMetadataDAOImpl.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieMetadataDAOImpl.java b/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieMetadataDAOImpl.java
new file mode 100644
index 0000000..65b4bcb
--- /dev/null
+++ b/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieMetadataDAOImpl.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.service.security.oozie.dao;
+
+import org.apache.oozie.client.AuthOozieClient;
+import org.apache.oozie.client.CoordinatorJob;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Collections;
+import java.util.List;
+
+public class OozieMetadataDAOImpl implements OozieMetadataDAO {
+
+
+    private static Logger LOG = LoggerFactory.getLogger(OozieMetadataDAOImpl.class);
+
+    private OozieMetadataAccessConfig config;
+
+    public OozieMetadataDAOImpl(OozieMetadataAccessConfig config) {
+        if (config.getAccessType() == null)
+            throw new BadOozieMetadataAccessConfigException("access Type is null, options: [oozie_api]");
+        this.config = config;
+    }
+
+    private AuthOozieClient createOozieConnection() throws Exception {
+        AuthOozieClient client = new AuthOozieClient(config.getOozieUrl(), config.getAuthType());
+        return client;
+    }
+
+    @Override
+    public List<CoordinatorJob> getCoordJobs() throws Exception {
+        AuthOozieClient client = createOozieConnection();
+        List<CoordinatorJob> jobs = client.getCoordJobsInfo(config.getFilter(), 0, Integer.MAX_VALUE);
+        if (jobs == null || jobs.isEmpty()) {
+            return Collections.emptyList();
+        }
+        return jobs;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieSensitivityMetadataDAO.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieSensitivityMetadataDAO.java b/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieSensitivityMetadataDAO.java
new file mode 100644
index 0000000..dc16d01
--- /dev/null
+++ b/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieSensitivityMetadataDAO.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.service.security.oozie.dao;
+
+import java.util.Map;
+
+/**
+ * retrieve oozie sensitivity metadata directly from table
+ */
+public interface OozieSensitivityMetadataDAO {
+    // site to (resource, sensitivityType)
+    Map<String, Map<String, String>> getAllOozieSensitivityMap();
+    // resource to sensitivityType
+    Map<String, String> getOozieSensitivityMap(String site);
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieSensitivityMetadataDAOImpl.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieSensitivityMetadataDAOImpl.java b/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieSensitivityMetadataDAOImpl.java
new file mode 100644
index 0000000..247eb90
--- /dev/null
+++ b/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/dao/OozieSensitivityMetadataDAOImpl.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.service.security.oozie.dao;
+
+import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
+import org.apache.eagle.security.entity.OozieResourceSensitivityAPIEntity;
+import org.apache.eagle.service.generic.GenericEntityServiceResource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class OozieSensitivityMetadataDAOImpl implements OozieSensitivityMetadataDAO{
+    private static Logger LOG = LoggerFactory.getLogger(OozieSensitivityMetadataDAOImpl.class);
+
+    @Override
+    public Map<String, Map<String, String>> getAllOozieSensitivityMap(){
+        GenericEntityServiceResource resource = new GenericEntityServiceResource();
+        /* parameters are: query, startTime, endTime, pageSzie, startRowkey, treeAgg, timeSeries, intervalmin, top, filterIfMissing,
+        * parallel, metricName*/
+        GenericServiceAPIResponseEntity ret = resource.search("OozieResourceSensitivityService[]{*}", null, null, Integer.MAX_VALUE, null, false, false, 0L, 0, false,
+                0, null, false);
+        List<OozieResourceSensitivityAPIEntity> list = (List<OozieResourceSensitivityAPIEntity>) ret.getObj();
+        if( list == null )
+            return Collections.emptyMap();
+        Map<String, Map<String, String>> res = new HashMap<String, Map<String, String>>();
+
+        for(OozieResourceSensitivityAPIEntity entity : list){
+            String site = entity.getTags().get("site");
+            if(entity.getTags().containsKey("oozieResource")) {
+                if(res.get(site) == null){
+                    res.put(site, new HashMap<String, String>());
+                }
+                Map<String, String> resSensitivityMap = res.get(site);
+                resSensitivityMap.put(entity.getTags().get("oozieResource"), entity.getSensitivityType());
+            }
+            else {
+                if(LOG.isDebugEnabled()) {
+                    LOG.debug("An invalid sensitivity entity is detected" + entity);
+                }
+            }
+        }
+        return res;
+    }
+
+    @Override
+    public Map<String, String> getOozieSensitivityMap(String site){
+        GenericEntityServiceResource resource = new GenericEntityServiceResource();
+        String queryFormat = "OozieResourceSensitivityService[@site=\"%s\"]{*}";
+        GenericServiceAPIResponseEntity ret = resource.search(String.format(queryFormat, site), null, null, Integer.MAX_VALUE, null, false, false, 0L, 0, false,
+                0, null, false);
+        List<OozieResourceSensitivityAPIEntity> list = (List<OozieResourceSensitivityAPIEntity>) ret.getObj();
+        if( list == null )
+            return Collections.emptyMap();
+        Map<String, String> resSensitivityMap = new HashMap<String, String>();
+        for(OozieResourceSensitivityAPIEntity entity : list){
+            if(entity.getTags().containsKey("oozieResource")) {
+                resSensitivityMap.put(entity.getTags().get("oozieResource"), entity.getSensitivityType());
+            }
+        }
+        return resSensitivityMap;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/res/OozieMetadataBrowseWebResource.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/res/OozieMetadataBrowseWebResource.java b/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/res/OozieMetadataBrowseWebResource.java
new file mode 100644
index 0000000..e0fe57f
--- /dev/null
+++ b/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/res/OozieMetadataBrowseWebResource.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.service.security.oozie.res;
+
+import org.apache.eagle.security.entity.OozieResourceEntity;
+import org.apache.eagle.service.common.EagleExceptionWrapper;
+import org.apache.eagle.service.security.oozie.OozieResourceSensitivityDataJoiner;
+import org.apache.eagle.service.security.oozie.dao.*;
+import org.apache.oozie.client.CoordinatorJob;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.ws.rs.*;
+import javax.ws.rs.core.MediaType;
+import java.util.*;
+
+@Path("/oozieResource")
+public class OozieMetadataBrowseWebResource {
+
+    private static Logger LOG = LoggerFactory.getLogger(OozieMetadataBrowseWebResource.class);
+
+    @Path("/coordinators")
+    @GET
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    public OozieMetadataBrowseWebResponse getCoordJobs(@QueryParam("site") String site){
+
+        OozieMetadataBrowseWebResponse response = new OozieMetadataBrowseWebResponse();
+        List<CoordinatorJob> coordinators = null;
+        try {
+            OozieMetadataAccessConfig config = new OozieMetadataAccessConfigDAOImpl().getConfig(site);
+            OozieMetadataDAO dao = new OozieMetadataDAOImpl(config);
+            coordinators = dao.getCoordJobs();
+        } catch(Exception ex){
+            LOG.error("fail getting coordinators", ex);
+            response.setException(EagleExceptionWrapper.wrap(ex));
+        }
+        List<OozieResourceEntity> result = new ArrayList<>();
+        OozieResourceSensitivityDataJoiner joiner = new OozieResourceSensitivityDataJoiner();
+        result = joiner.joinOozieResourceSensitivity(site, coordinators);
+        response.setObj(result);
+        return response;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/res/OozieMetadataBrowseWebResponse.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/res/OozieMetadataBrowseWebResponse.java b/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/res/OozieMetadataBrowseWebResponse.java
new file mode 100644
index 0000000..9f5f4ce
--- /dev/null
+++ b/eagle-security/eagle-security-oozie-web/src/main/java/org/apache/eagle/service/security/oozie/res/OozieMetadataBrowseWebResponse.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.service.security.oozie.res;
+
+import org.apache.eagle.security.entity.OozieResourceEntity;
+
+import java.util.List;
+
+public class OozieMetadataBrowseWebResponse {
+    private String exception;
+
+    public List<OozieResourceEntity> getObj() {
+        return obj;
+    }
+
+    public void setObj(List<OozieResourceEntity> obj) {
+        this.obj = obj;
+    }
+
+    private List<OozieResourceEntity> obj;
+
+    public String getException() {
+        return exception;
+    }
+
+    public void setException(String exception) {
+        this.exception = exception;
+    }
+
+}



[35/47] incubator-eagle git commit: EAGLE-319 modify java to jdbc data type modify java to jdbc data type mapping to be compatible with derby DB

Posted by mw...@apache.org.
EAGLE-319 modify java to jdbc data type
modify java to jdbc data type mapping to be compatible with derby DB

Author: Michael
Reviewer: Edward

Closes: #222


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/35535289
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/35535289
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/35535289

Branch: refs/heads/master
Commit: 3553528990c7df136ca1fc24806e58e081e66138
Parents: f5b3102
Author: yonzhang <yo...@gmail.com>
Authored: Thu Jun 16 15:24:26 2016 -0700
Committer: yonzhang <yo...@gmail.com>
Committed: Thu Jun 16 15:24:26 2016 -0700

----------------------------------------------------------------------
 .../eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/35535289/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java
index b98d881..d9b29aa 100644
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java
+++ b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java
@@ -150,7 +150,7 @@ public class JdbcEntityDefinitionManager {
     // Initially bind basic java types with SQL types
     //================================================
     static {
-        registerJdbcType(String.class, Types.LONGVARCHAR);
+        registerJdbcType(String.class, Types.VARCHAR);
         registerJdbcType(Integer.class, Types.INTEGER);
         registerJdbcType(Double.class, Types.DOUBLE);
         registerJdbcType(Float.class, Types.FLOAT);


[36/47] incubator-eagle git commit: EAGLE-339: Automatically create hbase table when initializing

Posted by mw...@apache.org.
EAGLE-339: Automatically create hbase table when initializing

https://github.com/apache/incubator-eagle/pull/240

Author: Zhao, Qingwen <qi...@ebay.com>
Reviewer: Edward, Zhang
Closes #240


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/b49bda14
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/b49bda14
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/b49bda14

Branch: refs/heads/master
Commit: b49bda14cec0c92ff7224f18476fc4456faa93bd
Parents: 3553528
Author: Zhao, Qingwen <qi...@ebay.com>
Authored: Fri Jun 17 14:08:25 2016 +0800
Committer: Zhao, Qingwen <qi...@ebay.com>
Committed: Fri Jun 17 14:08:25 2016 +0800

----------------------------------------------------------------------
 .../src/main/bin/eagle-create-table.rb          |  47 ---------
 .../src/main/bin/eagle-drop-tables.sh           |  26 -----
 eagle-assembly/src/main/bin/eagle-env.sh        |   4 -
 .../src/main/bin/eagle-service-init.sh          |  35 -------
 .../apache/eagle/common/config/EagleConfig.java |   3 +
 .../eagle/common/config/EagleConfigFactory.java |   5 +
 .../storage/hbase/HBaseEntitySchemaManager.java | 102 +++++++++++++++++++
 .../eagle/storage/hbase/HBaseStorage.java       |   1 +
 8 files changed, 111 insertions(+), 112 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/b49bda14/eagle-assembly/src/main/bin/eagle-create-table.rb
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/eagle-create-table.rb b/eagle-assembly/src/main/bin/eagle-create-table.rb
deleted file mode 100755
index b1b790c..0000000
--- a/eagle-assembly/src/main/bin/eagle-create-table.rb
+++ /dev/null
@@ -1,47 +0,0 @@
-# Create HBase tables for Eagle
-
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-include Java
-import org.apache.hadoop.hbase.HBaseConfiguration
-import org.apache.hadoop.hbase.client.HBaseAdmin
-
-def createEagleTable(admin, tableName)
-  if !admin.tableExists(tableName)
-    # create tableName, {NAME => 'f', VERSIONS => '1', BLOOMFILTER => 'ROW', COMPRESSION => 'GZ'}
-    create tableName, {NAME => 'f', VERSIONS => '1', BLOOMFILTER => 'ROW', COMPRESSION => 'SNAPPY'}
-    puts "Create Table #{tableName} successfully"
-  elsif admin.isTableDisabled(tableName)
-    admin.enableTable(tableName)
-    puts "Table #{tableName} already exists"
-  else
-    puts "Table #{tableName} already exists"
-  end
-end
-
-conf = HBaseConfiguration.new
-admin = HBaseAdmin.new(conf)
-
-if ARGV.empty?
-  puts "Table list is empty, please go back to bin/eagle-env.sh and export EAGLE_TABLE_LIST"
-  exit 1
-end
-
-tableListVal=ARGV.first
-
-tableListVal.split(' ').map { |i| createEagleTable(admin, i) }
-
-exit 0

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/b49bda14/eagle-assembly/src/main/bin/eagle-drop-tables.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/eagle-drop-tables.sh b/eagle-assembly/src/main/bin/eagle-drop-tables.sh
deleted file mode 100755
index 37fb540..0000000
--- a/eagle-assembly/src/main/bin/eagle-drop-tables.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-source $(dirname $0)/eagle-env.sh
-
-commands=''
-for i in $EAGLE_TABLE_LIST; do
-    commands="disable '$i'\ndrop '$i'\n"$commands
-done
-
-echo -e $commands | hbase shell
-#echo commands | hbase shell -n > /dev/null 2>&1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/b49bda14/eagle-assembly/src/main/bin/eagle-env.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/eagle-env.sh b/eagle-assembly/src/main/bin/eagle-env.sh
index 66d72ae..2e01dcd 100755
--- a/eagle-assembly/src/main/bin/eagle-env.sh
+++ b/eagle-assembly/src/main/bin/eagle-env.sh
@@ -49,7 +49,3 @@ export EAGLE_STORM_CLASSPATH=$EAGLE_CLASSPATH
 for file in $EAGLE_HOME/lib/storm/*;do
 	EAGLE_STORM_CLASSPATH=$EAGLE_STORM_CLASSPATH:$file
 done
-
-# EAGLE_TABLE_LIST
-# TODO: Automatically create hbase table when initializing
-export EAGLE_TABLE_LIST='alertdef ipzone streamMetadata alertdetail fileSensitivity eaglehdfs_alert streamdef eagle_metric alertExecutor alertStream alertStreamSchema hiveResourceSensitivity hbaseResourceSensitivity mlmodel userprofile hfdsusercommandpattern appCommand appDefinition serviceAudit aggregatedef alertNotifications eagleSiteDesc eagleSiteApplication eagleApplicationDesc eagleFeatureDesc eagle_metadata'
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/b49bda14/eagle-assembly/src/main/bin/eagle-service-init.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/eagle-service-init.sh b/eagle-assembly/src/main/bin/eagle-service-init.sh
deleted file mode 100755
index a9c1cb2..0000000
--- a/eagle-assembly/src/main/bin/eagle-service-init.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/bash
-
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-source $(dirname $0)/eagle-env.sh
-
-###################################################
-###        create hbase tables for eagle
-###################################################
-
-echo "Creating hbase tables for eagle ... "
-
-hbase shell ${EAGLE_HOME}/bin/eagle-create-table.rb "$EAGLE_TABLE_LIST"
-
-if [ $? = 0 ];then
-	echo "==> Successfully created hbase tables"
-else
-	echo "==> Failed creating hbase tables"
-	exit 1
-fi
-
-exit 0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/b49bda14/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfig.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfig.java b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfig.java
index afd095b..6226057 100755
--- a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfig.java
+++ b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfig.java
@@ -17,6 +17,7 @@
 package org.apache.eagle.common.config;
 
 import com.typesafe.config.Config;
+import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.client.HTableInterface;
 
 import java.util.TimeZone;
@@ -28,6 +29,8 @@ public interface EagleConfig {
 
 	HTableInterface getHTable(String tableName);
 
+    Configuration getHbaseConf();
+
     String getStorageType();
 
     ThreadPoolExecutor getExecutor();

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/b49bda14/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigFactory.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigFactory.java b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigFactory.java
index 3e26f96..0d73743 100755
--- a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigFactory.java
+++ b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigFactory.java
@@ -139,6 +139,11 @@ public class EagleConfigFactory implements EagleConfig {
 	}
 
     @Override
+	public Configuration getHbaseConf() {
+		return hbaseConf;
+	}
+
+    @Override
 	public String getZKQuorum(){
 		return this.zkQuorum;
     }

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/b49bda14/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/HBaseEntitySchemaManager.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/HBaseEntitySchemaManager.java b/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/HBaseEntitySchemaManager.java
new file mode 100644
index 0000000..03c0ec2
--- /dev/null
+++ b/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/HBaseEntitySchemaManager.java
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.storage.hbase;
+
+import org.apache.eagle.common.config.EagleConfigFactory;
+import org.apache.eagle.log.entity.meta.EntityDefinition;
+import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.HColumnDescriptor;
+import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.client.HBaseAdmin;
+import org.apache.hadoop.hbase.io.compress.Compression;
+import org.apache.hadoop.hbase.regionserver.BloomType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.Map;
+
+public class HBaseEntitySchemaManager {
+
+    private static final Logger LOG = LoggerFactory.getLogger(HBaseEntitySchemaManager.class);
+    private static HBaseEntitySchemaManager instance;
+    private volatile HBaseAdmin admin;
+
+    private final int DEFAULT_MAX_VERSIONS = 1;
+
+    private HBaseEntitySchemaManager() {}
+
+    public static HBaseEntitySchemaManager getInstance() {
+        if (instance == null) {
+            synchronized (HBaseEntitySchemaManager.class) {
+                if (instance == null) {
+                    instance = new HBaseEntitySchemaManager();
+                }
+            }
+        }
+        return instance;
+    }
+
+    public void init() {
+        Configuration conf = EagleConfigFactory.load().getHbaseConf();
+        try {
+            admin = new HBaseAdmin(conf);
+            Map<String, EntityDefinition> entityServiceMap = EntityDefinitionManager.entities();
+            if (entityServiceMap != null || entityServiceMap.values() != null) {
+                for (EntityDefinition entityDefinition : entityServiceMap.values()) {
+                    createTable(entityDefinition);
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            if (admin != null) {
+                try {
+                    admin.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+    }
+
+    private void createTable(EntityDefinition entityDefinition) throws IOException {
+        String tableName = entityDefinition.getTable();
+        if (admin.tableExists(tableName)) {
+            LOG.info("Table {} already exists", tableName);
+        } else {
+            HTableDescriptor tableDescriptor = new HTableDescriptor(TableName.valueOf(tableName));
+
+            // Adding column families to table descriptor
+            HColumnDescriptor columnDescriptor = new HColumnDescriptor(entityDefinition.getColumnFamily());
+            columnDescriptor.setBloomFilterType(BloomType.ROW);
+            //columnDescriptor.setCompressionType(Compression.Algorithm.SNAPPY);
+            columnDescriptor.setMaxVersions(DEFAULT_MAX_VERSIONS);
+
+            tableDescriptor.addFamily(columnDescriptor);
+
+            // Execute the table through admin
+            admin.createTable(tableDescriptor);
+            LOG.info("Successfully create Table {}", tableName);
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/b49bda14/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/HBaseStorage.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/HBaseStorage.java b/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/HBaseStorage.java
index 3cea080..1810401 100644
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/HBaseStorage.java
+++ b/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/HBaseStorage.java
@@ -52,6 +52,7 @@ public class HBaseStorage extends DataStorageBase {
     
     @Override
     public void init() throws IOException {
+        HBaseEntitySchemaManager.getInstance().init();
         LOG.info("Initializing");
     }
 


[06/47] incubator-eagle git commit: EAGLE-222 Documentation for eagle alert plugin mechnism

Posted by mw...@apache.org.
EAGLE-222 Documentation for eagle alert plugin mechnism

https://issues.apache.org/jira/browse/EAGLE-222

Author: Qingwen Zhao
Closes #163


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/a725ea55
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/a725ea55
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/a725ea55

Branch: refs/heads/master
Commit: a725ea5578917fde915675123c5251eb6afd99b9
Parents: 035a9f6
Author: Zhao, Qingwen <qi...@ebay.com>
Authored: Tue May 3 10:13:12 2016 +0800
Committer: Zhao, Qingwen <qi...@ebay.com>
Committed: Tue May 3 10:13:12 2016 +0800

----------------------------------------------------------------------
 eagle-docs/images/notificationPlugin.png        | Bin 0 -> 224458 bytes
 .../alert_notification_plugin_tutorial.md       |  87 +++++++++++++++++++
 .../tutorial/application_manager_tutorial.md    |  22 ++---
 mkdocs.yml                                      |   1 +
 4 files changed, 99 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/a725ea55/eagle-docs/images/notificationPlugin.png
----------------------------------------------------------------------
diff --git a/eagle-docs/images/notificationPlugin.png b/eagle-docs/images/notificationPlugin.png
new file mode 100644
index 0000000..73a8b96
Binary files /dev/null and b/eagle-docs/images/notificationPlugin.png differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/a725ea55/eagle-docs/tutorial/alert_notification_plugin_tutorial.md
----------------------------------------------------------------------
diff --git a/eagle-docs/tutorial/alert_notification_plugin_tutorial.md b/eagle-docs/tutorial/alert_notification_plugin_tutorial.md
new file mode 100644
index 0000000..7112b6c
--- /dev/null
+++ b/eagle-docs/tutorial/alert_notification_plugin_tutorial.md
@@ -0,0 +1,87 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+### Eagle Notification Plugins
+
+[Eagle Notification Plugin](https://cwiki.apache.org/confluence/display/EAG/Alert+notification+plugin) provides an interface for users to consume Eagle alerts. When define a policy, a user can add an arbitrary number of notification plugin instances. By default, Eagle supports three types of notification: EagleStore, Kafka and Email
+
+* EagleStore: Alerts will be persisted into the underlying database via eagle. 
+	* no configuration is needed. 
+* Kafka: Alerts will flow into Kafka. Configurations are required:
+	* **kafka_broker**: <hostname:port,..., REQUIRED: The list of hostname and hostname:port> port of the server to connect to. 
+	* **topic**: kafka topic 
+* email: Alert email will be sent out. Configurations are required:
+	* **sender**: email sender address
+	* **recipients**: email recipients, multiple email address with comma separated
+	* **subject**: email subject
+	
+![notificationPlugin](/images/notificationPlugin.png)
+### Customized Notification Plugin
+
+To integrate a customized notification plugin, we must implement an interface 
+
+	public interface NotificationPlugin {
+    /**
+     * for initialization
+     * @throws Exception
+     */
+    void init(Config config, List<AlertDefinitionAPIEntity> initAlertDefs) throws  Exception;
+
+    /**
+     * Update Plugin if any change in Policy Definition
+     * @param policy to be impacted
+     * @param  notificationConfCollection
+     * @throws Exception
+     */
+    void update(String policy, List<Map<String,String>> notificationConfCollection , boolean isPolicyDelete) throws  Exception;
+
+    /**
+     * Post a notification for the given alertEntity
+     * @param alertEntity
+     * @throws Exception
+     */
+
+    void onAlert(AlertAPIEntity alertEntity) throws  Exception;
+
+    /**
+     * Returns Status of Notification Post
+     * @return
+     */
+    List<NotificationStatus> getStatusList();
+	}
+Examples: AlertKafkaPlugin, AlertEmailPlugin, and AlertEagleStorePlugin.
+
+The second and crucial step is to register the configurations of the customized plugin. In other words, we need persist the configuration template into database in order to expose the configurations to users in the front end. 
+
+Examples:
+
+ 	{
+       "prefix": "alertNotifications",
+       "tags": {
+         "notificationType": "kafka"
+       },
+       "className": "org.apache.eagle.notification.plugin.AlertKafkaPlugin",
+       "description": "send alert to kafka bus",
+       "enabled":true,
+       "fields": "[{\"name\":\"kafka_broker\",\"value\":\"sandbox.hortonworks.com:6667\"},{\"name\":\"topic\"}]"
+     }
+'fields' is the configuration for notification type 'kafka'
+
+How can we do that? [Here](https://github.com/apache/incubator-eagle/blob/master/eagle-assembly/src/main/bin/eagle-topology-init.sh) are Eagle other notification plugin configurations. Just append yours to it, and run this script when Eagle service is up. 
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/a725ea55/eagle-docs/tutorial/application_manager_tutorial.md
----------------------------------------------------------------------
diff --git a/eagle-docs/tutorial/application_manager_tutorial.md b/eagle-docs/tutorial/application_manager_tutorial.md
index 5083111..4690428 100644
--- a/eagle-docs/tutorial/application_manager_tutorial.md
+++ b/eagle-docs/tutorial/application_manager_tutorial.md
@@ -51,17 +51,17 @@ After the configuration is ready, start Eagle service `bin/eagle-service.sh star
   
 #### Step 2: add topologies on UI
 1. First of all, go to admin page 
-   ![admin page](/images/appManager/admin-page.png)
-   ![admin page](/images/appManager/topology-monitor.png)
+   ![admin-page](/images/appManager/admin-page.png)
+   ![topology-monitor](/images/appManager/topology-monitor.png)
     
 2. Go to management page, and create a topology description. There are three required fields
     * name: topology name
     * type: topology type [CLASS, DYNAMIC]
     * execution entry: either the class which implement interface TopologyExecutable or eagle [DSL](https://github.com/apache/incubator-eagle/blob/master/eagle-assembly/src/main/conf/sandbox-hadoopjmx-pipeline.conf) based topology definition
-   ![admin page](/images/appManager/topology-description.png)
+   ![topology-description](/images/appManager/topology-description.png)
    
 3. Back to monitoring page, and choose the site/application to deploy the topology 
-   ![admin page](/images/appManager/topology-execution.png)
+   ![topology-execution](/images/appManager/topology-execution.png)
    
 4. Go to site page, and edit site->application and add some new configurations. Blow are some example configurations for [site=sandbox, applicatoin=hbaseSecurityLog]
    `These configurations have a higher priority than those in eagle-scheduler.conf`
@@ -94,16 +94,16 @@ After the configuration is ready, start Eagle service `bin/eagle-service.sh star
            app.eagleProps.eagleService.port=9099
            app.eagleProps.eagleService.username=admin
            app.eagleProps.eagleService.password=secret
-   ![admin page](/images/appManager/topology-configuration-1.png)
-   ![admin page](/images/appManager/topology-configuration-2.png)
+   ![topology-configuration-1](/images/appManager/topology-configuration-1.png)
+   ![topology-configuration-2](/images/appManager/topology-configuration-2.png)
    
 5. Go to monitoring page, and start topologies
-   ![admin page](/images/appManager/start-topology-1.png)
-   ![admin page](/images/appManager/start-topology-2.png)
+   ![start-topology-1](/images/appManager/start-topology-1.png)
+   ![start-topology-2](/images/appManager/start-topology-2.png)
    
 6. stop topologies on monitoring page
-   ![admin page](/images/appManager/stop-topology-1.png)
-   ![admin page](/images/appManager/stop-topology-2.png)
-   ![admin page](/images/appManager/stop-topology-3.png)
+   ![stop-topology-1](/images/appManager/stop-topology-1.png)
+   ![stop-topology-2](/images/appManager/stop-topology-2.png)
+   ![stop-topology-3](/images/appManager/stop-topology-3.png)
 
  
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/a725ea55/mkdocs.yml
----------------------------------------------------------------------
diff --git a/mkdocs.yml b/mkdocs.yml
index c07ed4a..c3a150b 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -56,5 +56,6 @@ pages:
 - Tutorial:
    - Getting started with Eagle: tutorial/getting_started_with_eagle.md
    - Application Manager Tutorial: tutorial/application_manager_tutorial.md
+   - Alert Notification Plugin tutorial: tutorial/alert_notification_plugin_tutorial.md
 - User Guide:
    - Installation: userguide/installation.md


[29/47] incubator-eagle git commit: EAGLE-330 Fix Hive ql.Parser Hive ql.Parser cant parser a hive query sql with keywords https://issues.apache.org/jira/browse/EAGLE-330

Posted by mw...@apache.org.
EAGLE-330 Fix Hive ql.Parser
Hive ql.Parser cant parser a hive query sql with keywords
https://issues.apache.org/jira/browse/EAGLE-330

Author: @wgyumg <wg...@gmail.com>
Reviewer: @pkuwm <hl...@ebay.com>

Closes: #228


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/cbf3c76c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/cbf3c76c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/cbf3c76c

Branch: refs/heads/master
Commit: cbf3c76ce148b73379698d9626df6e1baa5162ab
Parents: f51474d
Author: yonzhang <yo...@gmail.com>
Authored: Tue Jun 7 16:01:41 2016 -0700
Committer: yonzhang <yo...@gmail.com>
Committed: Tue Jun 7 16:01:41 2016 -0700

----------------------------------------------------------------------
 .../apache/eagle/security/hive/ql/Parser.java   | 46 ++++++++++++++++++--
 .../eagle/security/hive/ql/TestParser.java      | 30 ++++++++++++-
 2 files changed, 70 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/cbf3c76c/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/ql/Parser.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/ql/Parser.java b/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/ql/Parser.java
index 5ab0f4b..19ce003 100644
--- a/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/ql/Parser.java
+++ b/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/ql/Parser.java
@@ -16,11 +16,19 @@
  */
 package org.apache.eagle.security.hive.ql;
 
+import org.antlr.runtime.RecognitionException;
+import org.antlr.runtime.Token;
+import org.antlr.runtime.TokenRewriteStream;
+import org.antlr.runtime.TokenStream;
+import org.antlr.runtime.tree.CommonTree;
+import org.antlr.runtime.tree.CommonTreeAdaptor;
+import org.antlr.runtime.tree.TreeAdaptor;
+import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.ql.lib.Node;
+import org.apache.hadoop.hive.ql.parse.ASTErrorNode;
 import org.apache.hadoop.hive.ql.parse.ASTNode;
 import org.apache.hadoop.hive.ql.parse.HiveParser;
 import org.apache.hadoop.hive.ql.parse.ParseDriver;
-import org.apache.hadoop.hive.ql.parse.ParseException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -33,6 +41,21 @@ import java.util.Set;
 public class Parser {
   private static final Logger LOG = LoggerFactory.getLogger(Parser.class);
 
+  static final TreeAdaptor adaptor = new CommonTreeAdaptor() {
+    @Override
+    public Object create(Token payload) {
+      return new ASTNode(payload);
+    }
+    @Override
+    public Object dupNode(Object t) {
+      return create(((CommonTree)t).token);
+    }
+    @Override
+    public Object errorNode(TokenStream input, Token start, Token stop, RecognitionException e) {
+      return new ASTErrorNode(input, start, stop, e);
+    }
+  };
+
   private Set<String> tableSet;
   private Set<String> columnSet;
   private Map<String, String> columnAliasMap;
@@ -66,11 +89,26 @@ public class Parser {
    * Parse an Hive QL into an Abstract Syntax Tree(AST).
    * @param query
    * @return
-   * @throws ParseException
+   * @throws RecognitionException
    */
-  public ASTNode generateAST(String query) throws ParseException {
+  public ASTNode generateAST(String query) throws RecognitionException {
+    // https://issues.apache.org/jira/browse/HIVE-10731
+    // https://issues.apache.org/jira/browse/HIVE-6617
+    HiveConf hiveConf = new HiveConf();
+    hiveConf.setBoolVar(HiveConf.ConfVars.HIVE_SUPPORT_SQL11_RESERVED_KEYWORDS, false);
+
     ParseDriver pd = new ParseDriver();
-    return pd.parse(query);
+    ParseDriver.ANTLRNoCaseStringStream antlrStream = pd.new ANTLRNoCaseStringStream(query);
+    ParseDriver.HiveLexerX lexer = pd.new HiveLexerX(antlrStream);
+    lexer.setHiveConf(hiveConf);
+    TokenRewriteStream tokens = new TokenRewriteStream(lexer);
+
+    HiveParser parser = new HiveParser(tokens);
+    parser.setHiveConf(hiveConf);
+    parser.setTreeAdaptor(adaptor);
+    HiveParser.statement_return r = parser.statement();
+
+    return (ASTNode)r.getTree();
   }
 
   private void parseQL(ASTNode ast) {

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/cbf3c76c/eagle-security/eagle-security-hive/src/test/java/org/apache/eagle/security/hive/ql/TestParser.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hive/src/test/java/org/apache/eagle/security/hive/ql/TestParser.java b/eagle-security/eagle-security-hive/src/test/java/org/apache/eagle/security/hive/ql/TestParser.java
index a5f5f82..0bd994f 100644
--- a/eagle-security/eagle-security-hive/src/test/java/org/apache/eagle/security/hive/ql/TestParser.java
+++ b/eagle-security/eagle-security-hive/src/test/java/org/apache/eagle/security/hive/ql/TestParser.java
@@ -22,7 +22,7 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.hadoop.hive.ql.parse.ASTNode;
-import org.apache.hadoop.hive.ql.parse.ParseException;
+import org.antlr.runtime.RecognitionException;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
@@ -67,7 +67,7 @@ public class TestParser {
     }
   }
 
-  public void printQueryAST(String query) throws ParseException {
+  public void printQueryAST(String query) throws RecognitionException {
     ASTNode root = parser.generateAST(query);
     printTree(root, 0);
   }
@@ -209,6 +209,32 @@ public class TestParser {
     }
 
     @Test
+    public void testQueryWithKeyWords() throws Exception {
+        String query =  "SELECT id, user FROM db.table1";
+        String expectedOperation = "SELECT";
+        String expectedInsertTable = null;
+        Map<String, Set<String>> expectedTableColumn = new HashMap<String, Set<String>>();
+        Set<String> set = new HashSet<String>();
+        set.add("id");
+        set.add("user");
+        expectedTableColumn.put("db.table1", set);
+        _testParsingQuery(query, expectedOperation, expectedInsertTable, expectedTableColumn);
+    }
+
+    @Test
+    public void testInsertTableWithKeyWords() throws Exception {
+        String query =  "INSERT OVERWRITE TABLE table2 SELECT id, user FROM db.table1";
+        String expectedOperation = "SELECT";
+        String expectedInsertTable = "table2";
+        Map<String, Set<String>> expectedTableColumn = new HashMap<String, Set<String>>();
+        Set<String> set = new HashSet<String>();
+        set.add("id");
+        set.add("user");
+        expectedTableColumn.put("db.table1", set);
+        _testParsingQuery(query, expectedOperation, expectedInsertTable, expectedTableColumn);
+    }
+
+    @Test
     public void testCreateTable() throws Exception {
         String query = "CREATE TABLE page_view(viewTime INT, userid BIGINT,\n" +
                 "                page_url STRING, referrer_url STRING,\n" +


[43/47] incubator-eagle git commit: [EAGLE-355] fix advanced sql parse logic

Posted by mw...@apache.org.
[EAGLE-355] fix advanced sql parse logic

Adjust the logic of expression parse

Author: jiljiang <ji...@ebay.com>

Closes #251 from zombieJ/branch-0.4.


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/2f901888
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/2f901888
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/2f901888

Branch: refs/heads/master
Commit: 2f9018881fc29a6cefd557352d8d436770bfa1fb
Parents: 6a3f152
Author: jiljiang <ji...@ebay.com>
Authored: Mon Jul 11 16:43:57 2016 +0800
Committer: anyway1021 <mw...@apache.org>
Committed: Mon Jul 11 16:43:57 2016 +0800

----------------------------------------------------------------------
 .../main/webapp/app/public/feature/common/controller.js  | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2f901888/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js b/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js
index b23d53b..e926e36 100644
--- a/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js
+++ b/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js
@@ -644,15 +644,16 @@
 						// >> Parse expression
 						$scope.policy.__.conditions = {};
 						var _condition = _policyUnit.expression.match(/from\s+(\w+)(\[(.*)])?(#window[^\)]*\))?\s+(select (\w+, )?(\w+)\((\w+)\) as [\w\d_]+ (group by (\w+) )?having ([\w\d_]+) ([<>=]+) ([^\s]+))?/);
+						var _cond_stream, _cond_query, _cond_window, _cond_group, _cond_groupUnit;
 
 						if(!_condition) {
 							$scope.policy.__.advanced = true;
 						} else {
-							var _cond_stream = _condition[1];
-							var _cond_query = _condition[3] || "";
-							var _cond_window = _condition[4];
-							var _cond_group = _condition[5];
-							var _cond_groupUnit = _condition.slice(7,14);
+							_cond_stream = _condition[1];
+							_cond_query = _condition[3] || "";
+							_cond_window = _condition[4];
+							_cond_group = _condition[5];
+							_cond_groupUnit = _condition.slice(7,14);
 
 							// > StreamName
 							var _streamName = _cond_stream;


[31/47] incubator-eagle git commit: EAGLE-340 refactor bin/eagle-sandbox-starter.sh to make it easier to use refactor bin/eagle-sandbox-starter.sh to make it easier to use

Posted by mw...@apache.org.
EAGLE-340 refactor bin/eagle-sandbox-starter.sh to make it easier to use
refactor bin/eagle-sandbox-starter.sh to make it easier to use

Author: @qingwen220 <qi...@ebay.com>
Reviewer: @yonzhang <yo...@gmail.com>

Closes: #237


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/36422ea8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/36422ea8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/36422ea8

Branch: refs/heads/master
Commit: 36422ea81da6e4c158fcac1e02d3cb9798bf6486
Parents: 8f12f82
Author: yonzhang <yo...@gmail.com>
Authored: Thu Jun 16 14:55:59 2016 -0700
Committer: yonzhang <yo...@gmail.com>
Committed: Thu Jun 16 14:55:59 2016 -0700

----------------------------------------------------------------------
 .../src/main/examples/eagle-sandbox-starter.sh  | 61 ++------------------
 .../sample-sensitivity-resource-create.sh       |  2 +
 .../src/main/resources/application.conf         | 23 ++++----
 3 files changed, 19 insertions(+), 67 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/36422ea8/eagle-assembly/src/main/examples/eagle-sandbox-starter.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/examples/eagle-sandbox-starter.sh b/eagle-assembly/src/main/examples/eagle-sandbox-starter.sh
index 286bc87..4a05a77 100644
--- a/eagle-assembly/src/main/examples/eagle-sandbox-starter.sh
+++ b/eagle-assembly/src/main/examples/eagle-sandbox-starter.sh
@@ -15,6 +15,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+# This script will start Eagle service with storage Derby,
+# and a sample application HiveQueryLog monitoring
+
 source $(dirname $0)/../bin/eagle-env.sh
 eagle_bin=$EAGLE_HOME/bin
 
@@ -29,41 +32,6 @@ $eagle_bin/eagle-check-env.sh
 
 pid_dir=/var/run
 
-# Check HBase if it has been started
-hbase_master_pid=${pid_dir}/hbase/hbase-hbase-master.pid
-hbase_regionserver_pid=${pid_dir}/hbase/hbase-hbase-regionserver.pid
-echo "Checking if hbase is running ..."
-
-if [ -f $hbase_master_pid ] && \
-	ps aux | grep -v grep | grep $(cat $hbase_master_pid) > /dev/null
-then
-	echo "HBase Master is running as process `cat $hbase_master_pid`."
-else
-	echo "Error: HBase Master is not running. Please start it via Ambari."
-	exit 1
-fi
-
-if [ -f $hbase_regionserver_pid ] && \
-	ps aux | grep -v grep | grep $(cat $hbase_regionserver_pid) > /dev/null
-then
-	echo "HBase RegionServer is running as process `cat $hbase_regionserver_pid`."
-else
-	echo "Error: HBase RegionServer is not running. Please start it via Ambari."
-	exit 1
-fi
-
-# Check kafka if it has been started
-kafka_pid=$pid_dir/kafka/kafka.pid
-echo "Checking if kafka is running ..."
-
-if [ -f $kafka_pid ] && ps aux | grep -v grep | grep $(cat $kafka_pid) > /dev/null
-then
-	echo "Kafka is running as process `cat $kafka_pid`."
-else
-	echo "Error: Kafka is not running. Please start it via Ambari."
-	exit 1
-fi
-
 # Check storm if it has been started
 nimbus_pid=$pid_dir/storm/nimbus.pid
 supervisor_pid=$pid_dir/storm/supervisor.pid
@@ -104,33 +72,14 @@ $eagle_bin/eagle-service.sh start
 ###################################################################
 
 echo "STEP [3/3]: start eagle topology"
-$eagle_bin/eagle-service-init.sh
-[ $? != 0 ] && exit 1
 
-echo "Creating kafka topics for eagle ... "
-KAFKA_HOME=/usr/hdp/current/kafka-broker
-EAGLE_ZOOKEEPER_QUORUM=localhost:2181
-topic=`${KAFKA_HOME}/bin/kafka-topics.sh --list --zookeeper $EAGLE_ZOOKEEPER_QUORUM --topic sandbox_hdfs_audit_log`
-if [ -z $topic ]; then
-	$KAFKA_HOME/bin/kafka-topics.sh --create --zookeeper $EAGLE_ZOOKEEPER_QUORUM --replication-factor 1 --partitions 1 --topic sandbox_hdfs_audit_log
-fi
-
-if [ $? = 0 ]; then
-echo "==> Create kafka topic successfully for eagle"
-else
-echo "==> Failed, exiting"
-exit 1
-fi
 $eagle_bin/eagle-topology-init.sh
 [ $? != 0 ] && exit 1
 ${EAGLE_HOME}/examples/sample-sensitivity-resource-create.sh
 [ $? != 0 ] && exit 1
 ${EAGLE_HOME}/examples/sample-policy-create.sh
 [ $? != 0 ] && exit 1
-$eagle_bin/eagle-topology.sh --main org.apache.eagle.security.auditlog.HdfsAuditLogProcessorMain --config ${EAGLE_HOME}/conf/sandbox-hdfsAuditLog-application.conf start
-[ $? != 0 ] && exit 1
+
 $eagle_bin/eagle-topology.sh --main org.apache.eagle.security.hive.jobrunning.HiveJobRunningMonitoringMain --config ${EAGLE_HOME}/conf/sandbox-hiveQueryLog-application.conf start
-[ $? != 0 ] && exit 1
-$eagle_bin/eagle-topology.sh --main org.apache.eagle.security.userprofile.UserProfileDetectionMain --config ${EAGLE_HOME}/conf/sandbox-userprofile-topology.conf start
-[ $? != 0 ] && exit 1
+
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/36422ea8/eagle-assembly/src/main/examples/sample-sensitivity-resource-create.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/examples/sample-sensitivity-resource-create.sh b/eagle-assembly/src/main/examples/sample-sensitivity-resource-create.sh
index 4a8f06f..615c00b 100644
--- a/eagle-assembly/src/main/examples/sample-sensitivity-resource-create.sh
+++ b/eagle-assembly/src/main/examples/sample-sensitivity-resource-create.sh
@@ -23,10 +23,12 @@ curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:a
 
 
 #### create hdfs sensitivity sample in sandbox
+echo ""
 echo "create hdfs sensitivity sample in sandbox... "
 curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=FileSensitivityService" -d '[{"tags":{"site" : "sandbox", "filedir":"/tmp/private"}, "sensitivityType": "PRIVATE"}]'
 
 #### create hbase sensitivity sample in sandbox
+echo ""
 echo "create hdfs sensitivity sample in sandbox... "
 curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=HbaseResourceSensitivityService" -d '[{"tags":{"site":"sandbox","hbaseResource":"default:alertStreamSchema"},"sensitivityType":"PrivateTable"}]'
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/36422ea8/eagle-webservice/src/main/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/resources/application.conf b/eagle-webservice/src/main/resources/application.conf
index fff7d3f..ca936ed 100644
--- a/eagle-webservice/src/main/resources/application.conf
+++ b/eagle-webservice/src/main/resources/application.conf
@@ -13,15 +13,16 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-
-eagle{
-	service{
-		storage-type="hbase"
-		hbase-zookeeper-quorum="sandbox.hortonworks.com"
-		hbase-zookeeper-property-clientPort=2181
-		zookeeper-znode-parent="/hbase-unsecure",
-		springActiveProfile="sandbox"
-		audit-enabled=true
+eagle {
+	service {
+		storage-type="jdbc"
+		storage-adapter="derby"
+		storage-username="eagle"
+		storage-password=eagle
+		storage-database=eagle
+		storage-connection-url="jdbc:derby:/tmp/eagle-db-dev;create=true"
+		storage-connection-props="encoding=UTF-8"
+		storage-driver-class="org.apache.derby.jdbc.EmbeddedDriver"
+		storage-connection-max=8
 	}
-}
-
+}
\ No newline at end of file


[10/47] incubator-eagle git commit: disable testLengthSlideWindow

Posted by mw...@apache.org.
disable testLengthSlideWindow


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/8087ec0b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/8087ec0b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/8087ec0b

Branch: refs/heads/master
Commit: 8087ec0b64f3809360361233d2d356fea4b19364
Parents: cf4b277
Author: Zhao, Qingwen <qi...@ebay.com>
Authored: Fri May 6 18:24:41 2016 +0800
Committer: Zhao, Qingwen <qi...@ebay.com>
Committed: Fri May 6 18:24:41 2016 +0800

----------------------------------------------------------------------
 .../eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/8087ec0b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java
index d05dd30..131be28 100644
--- a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java
+++ b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java
@@ -110,7 +110,7 @@ public class TestSiddhiStateSnapshotAndRestore {
         return executionPlanRuntime;
     }
 
-    @Test
+    @Ignore
     public void testLengthSlideWindow() throws Exception{
         String tmpdir = System.getProperty("java.io.tmpdir");
         System.out.println("temporary directory: " + tmpdir);


[12/47] incubator-eagle git commit: EAGLE-291 : JDBC: Update transactions fail in PostgreSQL

Posted by mw...@apache.org.
EAGLE-291 : JDBC: Update transactions fail in PostgreSQL

The transactions in Postgres was failing due to insert fail transaction already in progress and we were trying to update if insert fails. Need to rollback the failed insert transaction and then continue with update transaction. Postgres is more strict as compared to MySql, so we need save point so that we can roll it back, if required.

Author: Jaspaul <ja...@gmail.com>

Closes #194 from Jashchahal/dev.


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/8dad5fe6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/8dad5fe6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/8dad5fe6

Branch: refs/heads/master
Commit: 8dad5fe6fd83b76674e4df6e6bd50e0b11f3bec0
Parents: 6768fe4
Author: Jaspaul <ja...@gmail.com>
Authored: Mon May 23 11:13:34 2016 +0800
Committer: Hao Chen <ha...@apache.org>
Committed: Mon May 23 11:13:34 2016 +0800

----------------------------------------------------------------------
 .../jdbc/entity/impl/JdbcEntityWriterImpl.java  | 21 ++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/8dad5fe6/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/JdbcEntityWriterImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/JdbcEntityWriterImpl.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/JdbcEntityWriterImpl.java
index 5a04ae6..a72c83c 100644
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/JdbcEntityWriterImpl.java
+++ b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/JdbcEntityWriterImpl.java
@@ -37,6 +37,7 @@ import java.sql.Connection;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
+import java.sql.Savepoint;
 
 /**
  * @since 3/27/15
@@ -63,11 +64,13 @@ public class JdbcEntityWriterImpl<E extends TaggedLogAPIEntity> implements JdbcE
         if(LOG.isDebugEnabled()) LOG.debug("Writing "+entities.size()+" entities");
         StopWatch stopWatch = new StopWatch();
         stopWatch.start();
-        Connection connection = ConnectionManagerFactory.getInstance().getConnection();
-        // set auto commit false and commit by hands for 3x~5x better performance
-        connection.setAutoCommit(false);
-
+        Connection connection = null;
+        Savepoint insertDup = null;
+        int i = 0 ;
         try {
+            connection = ConnectionManagerFactory.getInstance().getConnection();
+            // set auto commit false and commit by hands for 3x~5x better performance
+            connection.setAutoCommit(false);
             TorqueStatementPeerImpl<E> peer = connectionManager.getStatementExecutor(this.jdbcEntityDefinition.getJdbcTableName());
             for (E entity : entities) {
                 entity.setEncodedRowkey(peer.getPrimaryKeyBuilder().build(entity));
@@ -75,6 +78,9 @@ public class JdbcEntityWriterImpl<E extends TaggedLogAPIEntity> implements JdbcE
 
                 ObjectKey key = null;
                 try {
+                    //save point , so that we can roll back just current entry, if required.
+                    i++ ;
+                    insertDup = connection.setSavepoint("insertEntity"+i);
                     // TODO: implement batch insert for better performance
                     key = peer.delegate().doInsert(columnValues,connection);
 
@@ -89,6 +95,7 @@ public class JdbcEntityWriterImpl<E extends TaggedLogAPIEntity> implements JdbcE
                 } catch (ConstraintViolationException e){
                     //this message will be different in each DB type ...using duplicate keyword to catch for broader set of DBs. moreover we are already inside ConstraintViolationException exception, do we even need this check?
                     if(e.getMessage().toLowerCase().contains("duplicate")){
+                        connection.rollback(insertDup); // need to rollback current Insert entity, as it is duplicate record, need to update. Postgresql is strict in transaction handling(need rollback) as compared to MySql
                         String primaryKey = entity.getEncodedRowkey();
                         if(primaryKey==null) {
                             primaryKey = ConnectionManagerFactory.getInstance().getStatementExecutor().getPrimaryKeyBuilder().build(entity);
@@ -110,12 +117,14 @@ public class JdbcEntityWriterImpl<E extends TaggedLogAPIEntity> implements JdbcE
             connection.commit();
         }catch (Exception ex) {
             LOG.error("Failed to write records, rolling back",ex);
-            connection.rollback();
+            if(connection!=null)
+                connection.rollback();
             throw ex;
         }finally {
             stopWatch.stop();
             if(LOG.isDebugEnabled()) LOG.debug("Closing connection");
-            connection.close();
+            if(connection!=null)
+                connection.close();
         }
 
         LOG.info(String.format("Wrote %s records in %s ms (table: %s)",keys.size(),stopWatch.getTime(),this.jdbcEntityDefinition.getJdbcTableName()));


[41/47] incubator-eagle git commit: [EAGLE-356] Fix Authentication problem to query resource manager web service

Posted by mw...@apache.org.
[EAGLE-356] Fix Authentication problem to query resource manager web service

Author: Hao Chen <ha...@users.noreply.github.com>

Closes #252 from haoch/patch-1.

(cherry picked from commit d750501242df6be408ace4baa50286ae948bfea4)
Signed-off-by: Hao Chen <ha...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/f76a9724
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/f76a9724
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/f76a9724

Branch: refs/heads/master
Commit: f76a972481075417d0511d126124021ae316821d
Parents: 23d3ca6
Author: Hao Chen <ha...@apache.org>
Authored: Thu Jul 7 15:18:40 2016 +0800
Committer: Hao Chen <ha...@apache.org>
Committed: Thu Jul 7 15:19:19 2016 +0800

----------------------------------------------------------------------
 eagle-external/hadoop_jmx_collector/metric_collector.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/f76a9724/eagle-external/hadoop_jmx_collector/metric_collector.py
----------------------------------------------------------------------
diff --git a/eagle-external/hadoop_jmx_collector/metric_collector.py b/eagle-external/hadoop_jmx_collector/metric_collector.py
index 939b811..39920b3 100644
--- a/eagle-external/hadoop_jmx_collector/metric_collector.py
+++ b/eagle-external/hadoop_jmx_collector/metric_collector.py
@@ -162,7 +162,7 @@ class YarnWSReader:
         self.https = https
 
     def read_cluster_info(self):
-        cluster_info = Helper.http_get(self.host, self.port, self.https, "/ws/v1/cluster/info")
+        cluster_info = Helper.http_get(self.host, self.port, self.https, "/ws/v1/cluster/info?anonymous=true")
         logging.debug(cluster_info)
         return json.loads(cluster_info)
 
@@ -351,4 +351,4 @@ class JmxMetricListener:
         pass
 
     def on_metric(self, metric):
-        pass
\ No newline at end of file
+        pass


[13/47] incubator-eagle git commit: EAGLE-300 set debug-log dumping components log level to INFO set debug-log

Posted by mw...@apache.org.
EAGLE-300 set debug-log dumping components log level to INFO
set debug-log

https://issues.apache.org/jira/browse/EAGLE-300

Author:anyway1021
Reviewer: Ralph, Hao

Closes #192


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/50ff38d9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/50ff38d9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/50ff38d9

Branch: refs/heads/master
Commit: 50ff38d99de630d6cb4ced324317237bcca65e8b
Parents: 8dad5fe
Author: yonzhang <yo...@gmail.com>
Authored: Mon May 23 17:08:33 2016 -0700
Committer: yonzhang <yo...@gmail.com>
Committed: Mon May 23 17:08:33 2016 -0700

----------------------------------------------------------------------
 eagle-webservice/src/main/resources/log4j.properties | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/50ff38d9/eagle-webservice/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/resources/log4j.properties b/eagle-webservice/src/main/resources/log4j.properties
index fb13ad5..c850e7f 100644
--- a/eagle-webservice/src/main/resources/log4j.properties
+++ b/eagle-webservice/src/main/resources/log4j.properties
@@ -18,4 +18,9 @@ log4j.rootLogger=DEBUG, stdout
 # standard output
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
\ No newline at end of file
+log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
+
+# set log level as INFO for debug-log dumping components
+log4j.category.org.springframework=INFO
+log4j.category.org.apache.torque=INFO
+log4j.category.org.commons=INFO
\ No newline at end of file


[34/47] incubator-eagle git commit: EAGLE-326 fix a typo fix a typo in documentation for application management configuration

Posted by mw...@apache.org.
EAGLE-326 fix a typo
fix a typo in documentation for application management configuration

Author: Michael
Reviwer: Edward

Closes: #220


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/f5b31023
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/f5b31023
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/f5b31023

Branch: refs/heads/master
Commit: f5b3102319591f6aabfc74b072919a7e9a05dea1
Parents: 11d4be7
Author: yonzhang <yo...@gmail.com>
Authored: Thu Jun 16 15:23:11 2016 -0700
Committer: yonzhang <yo...@gmail.com>
Committed: Thu Jun 16 15:23:11 2016 -0700

----------------------------------------------------------------------
 eagle-docs/tutorial/application_manager_tutorial.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/f5b31023/eagle-docs/tutorial/application_manager_tutorial.md
----------------------------------------------------------------------
diff --git a/eagle-docs/tutorial/application_manager_tutorial.md b/eagle-docs/tutorial/application_manager_tutorial.md
index 4eccfa4..0e342c5 100644
--- a/eagle-docs/tutorial/application_manager_tutorial.md
+++ b/eagle-docs/tutorial/application_manager_tutorial.md
@@ -43,7 +43,7 @@ The configuration file `eagle-scheduler.conf` defines scheduler parameters, exec
     
     Some default topology properties are defined here. 
     
-Note: these configurations can be overridden in the topology configurations, which is shown below. The only difference is to add a prefix `.app`. For example, 'app.envContextConfig.jarFile' is to override 'envContextConfig.jarFile' in eagle-schedule.conf
+Note: these configurations can be overridden in the topology configurations, which is shown below. The only difference is to add a prefix `app.`. For example, 'app.envContextConfig.jarFile' is to override 'envContextConfig.jarFile' in eagle-schedule.conf
    
   
 #### Manual
@@ -114,4 +114,4 @@ Note: these configurations can be overridden in the topology configurations, whi
    ![stop-topology-2](/images/appManager/stop-topology-2.png)
    ![stop-topology-3](/images/appManager/stop-topology-3.png)
 
- 
\ No newline at end of file
+ 


[18/47] incubator-eagle git commit: EAGLE-279 Create Documentation for Sandbox Quick starter EAGLE-279 Create Documentation for Sandbox Quick starter and JMX monitoring

Posted by mw...@apache.org.
EAGLE-279 Create Documentation for Sandbox Quick starter
EAGLE-279 Create Documentation for Sandbox Quick starter and JMX monitoring

Author: Hemanth, hdendukuri@apache.org
Reviewer: yonzhang, yonzhang2012@apache.org

Closes #159


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/e618d256
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/e618d256
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/e618d256

Branch: refs/heads/master
Commit: e618d256e4854602d01a6440f51d9962be7eedea
Parents: 9ad4b63
Author: yonzhang <yo...@gmail.com>
Authored: Mon May 23 21:30:33 2016 -0700
Committer: yonzhang <yo...@gmail.com>
Committed: Mon May 23 21:30:33 2016 -0700

----------------------------------------------------------------------
 eagle-docs/images/eagle-service.png           | Bin 0 -> 449283 bytes
 eagle-docs/images/hbase-superuser.png         | Bin 0 -> 147292 bytes
 eagle-docs/images/hdfs-env-conf.png           | Bin 0 -> 460829 bytes
 eagle-docs/images/hdfs-env-conf2.png          | Bin 0 -> 265131 bytes
 eagle-docs/images/hdfs-log4j-conf.png         | Bin 0 -> 359551 bytes
 eagle-docs/images/new-site.png                | Bin 0 -> 61032 bytes
 eagle-docs/images/nn-restart.png              | Bin 0 -> 79477 bytes
 eagle-docs/images/start-storm.png             | Bin 0 -> 500714 bytes
 eagle-docs/userguide/jmx-metric-monitoring.md |  77 ++++++++++++
 eagle-docs/userguide/sandbox-quick-start.md   | 140 +++++++++++++++++++++
 10 files changed, 217 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e618d256/eagle-docs/images/eagle-service.png
----------------------------------------------------------------------
diff --git a/eagle-docs/images/eagle-service.png b/eagle-docs/images/eagle-service.png
new file mode 100644
index 0000000..c649e36
Binary files /dev/null and b/eagle-docs/images/eagle-service.png differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e618d256/eagle-docs/images/hbase-superuser.png
----------------------------------------------------------------------
diff --git a/eagle-docs/images/hbase-superuser.png b/eagle-docs/images/hbase-superuser.png
new file mode 100644
index 0000000..71b4a04
Binary files /dev/null and b/eagle-docs/images/hbase-superuser.png differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e618d256/eagle-docs/images/hdfs-env-conf.png
----------------------------------------------------------------------
diff --git a/eagle-docs/images/hdfs-env-conf.png b/eagle-docs/images/hdfs-env-conf.png
new file mode 100644
index 0000000..b1ba80e
Binary files /dev/null and b/eagle-docs/images/hdfs-env-conf.png differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e618d256/eagle-docs/images/hdfs-env-conf2.png
----------------------------------------------------------------------
diff --git a/eagle-docs/images/hdfs-env-conf2.png b/eagle-docs/images/hdfs-env-conf2.png
new file mode 100644
index 0000000..069acee
Binary files /dev/null and b/eagle-docs/images/hdfs-env-conf2.png differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e618d256/eagle-docs/images/hdfs-log4j-conf.png
----------------------------------------------------------------------
diff --git a/eagle-docs/images/hdfs-log4j-conf.png b/eagle-docs/images/hdfs-log4j-conf.png
new file mode 100644
index 0000000..0eade68
Binary files /dev/null and b/eagle-docs/images/hdfs-log4j-conf.png differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e618d256/eagle-docs/images/new-site.png
----------------------------------------------------------------------
diff --git a/eagle-docs/images/new-site.png b/eagle-docs/images/new-site.png
new file mode 100644
index 0000000..793aa18
Binary files /dev/null and b/eagle-docs/images/new-site.png differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e618d256/eagle-docs/images/nn-restart.png
----------------------------------------------------------------------
diff --git a/eagle-docs/images/nn-restart.png b/eagle-docs/images/nn-restart.png
new file mode 100644
index 0000000..562641f
Binary files /dev/null and b/eagle-docs/images/nn-restart.png differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e618d256/eagle-docs/images/start-storm.png
----------------------------------------------------------------------
diff --git a/eagle-docs/images/start-storm.png b/eagle-docs/images/start-storm.png
new file mode 100644
index 0000000..705b60e
Binary files /dev/null and b/eagle-docs/images/start-storm.png differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e618d256/eagle-docs/userguide/jmx-metric-monitoring.md
----------------------------------------------------------------------
diff --git a/eagle-docs/userguide/jmx-metric-monitoring.md b/eagle-docs/userguide/jmx-metric-monitoring.md
new file mode 100644
index 0000000..1a31d63
--- /dev/null
+++ b/eagle-docs/userguide/jmx-metric-monitoring.md
@@ -0,0 +1,77 @@
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+
+
+---
+layout: doc
+title:  "JMX Metric Monitoring" 
+permalink: /docs/jmx-metric-monitoring.html
+---
+-->
+
+JMX metric for hadoop namenode url [http://127.0.0.1:50070/jmx](http://127.0.0.1:50070/jmx) can be monitored using Eagle. Follow below steps to enable this feature in Eagle.    
+
+1. Install Python script (To populate JMX metric values to Kafka message topic periodically.)
+2. Deploy "hadoopjmx" storm topology.
+3. Create new site and policy in UI
+4. Validate policy alert.
+
+<br/>
+
+
+### **Prerequisite**
+* Complete the setup from [sandbox-quick-start.md](https://github.com/hdendukuri/incubator-eagle/blob/master/eagle-docs/userguide/sandbox-quick-start.md)	
+
+<br/>
+
+
+### **Setup**
+From Hortonworks sandbox just run below setup script to Install Pyton JMX script, Create Kafka topic, update Hbase tables and deploy "hadoopjmx" storm topology. 
+
+    $ /usr/hdp/current/eagle/examples/hadoop-metric-sandbox-starter.sh
+    $ /usr/hdp/current/eagle/examples/hadoop-metric-policy-create.sh
+
+<br/>
+
+
+### **Application Setup in UI**
+1. Login to Eagle UI [http://localhost:9099/eagle-service/](http://localhost:9099/eagle-service/) username and password as "admin" and "secret"
+2. Click on "Admin" from top right and click "Management" button.
+3. On Admin management page add "New Site" name "hadoopJmxMetricDataSource" by clicking on "New Site" link.
+![add superuser](https://github.com/hdendukuri/incubator-eagle/blob/master/eagle-docs/images/new-site.png)
+4. Save the changes.
+5. On eagle home page you should see new tab called "METRIC", besides "DAM".
+6. Click on "JmxMetricMonitor" under "METRIC".
+ 
+You should see safeModePolicy policy.  
+
+<br/>
+
+
+### **Demo** 
+
+* First make sure that Kafka topic "nn_jmx_metric_sandbox" is populated with JMX metric data periodically.(To make sure that python script is running)
+ 
+        $ /usr/hdp/2.2.4.2-2/kafka/bin/kafka-console-consumer.sh --zookeeper sandbox.hortonworks.com:2181 --topic nn_jmx_metric_sandbox
+
+* Genrate Alert by producing alert triggering message in Kafka topic.  
+
+
+        $ /usr/hdp/2.2.4.2-2/kafka/bin/kafka-console-producer.sh --broker-list sandbox.hortonworks.com:6667 --topic nn_jmx_metric_sandbox
+        $ {"host": "localhost", "timestamp": 1457033916718, "metric": "hadoop.namenode.fsnamesystemstate.fsstate", "component": "namenode", "site": "sandbox", "value": 1.0}
+  

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e618d256/eagle-docs/userguide/sandbox-quick-start.md
----------------------------------------------------------------------
diff --git a/eagle-docs/userguide/sandbox-quick-start.md b/eagle-docs/userguide/sandbox-quick-start.md
new file mode 100644
index 0000000..8ad41d3
--- /dev/null
+++ b/eagle-docs/userguide/sandbox-quick-start.md
@@ -0,0 +1,140 @@
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+Guide To Install Eagle Hortonworks sandbox. 
+===============================================
+* Prerequisite
+* Download + Patch + Build
+* Setup Hadoop Environment.
+* Stream HDFS audit logs into Kafka.
+* Install Eagle.
+* Demos "HDFS File System" & "Hive" monitoring
+
+### **Prerequisite**
+* To install Eagle on a sandbox you need to run a HDP sandbox image in a virtual machine with 8GB memory recommended.
+	1. Get Virtual Box or VMware [Virtualization environment](http://hortonworks.com/products/hortonworks-sandbox/#install)
+	2. Get [Hortonworks Sandbox v 2.2.4](http://hortonworks.com/products/hortonworks-sandbox/#archive)
+* JDK 1.7  
+* NPM (On MAC OS try "brew install node") 	
+<br/>
+
+### **Download + Patch + Build**
+* Download latest Eagle source released From Apache [[Tar]](http://www-us.apache.org/dist/incubator/eagle/apache-eagle-0.3.0-incubating/apache-eagle-0.3.0-incubating-src.tar.gz) , [[MD5]](http://www-us.apache.org/dist/incubator/eagle/apache-eagle-0.3.0-incubating/apache-eagle-0.3.0-incubating-src.tar.gz.md5) 
+* Build manually with [Apache Maven](https://maven.apache.org/):
+
+     >$ tar -zxvf apache-eagle-0.3.0-incubating-src.tar.gz <br/>
+     >$ cd incubator-eagle-release-0.3.0-rc3 <br/>
+     >$ curl -O https://patch-diff.githubusercontent.com/raw/apache/incubator-eagle/pull/150.patch <br/>
+     >$ git apply 150.patch <br/>
+     >$ mvn clean package -DskipTests <br/>
+     
+* After building successfully, you will get the tarball under `eagle-assembly/target/` named as `eagle-0.3.0-incubating-bin.tar.gz`
+<br/>
+
+### **Setup Hadoop Environment In Sandbox**
+1. Launch Ambari to manage the Hadoop environment
+   * Enable Ambari in sandbox http://127.0.0.1:8000 (Click on Enable Button)
+   * Login to Ambari UI http://127.0.0.1:8080/ with username and password as "admin"
+2. Grant root as HBase superuser via Ambari
+![add superuser](https://github.com/hdendukuri/incubator-eagle/blob/master/eagle-docs/images/hbase-superuser.png)
+3. Start HBase,Storm & Kafka from Ambari. Showing Storm as an example below. 
+![Restart Services](https://github.com/hdendukuri/incubator-eagle/blob/master/eagle-docs/images/start-storm.png "Services")
+4. If the NAT network is used in a virtual machine, it's required to add port 9099 to forwarding ports
+  ![Forwarding Port](https://github.com/hdendukuri/incubator-eagle/blob/master/eagle-docs/images/eagle-service.png)
+
+<br/>
+
+### **Stream HDFS audit logs into Kafka**   
+ 
+**Note**: This section is only needed for "HDFS File System" Monitoring.
+ 
+* **Step 1**: Configure Advanced hadoop-log4j via <a href="http://localhost:8080/#/main/services/HDFS/configs" target="_blank">Ambari UI</a>, and add below "KAFKA_HDFS_AUDIT" log4j appender to hdfs audit logging.
+
+	log4j.appender.KAFKA_HDFS_AUDIT=org.apache.eagle.log4j.kafka.KafkaLog4jAppender
+	log4j.appender.KAFKA_HDFS_AUDIT.Topic=sandbox_hdfs_audit_log
+	log4j.appender.KAFKA_HDFS_AUDIT.BrokerList=sandbox.hortonworks.com:6667
+	log4j.appender.KAFKA_HDFS_AUDIT.KeyClass=org.apache.eagle.log4j.kafka.hadoop.AuditLogKeyer
+	log4j.appender.KAFKA_HDFS_AUDIT.Layout=org.apache.log4j.PatternLayout
+	log4j.appender.KAFKA_HDFS_AUDIT.Layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n
+	log4j.appender.KAFKA_HDFS_AUDIT.ProducerType=async
+
+    ![HDFS LOG4J Configuration](https://github.com/hdendukuri/incubator-eagle/blob/master/eagle-docs/images/hdfs-log4j-conf.png "hdfslog4jconf")
+
+* **Step 2**: Edit Advanced hadoop-env via <a href="http://localhost:8080/#/main/services/HDFS/configs" target="_blank">Ambari UI</a>, and add the reference to KAFKA_HDFS_AUDIT to HADOOP_NAMENODE_OPTS.
+
+      -Dhdfs.audit.logger=INFO,DRFAAUDIT,KAFKA_HDFS_AUDIT
+
+    ![HDFS Environment Configuration](https://github.com/hdendukuri/incubator-eagle/blob/master/eagle-docs/images/hdfs-env-conf.png "hdfsenvconf")
+
+* **Step 3**: Edit Advanced hadoop-env via <a href="http://localhost:8080/#/main/services/HDFS/configs" target="_blank">Ambari UI</a>, and append the following command to it.
+
+      export HADOOP_CLASSPATH=${HADOOP_CLASSPATH}:/usr/hdp/current/eagle/lib/log4jkafka/lib/*
+
+    ![HDFS Environment Configuration](https://github.com/hdendukuri/incubator-eagle/blob/master/eagle-docs/images/hdfs-env-conf2.png "hdfsenvconf2")
+
+* **Step 4**: save the changes 
+
+* **Step 5**: "Restart All" Storm & Kafka from Ambari. (Similar to starting server in pervious step except make sure to click on "Restart All")
+
+* **Step 6**: Restart name node 
+![Restart Services](https://github.com/hdendukuri/incubator-eagle/blob/master/eagle-docs/images/nn-restart.png "Services")
+
+* **Step 7**: Check whether logs from are flowing into topic `sandbox_hdfs_audit_log`
+      
+      > /usr/hdp/2.2.4.2-2/kafka/bin/kafka-console-consumer.sh --zookeeper sandbox.hortonworks.com:2181 --topic sandbox_hdfs_audit_log      
+      
+<br/>
+
+### **Install Eagle**
+The following installation actually contains installing and setting up a sandbox site with HdfsAuditLog & HiveQueryLog  data sources. 
+    
+    >$ scp -P 2222  /eagle-assembly/target/eagle-0.3.0-incubating-bin.tar.gz root@127.0.0.1:/root/ <br/>
+    >$ ssh root@127.0.0.1 -p 2222 <br/>
+    >$ tar -zxvf eagle-0.3.0-incubating-bin.tar.gz <br/>
+    >$ mv eagle-0.3.0-incubating eagle <br/>
+    >$ mv eagle /usr/hdp/current/ <br/>
+    >$ cd /usr/hdp/current/eagle <br/>
+    >$ examples/eagle-sandbox-starter.sh <br/>
+
+<br/>
+
+### **Demos**
+* Login to Eagle UI [http://localhost:9099/eagle-service/](http://localhost:9099/eagle-service/) username and password as "admin" and "secret"
+* **HDFS**:
+	1. Click on menu "DAM" and select "HDFS" to view HDFS policy
+	2. You should see policy with name "viewPrivate". This Policy generates alert when any user reads HDFS file name "private" under "tmp" folder.
+	3. In sandbox read restricted HDFS file "/tmp/private" by using command 
+	
+	   > hadoop fs -cat "/tmp/private"
+
+	From UI click on alert tab and you should see alert for the attempt to read restricted file.  
+* **Hive**:
+	1. Click on menu "DAM" and select "Hive" to view Hive policy
+	2. You should see policy with name "queryPhoneNumber". This Policy generates alert when hive table with sensitivity(Phone_Number) information is queried. 
+	3. In sandbox read restricted sensitive HIVE column.
+	
+       >$ su hive <br/>
+       >$ hive <br/>
+       >$ set hive.execution.engine=mr; <br/>
+       >$ use xademo; <br/>
+       >$ select a.phone_number from customer_details a, call_detail_records b where a.phone_number=b.phone_number; <br/>
+
+    From UI click on alert tab and you should see alert for your attempt to dfsf read restricted column.  
+
+<br/>


[37/47] incubator-eagle git commit: EAGLE-303. Split event fields into table in email for clearly reading. prettify alert email

Posted by mw...@apache.org.
EAGLE-303. Split event fields into table in email for clearly reading.
prettify alert email

Author: @Huizhi <hn...@ebay.com>
Reviewer: @yonzhang <yo...@gmail.com>

Closes: #242


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/2eb5d538
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/2eb5d538
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/2eb5d538

Branch: refs/heads/master
Commit: 2eb5d5387bb253d28259cdb714d4c68ad6f88269
Parents: b49bda1
Author: yonzhang <yo...@gmail.com>
Authored: Fri Jun 17 10:54:03 2016 -0700
Committer: yonzhang <yo...@gmail.com>
Committed: Fri Jun 17 10:54:03 2016 -0700

----------------------------------------------------------------------
 .../notification/email/AlertEmailGenerator.java |  31 +-
 .../notification/email/AlertEmailSender.java    |  16 +-
 .../src/main/resources/ALERT_DEFAULT.vm         | 488 ++++++++++---------
 .../siddhi/SiddhiAlertAPIEntityRender.java      |  18 +-
 .../src/main/resources/application.conf         |  13 +-
 .../apache/eagle/policy/common/Constants.java   |   1 +
 6 files changed, 311 insertions(+), 256 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2eb5d538/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailGenerator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailGenerator.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailGenerator.java
index fd6b794..db24390 100644
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailGenerator.java
+++ b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailGenerator.java
@@ -41,7 +41,9 @@ public class AlertEmailGenerator{
 
     private final static Logger LOG = LoggerFactory.getLogger(AlertEmailGenerator.class);
 
-    private final static long MAX_TIMEOUT_MS =60000;
+    private final static long MAX_TIMEOUT_MS = 60000;
+
+    private final static String EVENT_FIELDS_SPLITTER = ",";
 
     public boolean sendAlertEmail(AlertAPIEntity entity) {
         return sendAlertEmail(entity, recipients, null);
@@ -56,15 +58,21 @@ public class AlertEmailGenerator{
         AlertEmailContext email = new AlertEmailContext();
 
         AlertEmailComponent component = new AlertEmailComponent();
-        AlertContext  context = AlertContext.fromJsonString(entity.getAlertContext());
+        AlertContext context = AlertContext.fromJsonString(entity.getAlertContext());
         component.setAlertContext(context);
+        AlertEmailComponent eventComponent = getEventComponent(context);
         List<AlertEmailComponent> components = new ArrayList<AlertEmailComponent>();
         components.add(component);
+        components.add(eventComponent);
         email.setComponents(components);
+
         if (context.getProperty(Constants.SUBJECT) != null) {
             email.setSubject(context.getProperty(Constants.SUBJECT));
         }
-        else email.setSubject(subject);
+        else {
+            email.setSubject(subject);
+        }
+
         email.setVelocityTplFile(tplFile);
         email.setRecipients(recipients);
         email.setCc(cc);
@@ -76,7 +84,7 @@ public class AlertEmailGenerator{
 
         if(this.executorPool == null) throw new IllegalStateException("Invoking thread executor pool but it's is not set yet");
 
-        LOG.info("Sending email  in asynchronous to: "+recipients+", cc: "+cc);
+        LOG.info("Sending email in asynchronous to: "+ recipients +", cc: " + cc);
         Future future = this.executorPool.submit(thread);
         try {
             future.get(MAX_TIMEOUT_MS, TimeUnit.MILLISECONDS);
@@ -135,4 +143,19 @@ public class AlertEmailGenerator{
     public void setExecutorPool(ThreadPoolExecutor executorPool) {
         this.executorPool = executorPool;
     }
+
+    private AlertEmailComponent getEventComponent(AlertContext context) {
+        AlertContext eventFieldsContext = new AlertContext();
+        String eventFields = context.getProperty(Constants.ALERT_EVENT_FIELDS);
+        String[] fields = eventFields.split(EVENT_FIELDS_SPLITTER);
+
+        for (String key : fields) {
+            eventFieldsContext.addProperty(key, context.getProperty(key));
+        }
+
+        AlertEmailComponent component = new AlertEmailComponent();
+        component.setAlertContext(eventFieldsContext);
+
+        return component;
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2eb5d538/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailSender.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailSender.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailSender.java
index c2c4949..ef98f22 100644
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailSender.java
+++ b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailSender.java
@@ -88,7 +88,8 @@ public class AlertEmailSender implements Runnable {
         String tmp = ManagementFactory.getRuntimeMXBean().getName();
         this.origin = tmp.split("@")[1] + "(pid:" + tmp.split("@")[0] + ")";
         threadName = Thread.currentThread().getName();
-        LOG.info("Initialized "+threadName+": origin is : " + this.origin+", recipient of the email: " + this.recipents+", velocity TPL file: " + this.configFileName);
+        LOG.info("Initialized "+threadName+": origin is : " + this.origin+", recipient of the email: "
+                + this.recipents+", velocity TPL file: " + this.configFileName);
     }
 
     public AlertEmailSender(AlertEmailContext alertEmail, ConfigObject eagleProps){
@@ -100,8 +101,8 @@ public class AlertEmailSender implements Runnable {
     public void run() {
         int count = 0;
         boolean success = false;
-        while(count++ < MAX_RETRY_COUNT && !success){
-            LOG.info("Sending email, tried: " + count+", max: "+ MAX_RETRY_COUNT);
+        while(count++ < MAX_RETRY_COUNT && !success) {
+            LOG.info("Sending email, tried: " + count + ", max: " + MAX_RETRY_COUNT);
             try {
                 final EagleMailClient client;
                 if (eagleProps != null) {
@@ -172,20 +173,21 @@ public class AlertEmailSender implements Runnable {
 
         if(success){
             sentSuccessfully = true;
-            LOG.info(String.format("Successfully send email, thread: %s",threadName));
+            LOG.info(String.format("Successfully send email, thread: %s", threadName));
         }else{
-            LOG.warn(String.format("Fail sending email after tries %s times, thread: %s",MAX_RETRY_COUNT,threadName));
+            LOG.warn(String.format("Fail sending email after tries %s times, thread: %s", MAX_RETRY_COUNT, threadName));
         }
     }
 
     private void generateCommonContext(VelocityContext context) {
-        context.put(Constants.ALERT_EMAIL_TIME_PROPERTY, DateTimeUtil.millisecondsToHumanDateWithSeconds( System.currentTimeMillis() ));
+        context.put(Constants.ALERT_EMAIL_TIME_PROPERTY,
+                DateTimeUtil.millisecondsToHumanDateWithSeconds(System.currentTimeMillis()));
         context.put(Constants.ALERT_EMAIL_COUNT_PROPERTY, alertContexts.size());
         context.put(Constants.ALERT_EMAIL_ALERTLIST_PROPERTY, alertContexts);
         context.put(Constants.ALERT_EMAIL_ORIGIN_PROPERTY, origin);
     }
 
-    public boolean sentSuccessfully(){
+    public boolean sentSuccessfully() {
         return this.sentSuccessfully;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2eb5d538/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/ALERT_DEFAULT.vm
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/ALERT_DEFAULT.vm b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/ALERT_DEFAULT.vm
index 3e29439..7135569 100644
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/ALERT_DEFAULT.vm
+++ b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/ALERT_DEFAULT.vm
@@ -16,251 +16,263 @@
   -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
-	<head>
-		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-		<meta name="viewport" content="width=device-width"/>
-		<style>
-			body {
-				width:100% !important;
-				min-width: 100%;
-				-webkit-text-size-adjust:100%;
-				-ms-text-size-adjust:100%;
-				margin:0;
-				padding:0;
-			}
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+        <meta name="viewport" content="width=device-width"/>
+        <style>
+            body {
+                width:100% !important;
+                min-width: 100%;
+                -webkit-text-size-adjust:100%;
+                -ms-text-size-adjust:100%;
+                margin:0;
+                padding:0;
+            }
 
-			table {
-				border-spacing: 0;
-				border-collapse: collapse;
-			}
+            table {
+                border-spacing: 0;
+                border-collapse: collapse;
+            }
 
-			table th,
-			table td {
-				padding: 3px 0 3px 0;
-			}
+            table th,
+            table td {
+                padding: 3px 0 3px 0;
+            }
 
-			.body {
-				width: 100%;
-			}
+            .body {
+                width: 100%;
+            }
 
-			p,a,h1,h2,h3,ul,ol,li {
-				font-family: Helvetica, Arial, sans-serif;
-				font-weight: normal;
-				margin: 0;
-				padding: 0;
-			}
-			p {
-				font-size: 14px;
-				line-height: 19px;
-			}
-			a {
-				color: #3294b1;
-			}
-			h1 {
-				font-size: 36px;
-				margin: 15px 0 5px 0;
-			}
-			h2 {
-				font-size: 32px;
-			}
-			h3 {
-				font-size: 28px;
-			}
+            p,a,h1,h2,h3,ul,ol,li {
+                font-family: Helvetica, Arial, sans-serif;
+                font-weight: normal;
+                margin: 0;
+                padding: 0;
+            }
+            p {
+                font-size: 14px;
+                line-height: 19px;
+            }
+            a {
+                color: #3294b1;
+            }
+            h1 {
+                font-size: 36px;
+                margin: 15px 0 5px 0;
+            }
+            h2 {
+                font-size: 32px;
+            }
+            h3 {
+                font-size: 28px;
+            }
 
-			ul,ol {
-				margin: 0 0 0 25px;
-				padding: 0;
-			}
+            ul,ol {
+                margin: 0 0 0 25px;
+                padding: 0;
+            }
 
-			.btn {
-				background: #2ba6cb !important;
-				border: 1px solid #2284a1;
-				padding: 10px 20px 10px 20px;
-				text-align: center;
-			}
-			.btn:hover {
-				background: #2795b6 !important;
-			}
-			.btn a {
-				color: #FFFFFF;
-				text-decoration: none;
-				font-weight: bold;
-				padding: 10px 20px 10px 20px;
-			}
+            .btn {
+                background: #2ba6cb !important;
+                border: 1px solid #2284a1;
+                padding: 10px 20px 10px 20px;
+                text-align: center;
+            }
+            .btn:hover {
+                background: #2795b6 !important;
+            }
+            .btn a {
+                color: #FFFFFF;
+                text-decoration: none;
+                font-weight: bold;
+                padding: 10px 20px 10px 20px;
+            }
 
-			.tableBordered {
-				border-top: 1px solid #b9e5ff;
-			}
-			.tableBordered th {
-				background: #ECF8FF;
-			}
-			.tableBordered th p {
-				font-weight: bold;
-				color: #3294b1;
-			}
-			.tableBordered th,
-			.tableBordered td {
-				color: #333333;
-				border-bottom: 1px solid #b9e5ff;
-				text-align: center;
-				padding-bottom: 5px;
-			}
+            .tableBordered {
+                border-top: 1px solid #b9e5ff;
+            }
+            .tableBordered th {
+                background: #ECF8FF;
+            }
+            .tableBordered th p {
+                font-weight: bold;
+                color: #3294b1;
+            }
+            .tableBordered th,
+            .tableBordered td {
+                color: #333333;
+                border-bottom: 1px solid #b9e5ff;
+                text-align: center;
+                padding-bottom: 5px;
+            }
 
-			.panel {
-				height: 100px;
-			}
-		</style>
-	</head>
-	<body>
-		#set ( $elem = $alertList[0] )
-		#set ( $alertUrl = $elem["alertDetailUrl"] )
-		#set ( $policyUrl = $elem["policyDetailUrl"] )
-		<table class="body">
-			<tr>
-				<td align="center" valign="top" style="background: #999999; padding: 0 0 0 0;">
-					<!-- Eagle Header -->
-					<table width="580">
-						<tr>
-							<td style="padding: 0 0 0 0;" align="left" >
-								<p style="color:#FFFFFF;font-weight: bold; font-size: 24px">Eagle</p>
-							</td>
-						</tr>
-					</table>
-				</td>
-			</tr>
+            .panel {
+                height: 100px;
+            }
+        </style>
+    </head>
+    <body>
+        #set ( $elem = $alertList[0] )
+        #set ( $eventFields = $alertList[1] )
+        #set ( $alertUrl = $elem["alertDetailUrl"] )
+        #set ( $policyUrl = $elem["policyDetailUrl"] )
+        <table class="body">
+            <tr>
+                <td align="center" valign="top" style="background: #999999; padding: 0 0 0 0;">
+                    <!-- Eagle Header -->
+                    <table width="90%">
+                        <tr>
+                            <td style="padding: 0 0 0 0;" align="left" >
+                                <p style="color:#FFFFFF;font-weight: bold; font-size: 24px">Eagle</p>
+                            </td>
+                        </tr>
+                    </table>
+                </td>
+            </tr>
 
-			<tr>
-				<td align="center" valign="top">
-					<!-- Eagle Body -->
-					<table width="580">
-						<tr>
-							<!-- Title -->
-							<td align="center">
-								<h1>$elem["application"] Alert Detected</h1>
-							</td>
-						</tr>
-						<tr>
-							<!-- Time -->
-							<td>
-								<table width="580">
-									<tr>
-										<td>
-											<p><b>Detected Time: $elem["alertTimestamp"]</b></p>
-										</td>
-										#set ( $severity = $elem["severity"] )
-										#if (!$severity || ("$severity" == ""))
-											#set ( $elem["severity"] = "WARNING")
-										#end
-										<td align="right">
-											<p><b>
-												Severity:
-									            #if ($elem["severity"] == "WARNING")
-													<span>$elem["severity"]</span>												
-    											#else
-													<span style="color: #FF0000;">$elem["severity"]</span>
-    											#end
-											</b></p>
-										</td>
-									</tr>
-								</table>
-							</td>
-						</tr>
-						<tr>
-							<!-- Description -->
-							<td valign="top" style="background: #ECF8FF; border: 1px solid #b9e5ff; padding: 10px 10px 12px 10px;">
-								<p>$elem["alertMessage"]</p>
-							</td>
-						</tr>
-						<tr>
-							<!-- View Detail -->
-							<td align="center" style="padding: 10px 0 0 0;">
-								<table width="580">
-									<tr>
-										<td class="btn">
-											<a href="$alertUrl">View Alert Details on Eagle Web</a>
-										</td>
-									</tr>
-								</table>
-							</td>
-						</tr>
-						<tr>
-							<!-- Basic Information -->
-							<td style="padding: 20px 0 0 0;">
-								<p><b>Basic Information:</b></p>
-							</td>
-						</tr>
-						<tr>
-							<!-- Basic Information Content -->
-							<td>
-								<table class="tableBordered" width="580">
-									<tr>
-										<th>
-											<p>Site</p>
-										</th>
-										<th>
-											<p>Data Source</p>
-										</th>
-									</tr>
-									<tr>
-										<td>
-											<p>$elem["site"]</p>
-										</td>
-										<td>
-											<p>$elem["application"]</p>
-										</td>
-									</tr>
-									<tr>
-										<th>
-											<p>Policy Name</p>
-										</th>
-										<th>
-											<p>Severity</p>
-										</th>
-									</tr>
-									<tr>
-										<td>
-											<p>$elem["policyId"]</p>
-										</td>
-										<td>
-											<p>$elem["severity"]</p>
-										</td>
-									</tr>
-								</table>
-							</td>
-						</tr>
-						<tr>
-							<!-- View Detail -->
-							<td align="center" style="padding: 10px 0 0 0;">
-								<table width="580">
-									<tr>
-										<td class="btn">
-											<a href="$policyUrl">View Policy Details on Eagle Web</a>
-										</td>
-									</tr>
-								</table>
-							</td>
-						</tr>						
-						<tr>
-							<!-- Actions Required -->
-							<td style="padding: 20px 0 0 0;">
-								<p><b>Actions Required:</b></p>
-							</td>
-						</tr>
-						<tr>
-							<!-- Possible Root Causes Content -->
-							<td class="panel" valign="top" style="background: #F4F4F4; border: 1px solid #AAAAAA; padding: 10px 10px 12px 10px;">
-								<p> $elem["application"] alert found, please check.</p>
-							</td>
-						</tr>
-						<tr>
-							<!-- Copyright -->
-							<td align="center">
-								<p><a href="<Eagle-Host>/alerts/alertlist.html">Apache Eagle</a></p>
-							</td>
-						</tr>
-					</table>
-				</td>
-			</tr>
-		</table>
-	</body>
+            <tr>
+                <td align="center" valign="top">
+                    <!-- Eagle Body -->
+                    <table width="90%">
+                        <tr>
+                            <!-- Title -->
+                            <td align="center">
+                                <h1>$elem["application"] Alert Detected</h1>
+                            </td>
+                        </tr>
+                        <tr>
+                            <!-- Time -->
+                            <td>
+                                <table width="100%">
+                                    <tr>
+                                        <td>
+                                            <p><b>Detected Time: $elem["alertTimestamp"]</b></p>
+                                        </td>
+                                        #set ( $severity = $elem["severity"] )
+                                        #if (!$severity || ("$severity" == ""))
+                                            #set ( $elem["severity"] = "WARNING")
+                                        #end
+                                        <td align="right">
+                                            <p><b>
+                                                Severity:
+                                                #if ($elem["severity"] == "WARNING")
+                                                    <span>$elem["severity"]</span>
+                                                #else
+                                                    <span style="color: #FF0000;">$elem["severity"]</span>
+                                                #end
+                                            </b></p>
+                                        </td>
+                                    </tr>
+                                </table>
+                            </td>
+                        </tr>
+                        <!-- Description -->
+                        <tr>
+                            <td>
+                                <table class="tableBordered" width="100%">
+                                    #foreach ($key in $eventFields.keySet())
+                                        <tr>
+                                            <th>
+                                                <p>$key</p>
+                                            </th>
+                                            <td>
+                                                $eventFields.get($key)
+                                            </td>
+                                        </tr>
+                                    #end
+                                </table>
+                            </td>
+                        </tr>
+                        <tr>
+                            <!-- View Detail -->
+                            <td align="center" style="padding: 10px 0 0 0;">
+                                <table width="100%">
+                                    <tr>
+                                        <td class="btn">
+                                            <a href="$alertUrl">View Alert Details on Eagle Web</a>
+                                        </td>
+                                    </tr>
+                                </table>
+                            </td>
+                        </tr>
+                        <tr>
+                            <!-- Basic Information -->
+                            <td style="padding: 20px 0 0 0;">
+                                <p><b>Basic Information:</b></p>
+                            </td>
+                        </tr>
+                        <tr>
+                            <!-- Basic Information Content -->
+                            <td>
+                                <table class="tableBordered" width="100%">
+                                    <tr>
+                                        <th>
+                                            <p>Site</p>
+                                        </th>
+                                        <th>
+                                            <p>Data Source</p>
+                                        </th>
+                                    </tr>
+                                    <tr>
+                                        <td>
+                                            <p>$elem["site"]</p>
+                                        </td>
+                                        <td>
+                                            <p>$elem["application"]</p>
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        <th>
+                                            <p>Policy Name</p>
+                                        </th>
+                                        <th>
+                                            <p>Severity</p>
+                                        </th>
+                                    </tr>
+                                    <tr>
+                                        <td>
+                                            <p>$elem["policyId"]</p>
+                                        </td>
+                                        <td>
+                                            <p>$elem["severity"]</p>
+                                        </td>
+                                    </tr>
+                                </table>
+                            </td>
+                        </tr>
+                        <tr>
+                            <!-- View Detail -->
+                            <td align="center" style="padding: 10px 0 0 0;">
+                                <table width="100%">
+                                    <tr>
+                                        <td class="btn">
+                                            <a href="$policyUrl">View Policy Details on Eagle Web</a>
+                                        </td>
+                                    </tr>
+                                </table>
+                            </td>
+                        </tr>
+                        <tr>
+                            <!-- Actions Required -->
+                            <td style="padding: 20px 0 0 0;">
+                                <p><b>Actions Required:</b></p>
+                            </td>
+                        </tr>
+                        <tr>
+                            <!-- Possible Root Causes Content -->
+                            <td class="panel" valign="top" style="background: #F4F4F4; border: 1px solid #AAAAAA; padding: 10px 10px 12px 10px;">
+                                <p> $elem["application"] alert found, please check.</p>
+                            </td>
+                        </tr>
+                        <tr>
+                            <!-- Copyright -->
+                            <td align="center">
+                                <p><a href="https://eagle.incubator.apache.org">Apache Eagle</a></p>
+                            </td>
+                        </tr>
+                    </table>
+                </td>
+            </tr>
+        </table>
+    </body>
 </html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2eb5d538/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/siddhi/SiddhiAlertAPIEntityRender.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/siddhi/SiddhiAlertAPIEntityRender.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/siddhi/SiddhiAlertAPIEntityRender.java
index c7ff74c..cef2a28 100644
--- a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/siddhi/SiddhiAlertAPIEntityRender.java
+++ b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/siddhi/SiddhiAlertAPIEntityRender.java
@@ -73,20 +73,31 @@ public class SiddhiAlertAPIEntityRender implements ResultRender<AlertDefinitionA
 		}
 
 		StringBuilder sb = new StringBuilder();
+		StringBuilder keysSb = new StringBuilder();
+		String prefix = "";
+
 		for (Entry<String, String> entry : context.getProperties().entrySet()) {
 			String key = entry.getKey();
 			String value = entry.getValue();
-			sb.append(key + "=\"" + value + "\" ");			
+			sb.append(key).append("=\"").append(value).append("\" ");
+
+			keysSb.append(prefix).append(key);
+			prefix = ",";
 		}
+
+		String alertEventFields = keysSb.toString();
+		String alertEvent = sb.toString();
+
 		context.addAll(evaluator.getAdditionalContext());
 		String policyId = context.getProperty(Constants.POLICY_ID);
-		String alertMessage = "The Policy \"" + policyId + "\" has been detected with the below information: " + sb.toString() ;
+		String alertMessage = "The Policy \"" + policyId + "\" has been detected with the below information: " + alertEvent;
 		String site = config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.SITE);
 		String application = config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.APPLICATION);
 		String host = config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.HOST);
 		Integer port = config.getInt(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.PORT);
 
-		context.addProperty(Constants.ALERT_EVENT, sb.toString());
+		context.addProperty(Constants.ALERT_EVENT, alertEvent);
+		context.addProperty(Constants.ALERT_EVENT_FIELDS, alertEventFields);
 		context.addProperty(Constants.ALERT_MESSAGE, alertMessage);
 		context.addProperty(Constants.ALERT_TIMESTAMP_PROPERTY, DateTimeUtil.millisecondsToHumanDateWithSeconds(System.currentTimeMillis()));
 		context.addProperty(EagleConfigConstants.APPLICATION, application);
@@ -104,6 +115,7 @@ public class SiddhiAlertAPIEntityRender implements ResultRender<AlertDefinitionA
 		context.addProperty(Constants.POLICY_DETAIL_URL, UrlBuilder.buiildPolicyDetailUrl(host, port, tags));
 		context.addProperty(Constants.ALERT_DETAIL_URL, UrlBuilder.buildAlertDetailUrl(host, port, entity));
 		entity.setAlertContext(context.toJsonString());
+
 		return entity;
 	}	
 }

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2eb5d538/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/resources/application.conf b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/resources/application.conf
index 72c2ae5..526e47f 100644
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/resources/application.conf
+++ b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/resources/application.conf
@@ -47,9 +47,14 @@
     "site" : "sandbox",
     "application": "SpadesMonitor",
     "dataJoinPollIntervalSec" : 30,
-    "mailHost" : "mailHost.com",
-    "mailSmtpPort":"25",
-    "mailDebug" : "true",
+    "mailHost" : "smtp.office365.com",
+    "mailSmtpPort":"587",
+    "mailSmtpAuth" : "true",
+    "mailSmtpUser" : "username",
+    "mailSmtpPassword" : "password",
+    #"mailSmtpSslEnable" : "true",
+    "mailSmtpTlsEnable" : "true",
+    "mailDebug" : "false",
     "balancePartitionEnabled" : true,
     #"partitionRefreshIntervalInMin" : 60,
     #"kafkaStatisticRangeInMin" : 60,
@@ -70,4 +75,4 @@
     "eagleStoreEnabled": true,
     "kafka_broker":"127.0.0.1:6667"
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2eb5d538/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/Constants.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/Constants.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/Constants.java
index 2a33460..1b65685 100644
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/Constants.java
+++ b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/Constants.java
@@ -53,6 +53,7 @@ public class Constants {
 	public static final String POLICY_ID = "policyId";
     public static final String SOURCE_STREAMS = "sourceStreams";
     public static final String ALERT_EVENT = "alertEvent";
+	public static final String ALERT_EVENT_FIELDS = "alertEventFields";
 	public static final String POLICY_DETAIL_URL = "policyDetailUrl";
 	public static final String ALERT_DETAIL_URL = "alertDetailUrl";
 


[45/47] incubator-eagle git commit: [EAGLE-367] update CHANGELOG.txt appending bug-info of: EAGLE-355, EAGLE-356

Posted by mw...@apache.org.
[EAGLE-367] update CHANGELOG.txt appending bug-info of: EAGLE-355, EAGLE-356

Author: anyway1021 <mw...@apache.org>

Closes #259 from anyway1021/EAGLE-367.


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/eac0f279
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/eac0f279
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/eac0f279

Branch: refs/heads/master
Commit: eac0f27958f2ed8c6842938dad0a995a87fd0715
Parents: 9cd75b1
Author: anyway1021 <mw...@apache.org>
Authored: Mon Jul 11 15:21:16 2016 +0800
Committer: anyway1021 <mw...@apache.org>
Committed: Mon Jul 11 16:54:52 2016 +0800

----------------------------------------------------------------------
 CHANGELOG.txt | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/eac0f279/CHANGELOG.txt
----------------------------------------------------------------------
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 657e31d..42072bb 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -102,6 +102,8 @@ Release Notes - Apache Eagle 0.4.0 (incubating)
     * [EAGLE-330] - Hive ql.Parser can't parser a hive query sql with keywords
     * [EAGLE-338] - fix topology-assembly build issue because of module name change
     * [EAGLE-346] - ClassNotFoundException thrown out when topology is executing
+    * [EAGLE-355] - UI advanced policy expression can't parse
+    * [EAGLE-356] - Fix Authentication problem to query resource manager web service
 
 ** Task
     * [EAGLE-73] - Put docker steps to site tutorial


[20/47] incubator-eagle git commit: EAGLE-280 Mapr integration EAGLE-280 EAGLE-282 EAGLE-284 EAGLE-307: Mapr integration

Posted by mw...@apache.org.
EAGLE-280 Mapr integration
EAGLE-280 EAGLE-282 EAGLE-284 EAGLE-307: Mapr integration

Author: Daniel Zhou, DadanielZ
Reviewer: Yong Zhang, yonzhang2012@gmail.com

Closes #201


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/253f99bc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/253f99bc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/253f99bc

Branch: refs/heads/master
Commit: 253f99bce6fb72fd18823dca0d496516fda6dde0
Parents: 5578cfd
Author: yonzhang <yo...@gmail.com>
Authored: Wed May 25 22:13:02 2016 -0700
Committer: yonzhang <yo...@gmail.com>
Committed: Wed May 25 22:13:02 2016 -0700

----------------------------------------------------------------------
 .../src/main/docs/logstash-kafka-conf.md        |  59 ++++-
 .../eagle-alert-notification-plugin/pom.xml     |   4 -
 .../org/apache/eagle/common/DateTimeUtil.java   |  12 ++
 .../security/hdfs/MAPRFSAuditLogObject.java     |  31 +++
 .../security/hdfs/MAPRFSAuditLogParser.java     |  67 ++++++
 .../crawler/audit/TestMAPRFSAuditLogParser.java |  64 ++++++
 .../eagle-security-maprfs-auditlog/pom.xml      |  74 +++++++
 .../MapRFSAuditLogKafkaDeserializer.java        |  69 ++++++
 .../auditlog/MapRFSAuditLogProcessorMain.java   | 115 ++++++++++
 .../src/main/resources/application.conf         |  69 ++++++
 .../src/main/resources/log4j.properties         |  40 ++++
 .../src/main/resources/maprFSAuditLog-init.sh   | 213 +++++++++++++++++++
 .../main/resources/security-auditlog-storm.yaml |  18 ++
 .../eagle-security-maprfs-web/pom.xml           |  70 ++++++
 .../hdfs/resolver/MAPRFSCommandResolver.java    |  72 +++++++
 .../hdfs/resolver/MAPRStatusCodeResolver.java   |  81 +++++++
 eagle-security/pom.xml                          |   2 +
 eagle-webservice/pom.xml                        |   5 +
 pom.xml                                         | 203 +++++++++++++-----
 19 files changed, 1205 insertions(+), 63 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/253f99bc/eagle-assembly/src/main/docs/logstash-kafka-conf.md
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/docs/logstash-kafka-conf.md b/eagle-assembly/src/main/docs/logstash-kafka-conf.md
index 84952e0..9003fb4 100644
--- a/eagle-assembly/src/main/docs/logstash-kafka-conf.md
+++ b/eagle-assembly/src/main/docs/logstash-kafka-conf.md
@@ -22,7 +22,7 @@
 ### Install logstash-kafka plugin
 
 
-#### For Logstash 1.5.x
+#### For Logstash 1.5.x, 2.x
 
 
 logstash-kafka has been intergrated into [logstash-input-kafka][logstash-input-kafka] and [logstash-output-kafka][logstash-output-kafka], you can directly use it.
@@ -32,7 +32,7 @@ logstash-kafka has been intergrated into [logstash-input-kafka][logstash-input-k
 
 #### For Logstash 1.4.x
 
-In logstash 1.4.x, the online version does not support specifying partition\_key for Kafka producer, and data will be produced into each partitions in turn. For eagle, we need to use the src in hdfs\_audit\_log as the partition key, so some hacking work have been done. If you have the same requirment, you can follow it. 
+In logstash 1.4.x, the online version does not support specifying partition\_key for Kafka producer, and data will be produced into each partitions in turn. For eagle, we need to use the src in hdfs\_audit\_log as the partition key, so some hacking work have been done. If you have the same requirment, you can follow it.
 
 1. Install logstash-kafka
 
@@ -51,13 +51,13 @@ In logstash 1.4.x, the online version does not support specifying partition\_key
 2. Hacking the kafka.rb
 
    We have added partition\_key\_format, which is used to specify the partition_key and supported by logstash 1.5.x, into  lib/logstash/outputs/kafka.rb. More details are shown [here](https://github.xyz.com/eagle/eagle/blob/master/eagle-assembly/src/main/docs/kafka.rb).
-       
+
           config :partition_key_format, :validate => :string, :default => nil
-        
+
           public
           def register
             LogStash::Logger.setup_log4j(@logger)
-        
+
             options = {
                 :broker_list => @broker_list,
                 :compression_codec => @compression_codec,
@@ -80,9 +80,9 @@ In logstash 1.4.x, the online version does not support specifying partition\_key
             }
             @producer = Kafka::Producer.new(options)
             @producer.connect
-        
+
             @logger.info('Registering kafka producer', :topic_id => @topic_id, :broker_list => @broker_list)
-        
+
             @codec.on_event do |data|
               begin
                 @producer.send_msg(@current_topic_id,@partition_key,data)
@@ -94,7 +94,7 @@ In logstash 1.4.x, the online version does not support specifying partition\_key
               end
             end
           end # def register
-        
+
           def receive(event)
             return unless output?(event)
             if event == LogStash::SHUTDOWN
@@ -111,6 +111,9 @@ In logstash 1.4.x, the online version does not support specifying partition\_key
 
 ### Create logstash configuration file
 Go to the logstash root dir, and create a configure file
+The 2.0 release of Logstash includes a new version of the Kafka output plugin with significant configuration changes. For more details, please check the documentation pages for the [Logstash1.5](https://www.elastic.co/guide/en/logstash/1.5/plugins-outputs-kafka.html) and [Logstash2.0](https://www.elastic.co/guide/en/logstash/2.0/plugins-outputs-kafka.html) version of the kafka output plugin.
+
+#### For Logstash 1.4.X, 1.5.X
 
         input {
             file {
@@ -153,6 +156,46 @@ Go to the logstash root dir, and create a configure file
             }
         }
 
+#### For Logstash 2.X
+
+		input {
+			file {
+				type => "hdp-nn-audit"
+				path => "/path/to/audit.log"
+				start_position => end
+				sincedb_path => "/var/log/logstash/"
+			}
+		}
+
+
+		filter{
+			if [type] == "hdp-nn-audit" {
+			  grok {
+				  match => ["message", "ugi=(?<user>([\w\d\-]+))@|ugi=(?<user>([\w\d\-]+))/[\w\d\-.]+@|ugi=(?<user>([\w\d.\-_]+))[\s(]+"]
+			  }
+			}
+		}
+
+		output {
+			 if [type] == "hdp-nn-audit" {
+				  kafka {
+					  codec => plain {
+						  format => "%{message}"
+					  }
+					  bootstrap_servers => "localhost:9092"
+					  topic_id => "hdfs_audit_log"
+					  acks => \u201c0\u201d
+					  timeout_ms => 10000
+					  retries => 3
+					  retry_backoff_ms => 100
+					  batch_size => 16384
+					  send_buffer_bytes => 131072
+					  client_id => "hdp-nn-audit"
+				  }
+				  # stdout { codec => rubydebug }
+			  }
+		}
+
 #### grok pattern testing
 We have 3 typical patterns for ugi field as follows
 2015-02-11 15:00:00,000 INFO FSNamesystem.audit: allowed=true	ugi=user1@xyz.com (auth:TOKEN)	ip=/10.115.44.55	cmd=open	src=/apps/hdmi-technology/b_pulsar_coe/schema/avroschema/Session.avsc	dst=null	perm=null

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/253f99bc/eagle-core/eagle-alert/eagle-alert-notification-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/pom.xml b/eagle-core/eagle-alert/eagle-alert-notification-plugin/pom.xml
index 005af4e..504abb8 100644
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/pom.xml
+++ b/eagle-core/eagle-alert/eagle-alert-notification-plugin/pom.xml
@@ -80,9 +80,5 @@
               </exclusion>
           </exclusions>
       </dependency>
-      <dependency>
-          <groupId>org.apache.hadoop</groupId>
-          <artifactId>hadoop-hdfs</artifactId>
-      </dependency>
   </dependencies>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/253f99bc/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/DateTimeUtil.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/DateTimeUtil.java b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/DateTimeUtil.java
index dd3a4c6..0f5b189 100644
--- a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/DateTimeUtil.java
+++ b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/DateTimeUtil.java
@@ -100,6 +100,18 @@ public class DateTimeUtil {
 			return 0L;
 		}
 	}
+
+	//For mapr
+	//exp: 2015-06-06T10:44:22.800Z
+	public static long maprhumanDateToMilliseconds(String date) throws ParseException{
+		date = date.replace('T',' ');
+		date = date.replace('Z',' ');
+		date = date.replace('.',',');
+		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss,SSS ");
+		sdf.setTimeZone(CURRENT_TIME_ZONE);
+		Date d = sdf.parse(date);
+		return d.getTime();
+	}
 	/**
 	 * this could be accurate only when timezone is UTC
 	 * for the timezones other than UTC, there is possibly issue, for example

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/253f99bc/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/hdfs/MAPRFSAuditLogObject.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/hdfs/MAPRFSAuditLogObject.java b/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/hdfs/MAPRFSAuditLogObject.java
new file mode 100644
index 0000000..630687f
--- /dev/null
+++ b/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/hdfs/MAPRFSAuditLogObject.java
@@ -0,0 +1,31 @@
+/*
+ *
+ *  * Licensed to the Apache Software Foundation (ASF) under one or more
+ *  * contributor license agreements.  See the NOTICE file distributed with
+ *  * this work for additional information regarding copyright ownership.
+ *  * The ASF licenses this file to You under the Apache License, Version 2.0
+ *  * (the "License"); you may not use this file except in compliance with
+ *  * the License.  You may obtain a copy of the License at
+ *  *
+ *  *    http://www.apache.org/licenses/LICENSE-2.0
+ *  *
+ *  * Unless required by applicable law or agreed to in writing, software
+ *  * distributed under the License is distributed on an "AS IS" BASIS,
+ *  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  * See the License for the specific language governing permissions and
+ *  * limitations under the License.
+ *
+ */
+package org.apache.eagle.security.hdfs;
+
+
+public class MAPRFSAuditLogObject {
+    public long timestamp;
+    public String host;
+    public String status;
+    public String user;
+    public String cmd;
+    public String src;
+    public String dst;
+    public String volume;
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/253f99bc/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/hdfs/MAPRFSAuditLogParser.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/hdfs/MAPRFSAuditLogParser.java b/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/hdfs/MAPRFSAuditLogParser.java
new file mode 100644
index 0000000..458de12
--- /dev/null
+++ b/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/hdfs/MAPRFSAuditLogParser.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.security.hdfs;
+
+import org.apache.eagle.common.DateTimeUtil;
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.text.ParseException;
+
+
+public final class MAPRFSAuditLogParser {
+    private final static Logger LOG = LoggerFactory.getLogger(MAPRFSAuditLogParser.class);
+
+    public MAPRFSAuditLogParser(){
+    }
+
+    public MAPRFSAuditLogObject parse(String log) throws JSONException, ParseException {
+        JSONObject jsonObject = new JSONObject(log);
+        String timestamp = jsonObject.getJSONObject("timestamp").getString("$date");
+        String cmd = jsonObject.getString("operation");
+        String user = jsonObject.getString("uid");
+        String ip = jsonObject.getString("ipAddress");
+        String status = jsonObject.getString("status");
+        String volumeID = jsonObject.getString("volumeId");
+        String src;
+        String dst;
+        if(jsonObject.has("srcFid")){
+            src = jsonObject.getString("srcFid");
+        }else{
+            src = "null";
+        }
+
+        if(jsonObject.has("dstFid")){
+            dst = jsonObject.getString("dstFid");
+        }else{
+            dst = "null";
+        }
+
+        MAPRFSAuditLogObject entity = new MAPRFSAuditLogObject();
+        entity.user = user;
+        entity.cmd = cmd;
+        entity.src = src;
+        entity.dst = dst;
+        entity.host = ip;
+        entity.status = status;
+        entity.volume = volumeID;
+        entity.timestamp = DateTimeUtil.maprhumanDateToMilliseconds(timestamp);
+        return entity;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/253f99bc/eagle-security/eagle-security-common/src/test/java/org/apache/eagle/security/crawler/audit/TestMAPRFSAuditLogParser.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-common/src/test/java/org/apache/eagle/security/crawler/audit/TestMAPRFSAuditLogParser.java b/eagle-security/eagle-security-common/src/test/java/org/apache/eagle/security/crawler/audit/TestMAPRFSAuditLogParser.java
new file mode 100644
index 0000000..f0eaf10
--- /dev/null
+++ b/eagle-security/eagle-security-common/src/test/java/org/apache/eagle/security/crawler/audit/TestMAPRFSAuditLogParser.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.security.crawler.audit;
+
+import junit.framework.Assert;
+import org.apache.eagle.security.hdfs.HDFSAuditLogParser;
+import org.apache.eagle.security.hdfs.MAPRFSAuditLogObject;
+import org.apache.eagle.security.hdfs.MAPRFSAuditLogParser;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class TestMAPRFSAuditLogParser {
+
+    private final static Logger LOG = LoggerFactory.getLogger(TestMAPRFSAuditLogParser.class);
+    @Test
+    public void testMAPRParser() {
+        String log = "{\"timestamp\":{\"$date\":\"2015-06-06T10:44:22.800Z\"},\"operation\":\"MKDIR\",\"uid\":0,\"ipAddress\":\n" +
+                "\"10.10.104.51\",\"parentFid\":\"2049.51.131248\",\"childFid\":\"2049.56.131258\",\"childName\":\n" +
+                "\"ycsbTmp_1433587462796\",\"volumeId\":68048396,\"status\":0}";
+        MAPRFSAuditLogParser parser = new MAPRFSAuditLogParser();
+        MAPRFSAuditLogObject entity = new MAPRFSAuditLogObject();
+        try {
+            entity = parser.parse(log);
+        }catch (Exception e){
+            LOG.info(e.getMessage());
+        }
+
+        Assert.assertEquals("MKDIR",entity.cmd);
+        Assert.assertEquals("0",entity.user);
+        Assert.assertEquals("10.10.104.51",entity.host);
+        Assert.assertEquals("null",entity.src);
+        Assert.assertEquals("null",entity.dst);
+        Assert.assertEquals("0", entity.status);
+
+        log = "{\"timestamp\":{\"$date\":\"2016-02-19T01:50:01.962Z\"},\"operation\":\"LOOKUP\",\"uid\":5000,\"ipAddress\":\"192.168.6.148\",\"srcFid\":\"2049.40.131192\",\"dstFid\":\"2049.1032.133268\",\"srcName\":\"share\",\"volumeId\":186635570,\"status\":0}\n";
+        try {
+            entity = parser.parse(log);
+        }catch (Exception e){
+            LOG.info(e.getMessage());
+        }
+        Assert.assertEquals("LOOKUP",entity.cmd);
+        Assert.assertEquals("5000",entity.user);
+        Assert.assertEquals("192.168.6.148",entity.host);
+        Assert.assertEquals("2049.40.131192",entity.src);
+        Assert.assertEquals("2049.1032.133268",entity.dst);
+        Assert.assertEquals("0", entity.status);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/253f99bc/eagle-security/eagle-security-maprfs-auditlog/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-maprfs-auditlog/pom.xml b/eagle-security/eagle-security-maprfs-auditlog/pom.xml
new file mode 100644
index 0000000..71d9127
--- /dev/null
+++ b/eagle-security/eagle-security-maprfs-auditlog/pom.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~    http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.eagle</groupId>
+        <artifactId>eagle-security-parent</artifactId>
+        <version>0.4.0-incubating-SNAPSHOT</version>
+    </parent>
+    <artifactId>eagle-security-maprfs-auditlog</artifactId>
+    <packaging>jar</packaging>
+    <name>eagle-security-maprfs-auditlog</name>
+    <url>http://maven.apache.org</url>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.eagle</groupId>
+            <artifactId>eagle-security-common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.eagle</groupId>
+            <artifactId>eagle-stream-application-manager</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.eagle</groupId>
+            <artifactId>eagle-security-hdfs-auditlog</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.eagle</groupId>
+            <artifactId>eagle-embed-server</artifactId>
+            <version>${project.version}</version>
+            <classifier>tests</classifier>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.eagle</groupId>
+            <artifactId>eagle-embed-server</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.eagle</groupId>
+            <artifactId>eagle-embed-hbase</artifactId>
+            <version>${project.version}</version>
+            <classifier>tests</classifier>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.eagle</groupId>
+            <artifactId>eagle-embed-hbase</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/253f99bc/eagle-security/eagle-security-maprfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/MapRFSAuditLogKafkaDeserializer.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-maprfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/MapRFSAuditLogKafkaDeserializer.java b/eagle-security/eagle-security-maprfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/MapRFSAuditLogKafkaDeserializer.java
new file mode 100644
index 0000000..5eb18cd
--- /dev/null
+++ b/eagle-security/eagle-security-maprfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/MapRFSAuditLogKafkaDeserializer.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.security.auditlog;
+
+import org.apache.eagle.dataproc.impl.storm.kafka.SpoutKafkaMessageDeserializer;
+import org.apache.eagle.security.hdfs.MAPRFSAuditLogObject;
+import org.apache.eagle.security.hdfs.MAPRFSAuditLogParser;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Map;
+import java.util.Properties;
+import java.util.TreeMap;
+
+public class MapRFSAuditLogKafkaDeserializer implements SpoutKafkaMessageDeserializer {
+    private static Logger LOG = LoggerFactory.getLogger(MapRFSAuditLogKafkaDeserializer.class);
+    private Properties props;
+
+    public MapRFSAuditLogKafkaDeserializer(Properties props){
+        this.props = props;
+    }
+
+    /**
+     * the steps for deserializing message from kafka
+     * 1. convert byte array to string
+     * 2. parse string to eagle entity
+     */
+    @Override
+    public Object deserialize(byte[] arg0) {
+        String logLine = new String(arg0);
+
+        MAPRFSAuditLogParser parser = new MAPRFSAuditLogParser();
+        MAPRFSAuditLogObject entity = null;
+        try{
+            entity = parser.parse(logLine);
+        }catch(Exception ex){
+            LOG.error("Failing parse audit log message", ex);
+        }
+        if(entity == null){
+            LOG.warn("Event ignored as it can't be correctly parsed, the log is ", logLine);
+            return null;
+        }
+        Map<String, Object> map = new TreeMap<String, Object>();
+        map.put("src", entity.src);
+        map.put("dst", entity.dst);
+        map.put("host", entity.host);
+        map.put("timestamp", entity.timestamp);
+        map.put("status", entity.status);
+        map.put("user", entity.user);
+        map.put("cmd", entity.cmd);
+        map.put("volume", entity.volume);
+
+        return map;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/253f99bc/eagle-security/eagle-security-maprfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/MapRFSAuditLogProcessorMain.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-maprfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/MapRFSAuditLogProcessorMain.java b/eagle-security/eagle-security-maprfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/MapRFSAuditLogProcessorMain.java
new file mode 100644
index 0000000..b824e8a
--- /dev/null
+++ b/eagle-security/eagle-security-maprfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/MapRFSAuditLogProcessorMain.java
@@ -0,0 +1,115 @@
+/*
+ *
+ *  * Licensed to the Apache Software Foundation (ASF) under one or more
+ *  * contributor license agreements.  See the NOTICE file distributed with
+ *  * this work for additional information regarding copyright ownership.
+ *  * The ASF licenses this file to You under the Apache License, Version 2.0
+ *  * (the "License"); you may not use this file except in compliance with
+ *  * the License.  You may obtain a copy of the License at
+ *  *
+ *  *    http://www.apache.org/licenses/LICENSE-2.0
+ *  *
+ *  * Unless required by applicable law or agreed to in writing, software
+ *  * distributed under the License is distributed on an "AS IS" BASIS,
+ *  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  * See the License for the specific language governing permissions and
+ *  * limitations under the License.
+ *
+ */
+package org.apache.eagle.security.auditlog;
+
+import backtype.storm.spout.SchemeAsMultiScheme;
+import com.typesafe.config.Config;
+import org.apache.commons.lang3.time.DateUtils;
+import org.apache.eagle.common.config.EagleConfigConstants;
+import org.apache.eagle.dataproc.impl.storm.kafka.KafkaSourcedSpoutProvider;
+import org.apache.eagle.dataproc.impl.storm.kafka.KafkaSourcedSpoutScheme;
+import org.apache.eagle.datastream.ExecutionEnvironments;
+import org.apache.eagle.datastream.core.StreamProducer;
+import org.apache.eagle.datastream.storm.StormExecutionEnvironment;
+import org.apache.eagle.partition.DataDistributionDao;
+import org.apache.eagle.partition.PartitionAlgorithm;
+import org.apache.eagle.partition.PartitionStrategy;
+import org.apache.eagle.partition.PartitionStrategyImpl;
+import org.apache.eagle.security.partition.DataDistributionDaoImpl;
+import org.apache.eagle.security.partition.GreedyPartitionAlgorithm;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+public class MapRFSAuditLogProcessorMain {
+
+    public static PartitionStrategy createStrategy(Config config) {
+        // TODO: Refactor configuration structure to avoid repeated config processing configure ~ hao
+        String host = config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.HOST);
+        Integer port = config.getInt(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.PORT);
+        String username = config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.USERNAME);
+        String password = config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.PASSWORD);
+        String topic = config.getString("dataSourceConfig.topic");
+        DataDistributionDao dao = new DataDistributionDaoImpl(host, port, username, password, topic);
+        PartitionAlgorithm algorithm = new GreedyPartitionAlgorithm();
+        String key1 = EagleConfigConstants.EAGLE_PROPS + ".partitionRefreshIntervalInMin";
+        Integer partitionRefreshIntervalInMin = config.hasPath(key1) ? config.getInt(key1) : 60;
+        String key2 = EagleConfigConstants.EAGLE_PROPS + ".kafkaStatisticRangeInMin";
+        Integer kafkaStatisticRangeInMin =  config.hasPath(key2) ? config.getInt(key2) : 60;
+        PartitionStrategy strategy = new PartitionStrategyImpl(dao, algorithm, partitionRefreshIntervalInMin * DateUtils.MILLIS_PER_MINUTE, kafkaStatisticRangeInMin * DateUtils.MILLIS_PER_MINUTE);
+        return strategy;
+    }
+
+    public static KafkaSourcedSpoutProvider createProvider(Config config) {
+         String deserClsName = config.getString("dataSourceConfig.deserializerClass");
+         final KafkaSourcedSpoutScheme scheme = new KafkaSourcedSpoutScheme(deserClsName, config) {
+                 @Override
+                 public List<Object> deserialize(byte[] ser) {
+                         Object tmp = deserializer.deserialize(ser);
+                         Map<String, Object> map = (Map<String, Object>)tmp;
+                         if(tmp == null) return null;
+                         return Arrays.asList(map.get("user"), tmp);
+                 }
+         };
+
+         KafkaSourcedSpoutProvider provider = new KafkaSourcedSpoutProvider() {
+                 @Override
+                 public SchemeAsMultiScheme getStreamScheme(String deserClsName, Config context) {
+                         return new SchemeAsMultiScheme(scheme);
+                  }
+         };
+         return provider;
+    }
+
+    @SuppressWarnings("unchecked")
+    public static void execWithDefaultPartition(StormExecutionEnvironment env, KafkaSourcedSpoutProvider provider) {
+        StreamProducer source = env.fromSpout(provider).withOutputFields(2).nameAs("kafkaMsgConsumer").groupBy(Arrays.asList(0));
+        //StreamProducer reassembler = source.flatMap(new HdfsUserCommandReassembler()).groupBy(Arrays.asList(0));
+        //source.streamUnion(reassembler)
+        source.flatMap(new FileSensitivityDataJoinExecutor()).groupBy(Arrays.asList(0))
+              .flatMap(new IPZoneDataJoinExecutor())
+              .alertWithConsumer("maprFSAuditLogEventStream", "maprFSAuditLogAlertExecutor");
+        env.execute();
+    }
+
+    @SuppressWarnings("unchecked")
+    public static void execWithBalancedPartition(StormExecutionEnvironment env, KafkaSourcedSpoutProvider provider) {
+        PartitionStrategy strategy = createStrategy(env.getConfig());
+        StreamProducer source = env.fromSpout(provider).withOutputFields(2).nameAs("kafkaMsgConsumer").groupBy(strategy);
+        //StreamProducer reassembler = source.flatMap(new HdfsUserCommandReassembler()).groupBy(Arrays.asList(0));
+        //source.streamUnion(reassembler)
+        source.flatMap(new FileSensitivityDataJoinExecutor()).groupBy(Arrays.asList(0))
+                .flatMap(new IPZoneDataJoinExecutor())
+                .alertWithConsumer("maprFSAuditLogEventStream", "maprFSAuditLogAlertExecutor");
+        env.execute();
+    }
+
+	public static void main(String[] args) throws Exception{
+        StormExecutionEnvironment env = ExecutionEnvironments.getStorm(args);
+        Config config = env.getConfig();
+        KafkaSourcedSpoutProvider provider = createProvider(env.getConfig());
+        Boolean balancePartition = config.hasPath("eagleProps.balancePartitionEnabled") && config.getBoolean("eagleProps.balancePartitionEnabled");
+        if (balancePartition) {
+            execWithBalancedPartition(env, provider);
+        } else {
+            execWithDefaultPartition(env, provider);
+        }
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/253f99bc/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/application.conf b/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/application.conf
new file mode 100644
index 0000000..52a31a5
--- /dev/null
+++ b/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/application.conf
@@ -0,0 +1,69 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{
+  "envContextConfig" : {
+    "env" : "storm",
+    "mode" : "local",
+    "topologyName" : "maprFSAuditLogProcessTopology",
+    "stormConfigFile" : "security-auditlog-storm.yaml",
+    "parallelismConfig" : {
+      "kafkaMsgConsumer" : 1,
+      "maprFSAuditLogAlertExecutor*" : 1
+    }
+  },
+  "dataSourceConfig": {
+    "topic" : "maprtest",
+    "zkConnection" : "192.168.6.148:5181",
+    "zkConnectionTimeoutMS" : 15000,
+    "consumerGroupId" : "EagleConsumer",
+    "fetchSize" : 1048586,
+    "deserializerClass" : "org.apache.eagle.security.auditlog.MapRFSAuditLogKafkaDeserializer",
+    "transactionZKServers" : "192.168.6.148",
+    "transactionZKPort" : 5181,
+    "transactionZKRoot" : "/consumers",
+    "transactionStateUpdateMS" : 2000
+  },
+  "alertExecutorConfigs" : {
+     "maprFSAuditLogAlertExecutor" : {
+       "parallelism" : 1,
+       "partitioner" : "org.apache.eagle.policy.DefaultPolicyPartitioner"
+       "needValidation" : "true"
+     }
+  },
+  "eagleProps" : {
+    "site" : "sandbox",
+    "application": "maprFSAuditLog",
+  	"dataJoinPollIntervalSec" : 30,
+    "mailHost" : "mailHost.com",
+    "mailSmtpPort":"25",
+    "mailDebug" : "true",
+    "balancePartitionEnabled" : false,
+    #"partitionRefreshIntervalInMin" : 60,
+    #"kafkaStatisticRangeInMin" : 60,
+    "eagleService": {
+      "host": "localhost",
+      "port": 9099,
+      "username": "admin",
+      "password": "secret"
+    },
+    "readHdfsUserCommandPatternFrom" : "file"
+  },
+  "dynamicConfigSource" : {
+  	"enabled" : true,
+  	"initDelayMillis" : 0,
+  	"delayMillis" : 30000
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/253f99bc/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/log4j.properties b/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/log4j.properties
new file mode 100644
index 0000000..07f8402
--- /dev/null
+++ b/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/log4j.properties
@@ -0,0 +1,40 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+log4j.rootLogger=INFO, stdout, DRFA
+
+eagle.log.dir=./logs
+eagle.log.file=eagle.log
+
+
+#log4j.logger.org.apache.eagle.security.auditlog.IPZoneDataJoinExecutor=DEBUG
+#log4j.logger.org.apache.eagle.security.auditlog.FileSensitivityDataJoinExecutor=DEBUG
+log4j.logger.org.apache.eagle.security.auditlog.HdfsUserCommandReassembler=DEBUG
+#log4j.logger.org.apache.eagle.executor.AlertExecutor=DEBUG
+# standard output
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
+
+# Daily Rolling File Appender
+log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.DRFA.File=${eagle.log.dir}/${eagle.log.file}
+log4j.appender.DRFA.DatePattern=yyyy-MM-dd
+## 30-day backup
+# log4j.appender.DRFA.MaxBackupIndex=30
+log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
+
+# Pattern format: Date LogLevel LoggerName LogMessage
+log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/253f99bc/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/maprFSAuditLog-init.sh
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/maprFSAuditLog-init.sh b/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/maprFSAuditLog-init.sh
new file mode 100644
index 0000000..5f99190
--- /dev/null
+++ b/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/maprFSAuditLog-init.sh
@@ -0,0 +1,213 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with`
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# EAGLE_SERVICE_HOST, default is `hostname -f`
+export EAGLE_SERVICE_HOST=localhost
+# EAGLE_SERVICE_PORT, default is 9099
+export EAGLE_SERVICE_PORT=9099
+# EAGLE_SERVICE_USER
+export EAGLE_SERVICE_USER=admin
+# EAGLE_SERVICE_PASSWORD
+export EAGLE_SERVICE_PASSWD=secret
+curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' \
+ "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=SiteApplicationService" \
+  -d '
+  [
+     {
+        "tags":{
+           "site":"sandbox",
+           "application":"maprFSAuditLog"
+        },
+        "enabled": true,
+        "config": "classification.fs.defaultFS=maprfs:///"
+     }
+  ]
+  '
+curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' \
+ "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=ApplicationDescService" \
+  -d '
+  [
+     {
+        "tags":{
+           "application":"maprFSAuditLog"
+        },
+        "description":"mapr AuditLog Monitoring",
+        "alias":"MapRFSAuditLogMonitor",
+        "groupName":"MapR",
+        "features":["common","metadata", "classification"],
+	"config":"{\n\t\"view\": {\n\t\t\"prefix\": \"fileSensitivity\",\n\t\t\"service\": \"FileSensitivityService\",\n\t\t\"keys\": [\n\t\t\t\"filedir\",\n\t\t\t\"sensitivityType\"\n\t\t],\n\t\t\"type\": \"folder\",\n\t\t\"api\": \"hdfsResource\"\n\t}\n}"
+     }
+  ]
+  '
+
+
+
+## AlertStreamService
+echo ""
+echo "Importing AlertStreamService for MapRFS... "
+curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' \
+ "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamService" \
+ -d '
+ [
+    {
+       "tags":{
+          "application":"maprFSAuditLog",
+          "streamName":"maprFSAuditLogEventStream"
+       },
+       "description":"mapr fs audit log data source stream"
+    }
+ ]
+ '
+## AlertExecutorService: what alert streams are consumed by alert executor
+echo ""
+echo "Importing AlertExecutorService for MapRFS... "
+curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' \
+ "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertExecutorService" \
+ -d '
+ [
+    {
+       "tags":{
+          "application":"maprFSAuditLog",
+          "alertExecutorId":"maprFSAuditLogAlertExecutor",
+          "streamName":"maprFSAuditLogEventStream"
+       },
+       "description":"executor for mapr fs audit log stream"
+    }
+ ]
+ '
+## AlertStreamSchemaService: schema for event from alert stream
+echo ""
+echo "Importing AlertStreamSchemaService for MapRFS... "
+curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' \
+"http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamSchemaService" \
+ -d '
+ [
+    {
+       "tags": {
+          "application": "maprFSAuditLog",
+          "streamName": "maprFSAuditLogEventStream",
+          "attrName": "status"
+       },
+       "attrDescription": "the status of action result,  numeric codes other than 0 for success can appear, for more info, check: http://doc.mapr.com/display/MapR/Status+Codes+That+Can+Appear+in+Audit+Logs",
+       "attrType": "string",
+       "category": "",
+       "attrValueResolver": "org.apache.eagle.service.security.hdfs.resolver.MAPRStatusCodeResolver"
+    },
+    {
+       "tags": {
+          "application": "maprFSAuditLog",
+          "streamName": "maprFSAuditLogEventStream",
+          "attrName": "cmd"
+       },
+       "attrDescription": "file/directory operation, such as MKDIR, LOOKUP",
+       "attrType": "string",
+       "category": "",
+       "attrValueResolver": "org.apache.eagle.service.security.hdfs.resolver.MAPRFSCommandResolver"
+    },
+    {
+       "tags": {
+          "application": "maprFSAuditLog",
+          "streamName": "maprFSAuditLogEventStream",
+          "attrName": "volume"
+       },
+       "attrDescription": "volume name in mapr",
+       "attrType": "string",
+       "category": "",
+       "attrValueResolver": ""
+    },
+    {
+       "tags": {
+          "application": "maprFSAuditLog",
+          "streamName": "maprFSAuditLogEventStream",
+          "attrName": "dst"
+       },
+       "attrDescription": "destination file or directory, such as /tmp",
+       "attrType": "string",
+       "category": "",
+       "attrValueResolver": "org.apache.eagle.service.security.hdfs.resolver.HDFSResourceResolver"
+    },
+    {
+       "tags": {
+          "application": "maprFSAuditLog",
+          "streamName": "maprFSAuditLogEventStream",
+          "attrName": "src"
+       },
+       "attrDescription": "source file or directory, such as /tmp",
+       "attrType": "string",
+       "category": "",
+       "attrValueResolver": "HDFSResourceResolver"
+    },
+    {
+       "tags": {
+          "application": "maprFSAuditLog",
+          "streamName": "maprFSAuditLogEventStream",
+          "attrName": "host"
+       },
+       "attrDescription": "hostname, such as localhost",
+       "attrType": "string",
+       "category": "",
+       "attrValueResolver": ""
+    },
+    {
+       "tags": {
+          "application": "maprFSAuditLog",
+          "streamName": "maprFSAuditLogEventStream",
+          "attrName": "sensitivityType"
+       },
+       "attrDescription": "sensitivity type of of target file/folder, eg: mark such as AUDITLOG, SECURITYLOG",
+       "attrType": "string",
+       "category": "",
+       "attrValueResolver": "org.apache.eagle.service.security.hdfs.resolver.HDFSSensitivityTypeResolver"
+    },
+    {
+       "tags": {
+          "application": "maprFSAuditLog",
+          "streamName": "maprFSAuditLogEventStream",
+          "attrName": "securityZone"
+       },
+       "attrDescription": "",
+       "attrType": "string",
+       "category": "",
+       "attrValueResolver": ""
+    },
+    {
+       "tags": {
+          "application": "maprFSAuditLog",
+          "streamName": "maprFSAuditLogEventStream",
+          "attrName": "user"
+       },
+       "attrDescription": "process user",
+       "attrType": "string",
+       "category": "",
+       "attrValueResolver": ""
+    },
+    {
+       "tags": {
+          "application": "maprFSAuditLog",
+          "streamName": "maprFSAuditLogEventStream",
+          "attrName": "timestamp"
+       },
+       "attrDescription": "milliseconds of the datetime",
+       "attrType": "long",
+       "category": "",
+       "attrValueResolver": ""
+    }
+
+ ]
+ '
+## Finished
+echo ""
+echo "Finished initialization for eagle topology"

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/253f99bc/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/security-auditlog-storm.yaml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/security-auditlog-storm.yaml b/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/security-auditlog-storm.yaml
new file mode 100644
index 0000000..a68a323
--- /dev/null
+++ b/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/security-auditlog-storm.yaml
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+topology.workers: 1
+topology.acker.executors: 1
+topology.tasks: 1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/253f99bc/eagle-security/eagle-security-maprfs-web/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-maprfs-web/pom.xml b/eagle-security/eagle-security-maprfs-web/pom.xml
new file mode 100644
index 0000000..d10d21a
--- /dev/null
+++ b/eagle-security/eagle-security-maprfs-web/pom.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~    http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.eagle</groupId>
+    <artifactId>eagle-security-parent</artifactId>
+    <version>0.4.0-incubating-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>eagle-security-maprfs-web</artifactId>
+  <name>eagle-security-maprfs-web</name>
+  <url>http://maven.apache.org</url>
+  <dependencies>
+      <dependency>
+          <groupId>org.apache.eagle</groupId>
+          <artifactId>eagle-security-hdfs-web</artifactId>
+          <version>${project.version}</version>
+      </dependency>
+      <dependency>
+          <groupId>org.apache.eagle</groupId>
+          <artifactId>eagle-entity-base</artifactId>
+          <version>${project.version}</version>
+          <exclusions>
+              <exclusion>
+                  <groupId>org.slf4j</groupId>
+                  <artifactId>log4j-over-slf4j</artifactId>
+              </exclusion>
+          </exclusions>
+      </dependency>
+      <dependency>
+          <groupId>com.sun.jersey</groupId>
+          <artifactId>jersey-server</artifactId>
+      </dependency>
+      <dependency>
+          <groupId>org.apache.eagle</groupId>
+          <artifactId>eagle-service-base</artifactId>
+          <version>${project.version}</version>
+          <exclusions>
+              <exclusion>
+                  <groupId>org.slf4j</groupId>
+                  <artifactId>log4j-over-slf4j</artifactId>
+              </exclusion>
+          </exclusions>
+      </dependency>
+      <dependency>
+          <groupId>org.apache.eagle</groupId>
+          <artifactId>eagle-security-common</artifactId>
+          <version>${project.version}</version>
+      </dependency>
+  </dependencies>
+</project>
+

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/253f99bc/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRFSCommandResolver.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRFSCommandResolver.java b/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRFSCommandResolver.java
new file mode 100644
index 0000000..edb0737
--- /dev/null
+++ b/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRFSCommandResolver.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.service.security.hdfs.resolver;
+
+import org.apache.eagle.service.alert.resolver.AttributeResolvable;
+import org.apache.eagle.service.alert.resolver.AttributeResolveException;
+import org.apache.eagle.service.alert.resolver.BadAttributeResolveRequestException;
+import org.apache.eagle.service.alert.resolver.GenericAttributeResolveRequest;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.regex.Pattern;
+
+
+public class MAPRFSCommandResolver implements AttributeResolvable<GenericAttributeResolveRequest,String> {
+    private final static Logger LOG = LoggerFactory.getLogger(MAPRFSCommandResolver.class);
+
+    private final static String [] cmdStrs = {"CHGRP", "CHOWN", "CHPERM","CREATE", "DELETE",
+            "DISABLEAUDIT", "ENABLEAUDIT", "GETATTR","LOOKUP", "MKDIR", "READ", "READDIR",
+            "RENAME", "RMDIR", "SETATTR", "WRITE"};
+
+    private final static String MAPRFS_CMD_RESOLVE_FORMAT_HINT = String.format("maprfs command must be in {%s}", StringUtils.join(cmdStrs, ","));
+
+    private final static List<String> commands = Arrays.asList(cmdStrs);
+
+    public List<String> resolve(GenericAttributeResolveRequest request) throws AttributeResolveException {
+        String query = request.getQuery().trim();
+        List<String> res = new ArrayList<>();
+        for(String cmd : commands) {
+            Pattern pattern = Pattern.compile("^" + query, Pattern.CASE_INSENSITIVE);
+            if(pattern.matcher(cmd).find()) {
+                res.add(cmd);
+            }
+        }
+        if(res.size() == 0) {
+            return commands;
+        }
+        return res;
+    }
+
+    @Override
+    public void validateRequest(GenericAttributeResolveRequest request) throws BadAttributeResolveRequestException {
+        String query = request.getQuery();
+        boolean matched = Pattern.matches("[a-zA-Z]+", query);
+        if (query == null || !matched) {
+            throw new BadAttributeResolveRequestException(MAPRFS_CMD_RESOLVE_FORMAT_HINT);
+        }
+    }
+
+    @Override
+    public Class<GenericAttributeResolveRequest> getRequestClass() {
+        return GenericAttributeResolveRequest.class;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/253f99bc/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRStatusCodeResolver.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRStatusCodeResolver.java b/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRStatusCodeResolver.java
new file mode 100644
index 0000000..248c297
--- /dev/null
+++ b/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRStatusCodeResolver.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eagle.service.security.hdfs.resolver;
+
+import org.apache.eagle.service.alert.resolver.AttributeResolvable;
+import org.apache.eagle.service.alert.resolver.AttributeResolveException;
+import org.apache.eagle.service.alert.resolver.BadAttributeResolveRequestException;
+import org.apache.eagle.service.alert.resolver.GenericAttributeResolveRequest;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.regex.Pattern;
+
+
+public class MAPRStatusCodeResolver implements AttributeResolvable<GenericAttributeResolveRequest,String> {
+    private final static Logger LOG = LoggerFactory.getLogger(MAPRStatusCodeResolver.class);
+
+    private final static String [] statusCodes = {"SUCCESS","EPERM","ENOENT","EINTR","EIO","ENXIO","E2BIG","ENOEXEC","EBADF",
+            "ECHILD","EAGAIN","ENOMEM","EACCES","EFAULT","ENOTBLK","EBUSY","EEXIST","EXDEV","ENODEV","ENOTDIR","EISDIR","EINVAL",
+            "ENFILE","EMFILE","ENOTTY","ETXTBSY","EFBIG","ENOSPC","ESPIPE","EROFS","EMLINK","EPIPE","EDOM","ERANGE","EDEADLK","ENAMETOOLONG",
+            "ENOLCK","ENOSYS","ENOTEMPTY","ELOOP","EWOULDBLOCK","ENOMSG","EIDRM","ECHRNG","EL2NSYNC","EL3HLT","EL3RST","ELNRNG","EUNATCH",
+            "ENOCSI","EL2HLT","EBADE","EBADR","EXFULL","ENOANO","EBADRQC","EBADSLT","EDEADLOCK","EBFONT","ENOSTR","ENODATA","ETIME","ENOSR",
+            "ENONET","ENOPKG","EREMOTE","ENOLINK","EADV","ESRMNT","ECOMM","EPROTO","EMULTIHOP","EDOTDOT","EBADMSG","EOVERFLOW","ENOTUNIQ",
+            "EBADFD","EREMCHG","ELIBACC","ELIBBAD","ELIBSCN","ELIBMAX","ELIBEXEC","EILSEQ","ERESTART","ESTRPIPE","EUSERS","ENOTSOCK",
+            "EDESTADDRREQ","EMSGSIZE","EPROTOTYPE","ENOPROTOOPT","EPROTONOSUPPORT","ESOCKTNOSUPPORT","EOPNOTSUPP","EPFNOSUPPORT","EAFNOSUPPORT",
+            "EADDRINUSE","EADDRNOTAVAIL","ENETDOWN","ENETUNREACH","ENETRESET","ECONNABORTED","ECONNRESET","ENOBUFS","EISCONN","ENOTCONN",
+            "ESHUTDOWN","ETOOMANYREFS","ETIMEDOUT","ECONNREFUSED","EHOSTDOWN","EHOSTUNREACH","EALREADY","EINPROGRESS","ESTALE","EUCLEAN","ENOTNAM",
+            "ENAVAIL","EISNAM","EREMOTEIO","EDQUOT","ENOMEDIUM","EMEDIUMTYPE","ECANCELED","ENOKEY","EKEYEXPIRED","EKEYREVOKED","EKEYREJECTED"};
+
+    private final static String MAPRFS_STATUS_CODE_RESOLVE_FORMAT_HINT = String.format("Status code must be in {%s}", StringUtils.join(statusCodes, ","));
+
+    private final static List<String> statusList = Arrays.asList(statusCodes);
+
+    public List<String> resolve(GenericAttributeResolveRequest request) throws AttributeResolveException {
+        String query = request.getQuery().trim();
+        List<String> res = new ArrayList<>();
+        for(String status : statusList) {
+            Pattern pattern = Pattern.compile("^" + query, Pattern.CASE_INSENSITIVE);
+            if(pattern.matcher(status).find()) {
+                res.add(status);
+            }
+        }
+        if(res.size() == 0) {
+            return statusList;
+        }
+        return res;
+    }
+
+    @Override
+    public void validateRequest(GenericAttributeResolveRequest request) throws BadAttributeResolveRequestException {
+        String query = request.getQuery();
+        boolean matched = Pattern.matches("[a-zA-Z]+", query);
+        if (query == null || !matched) {
+            throw new BadAttributeResolveRequestException(MAPRFS_STATUS_CODE_RESOLVE_FORMAT_HINT);
+        }
+    }
+
+    @Override
+    public Class<GenericAttributeResolveRequest> getRequestClass() {
+        return GenericAttributeResolveRequest.class;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/253f99bc/eagle-security/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/pom.xml b/eagle-security/pom.xml
index ce1a178..93c5aa1 100644
--- a/eagle-security/pom.xml
+++ b/eagle-security/pom.xml
@@ -34,10 +34,12 @@
   <modules>
     <module>eagle-security-common</module>
 	<module>eagle-security-hdfs-auditlog</module>
+    <module>eagle-security-maprfs-auditlog</module>
     <module>eagle-security-userprofile</module>
     <module>eagle-security-hive</module>
     <module>eagle-security-hive-web</module>
     <module>eagle-security-hdfs-web</module>
+    <module>eagle-security-maprfs-web</module>
     <module>eagle-security-hdfs-securitylog</module>
     <module>eagle-security-hbase-securitylog</module>
     <module>eagle-security-hbase-web</module>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/253f99bc/eagle-webservice/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-webservice/pom.xml b/eagle-webservice/pom.xml
index 44bd4da..c316db2 100644
--- a/eagle-webservice/pom.xml
+++ b/eagle-webservice/pom.xml
@@ -145,6 +145,11 @@
 			<artifactId>eagle-security-hdfs-web</artifactId>
 			<version>${project.version}</version>
 		</dependency>
+		<dependency>
+			<groupId>org.apache.eagle</groupId>
+			<artifactId>eagle-security-maprfs-web</artifactId>
+			<version>${project.version}</version>
+		</dependency>
 		<!--
 		<dependency>
 			<groupId>org.apache.eagle</groupId>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/253f99bc/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 79d5e9d..f17e082 100755
--- a/pom.xml
+++ b/pom.xml
@@ -164,11 +164,16 @@
         <hadoop.version>2.6.0.2.2.5.1-3</hadoop.version>
         <hbase.version>0.98.4.2.2.5.1-3-hadoop2</hbase.version>
         <hive.version>1.2.1</hive.version>
+
+        <mapr-hive.version>1.2.0-mapr-1510</mapr-hive.version>
+        <mapr-hadoop.version>2.7.0-mapr-1506</mapr-hadoop.version>
+        <maprfs.version>5.0.0-mapr</maprfs.version>
+        <mapr-hbase.version>0.98.9-mapr-1503</mapr-hbase.version>
+
         <spark.core.version>1.4.0</spark.core.version>
 
         <!--  Client -->
         <kafka-client.version>0.9.0.0</kafka-client.version>
-
         <!-- Reflection -->
         <reflections.version>0.9.8</reflections.version>
 
@@ -215,6 +220,12 @@
         <jgrapht.version>0.9.0</jgrapht.version>
         <storm-kafka.version>0.9.3.2.2.0.0-2041</storm-kafka.version>
         <storm.version>0.9.3</storm.version>
+
+        <mapr-kafka.version>0.8.1.1</mapr-kafka.version>
+        <mapr-kafka-clients.version>0.8.3-mapr-1509</mapr-kafka-clients.version>
+        <mapr-storm-kafka.version>0.9.3</mapr-storm-kafka.version>
+        <mapr-storm.version>0.9.3-mapr-1509</mapr-storm.version>
+
         <curator.version>2.8.0</curator.version>
 
         <!-- Query -->
@@ -239,7 +250,7 @@
         <jaxb-impl.version>2.2.6</jaxb-impl.version>
         <stax-api.version>1.0.1</stax-api.version>
         <org.mortbay.jetty.version>6.1.26</org.mortbay.jetty.version>
-                
+
         <!-- servlet  -->
         <servlet-api.version>2.5</servlet-api.version>
 
@@ -475,11 +486,6 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.kafka</groupId>
-                <artifactId>kafka_${scala.version}</artifactId>
-                <version>${kafka.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.kafka</groupId>
                 <artifactId>kafka-clients</artifactId>
                 <version>${kafka-clients.version}</version>
             </dependency>
@@ -503,25 +509,6 @@
                 </exclusions>
             </dependency>
             <dependency>
-                <groupId>org.apache.storm</groupId>
-                <artifactId>storm-kafka</artifactId>
-                <version>${storm-kafka.version}</version>
-                <exclusions>
-                    <exclusion>
-                        <groupId>ch.qos.logback</groupId>
-                        <artifactId>logback-classic</artifactId>
-                    </exclusion>
-                    <exclusion>
-                        <groupId>log4j</groupId>
-                        <artifactId>log4j</artifactId>
-                    </exclusion>
-                    <exclusion>
-                        <groupId>org.slf4j</groupId>
-                        <artifactId>log4j-over-slf4j</artifactId>
-                    </exclusion>
-                </exclusions>
-            </dependency>
-            <dependency>
                 <groupId>org.apache.spark</groupId>
                 <artifactId>spark-core_${scala.version}</artifactId>
                 <version>${spark.core.version}</version>
@@ -751,6 +738,27 @@
             <activation>
                 <activeByDefault>true</activeByDefault>
             </activation>
+            <repositories>
+                <repository>
+                    <id>HDP Release Repository</id>
+                    <url>http://repo.hortonworks.com/content/repositories/releases/</url>
+                    <releases>
+                        <enabled>true</enabled>
+                        <updatePolicy>never</updatePolicy>
+                    </releases>
+                </repository>
+                <repository>
+                    <id>HDP Central Repository</id>
+                    <url>http://repo.hortonworks.com/content/repositories/central/</url>
+                    <releases>
+                        <enabled>true</enabled>
+                        <updatePolicy>never</updatePolicy>
+                        <checksumPolicy>warn</checksumPolicy>
+                    </releases>
+                    <name>HDP Central</name>
+                    <layout>default</layout>
+                </repository>
+            </repositories>
             <dependencyManagement>
                 <dependencies>
                     <dependency>
@@ -758,7 +766,6 @@
                         <artifactId>hadoop-common</artifactId>
                         <version>${hadoop.version}</version>
                     </dependency>
-
                     <dependency>
                         <groupId>org.apache.hbase</groupId>
                         <artifactId>hbase-client</artifactId>
@@ -799,6 +806,119 @@
                         <artifactId>hive-jdbc</artifactId>
                         <version>${hive.version}</version>
                     </dependency>
+                    <dependency>
+                        <groupId>org.apache.kafka</groupId>
+                        <artifactId>kafka_${scala.version}</artifactId>
+                        <version>${kafka.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.storm</groupId>
+                        <artifactId>storm-kafka</artifactId>
+                        <version>${storm-kafka.version}</version>
+                        <exclusions>
+                            <exclusion>
+                                <groupId>ch.qos.logback</groupId>
+                                <artifactId>logback-classic</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>log4j</groupId>
+                                <artifactId>log4j</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>org.slf4j</groupId>
+                                <artifactId>log4j-over-slf4j</artifactId>
+                            </exclusion>
+                        </exclusions>
+                    </dependency>
+                </dependencies>
+            </dependencyManagement>
+        </profile>
+
+        <profile>
+            <id>mapr</id>
+            <!--<activation>-->
+                <!--<activeByDefault>true</activeByDefault>-->
+            <!--</activation>-->
+            <repositories>
+                <repository>
+                    <id>mapr-releases</id>
+                    <url>http://repository.mapr.com/maven/</url>
+                    <snapshots><enabled>false</enabled></snapshots>
+                    <releases><enabled>true</enabled></releases>
+                </repository>
+            </repositories>
+            <dependencyManagement>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.apache.hadoop</groupId>
+                        <artifactId>hadoop-common</artifactId>
+                        <version>${mapr-hadoop.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.hbase</groupId>
+                        <artifactId>hbase-client</artifactId>
+                        <version>${mapr-hbase.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>com.mapr.hadoop</groupId>
+                        <artifactId>maprfs</artifactId>
+                        <version>${maprfs.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.hadoop</groupId>
+                        <artifactId>hadoop-client</artifactId>
+                        <version>${mapr-hadoop.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.hadoop</groupId>
+                        <artifactId>hadoop-auth</artifactId>
+                        <version>${mapr-hadoop.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.hbase</groupId>
+                        <artifactId>hbase-server</artifactId>
+                        <version>${mapr-hbase.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.hbase</groupId>
+                        <artifactId>hbase-testing-util</artifactId>
+                        <version>${mapr-hbase.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.hive</groupId>
+                        <artifactId>hive-exec</artifactId>
+                        <version>${mapr-hive.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.hive</groupId>
+                        <artifactId>hive-jdbc</artifactId>
+                        <version>${mapr-hive.version}</version>
+                    </dependency>
+
+                    <dependency>
+                        <groupId>org.apache.kafka</groupId>
+                        <artifactId>kafka_${scala.version}</artifactId>
+                        <version>${mapr-kafka.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.storm</groupId>
+                        <artifactId>storm-kafka</artifactId>
+                        <version>${mapr-storm-kafka.version}</version>
+                        <exclusions>
+                            <exclusion>
+                                <groupId>ch.qos.logback</groupId>
+                                <artifactId>logback-classic</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>log4j</groupId>
+                                <artifactId>log4j</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>org.slf4j</groupId>
+                                <artifactId>log4j-over-slf4j</artifactId>
+                            </exclusion>
+                        </exclusions>
+                    </dependency>
                 </dependencies>
             </dependencyManagement>
         </profile>
@@ -950,33 +1070,14 @@
                                 <exclude>**/webapp/**</exclude>
 
                             </excludes>
-                         </configuration>
-                     </execution>
-                 </executions>
-             </plugin>
-         </plugins>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
     </build>
     <repositories>
         <repository>
-            <id>HDP Release Repository</id>
-            <url>http://repo.hortonworks.com/content/repositories/releases/</url>
-            <releases>
-                <enabled>true</enabled>
-                <updatePolicy>never</updatePolicy>
-            </releases>
-        </repository>
-        <repository>
-            <id>HDP Central Repository</id>
-            <url>http://repo.hortonworks.com/content/repositories/central/</url>
-            <releases>
-                <enabled>true</enabled>
-                <updatePolicy>never</updatePolicy>
-                <checksumPolicy>warn</checksumPolicy>
-            </releases>
-            <name>HDP Central</name>
-            <layout>default</layout>
-        </repository>
-        <repository>
             <id>Maven Repo1 Repository</id>
             <url>http://repo1.maven.org/maven2</url>
             <releases>


[46/47] incubator-eagle git commit: Merge branch 'branch-0.4.0'

Posted by mw...@apache.org.
Merge branch 'branch-0.4.0'


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/a0443561
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/a0443561
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/a0443561

Branch: refs/heads/master
Commit: a04435619023843cb33fda74092b9830df5141bc
Parents: 982a6b7 eac0f27
Author: anyway1021 <mw...@apache.org>
Authored: Mon Jul 25 17:21:31 2016 +0800
Committer: anyway1021 <mw...@apache.org>
Committed: Mon Jul 25 17:21:31 2016 +0800

----------------------------------------------------------------------
 CHANGELOG.txt                                   | 327 +++++++++++++
 README.md                                       |  10 +-
 eagle-assembly/pom.xml                          |   4 +-
 eagle-assembly/src/assembly/eagle-bin.xml       |   7 +-
 .../src/main/bin/eagle-create-table.rb          |  47 --
 .../src/main/bin/eagle-drop-tables.sh           |  26 -
 eagle-assembly/src/main/bin/eagle-env.sh        |   4 -
 .../src/main/bin/eagle-service-init.sh          |  35 --
 eagle-assembly/src/main/bin/eagle-service.sh    |   7 +
 .../src/main/bin/eagle-topology-init.sh         |  33 +-
 .../src/main/conf/eagle-scheduler.conf          |  42 ++
 eagle-assembly/src/main/conf/eagle-service.conf |   4 +-
 .../sandbox-hbaseSecurityLog-application.conf   |   2 +-
 .../src/main/docs/logstash-kafka-conf.md        |  76 ++-
 .../src/main/examples/eagle-sandbox-starter.sh  |  61 +--
 .../sample-sensitivity-resource-create.sh       |   2 +
 .../src/main/lib/tomcat/bin/bootstrap.jar       | Bin 28052 -> 0 bytes
 .../src/main/lib/tomcat/bin/commons-daemon.jar  | Bin 24283 -> 0 bytes
 .../src/main/lib/tomcat/bin/tomcat-juli.jar     | Bin 38222 -> 0 bytes
 eagle-core/eagle-alert/eagle-alert-base/pom.xml |   2 +-
 .../eagle-alert-notification-plugin/pom.xml     |   8 +-
 .../notification/email/AlertEmailGenerator.java |  31 +-
 .../notification/email/AlertEmailSender.java    |  60 ++-
 .../src/main/resources/ALERT_DEFAULT.vm         | 488 ++++++++++---------
 .../eagle-alert/eagle-alert-process/pom.xml     |   2 +-
 .../eagle/alert/config/DeduplicatorConfig.java  |  17 +-
 .../dedup/AlertDeduplicationExecutorBase.java   |  22 +-
 .../eagle/alert/dedup/DefaultDeduplicator.java  |  50 +-
 .../eagle/alert/dedup/EntityDedupKey.java       |  62 +++
 .../eagle/alert/dedup/EntityDeduplicator.java   |   9 +-
 .../executor/AlertExecutorCreationUtils.java    |   2 +-
 .../siddhi/SiddhiAlertAPIEntityRender.java      |  18 +-
 .../eagle/alert/config/TestAlertDedup.java      |   6 +-
 .../TestSiddhiStateSnapshotAndRestore.java      |   7 +-
 .../eagle-alert/eagle-alert-service/pom.xml     |   2 +-
 .../service/alert/SiteApplicationObject.java    |  62 +++
 .../service/alert/SiteApplicationResource.java  | 189 +++++++
 .../alert/resolver/SiteApplicationObject.java   |  62 ---
 .../alert/resolver/SiteApplicationResource.java | 189 -------
 eagle-core/eagle-alert/pom.xml                  |   2 +-
 .../eagle-application-service/pom.xml           |  56 +++
 .../application/AppManagerConstants.java        |  43 ++
 .../ApplicationManagementResource.java          | 109 +++++
 .../application/dao/ApplicationManagerDAO.java  |  33 ++
 .../dao/ApplicationManagerDaoImpl.java          |  91 ++++
 .../entity/ApplicationEntityRepo.java           |  30 ++
 .../entity/TopologyDescriptionEntity.java       | 104 ++++
 .../entity/TopologyExecutionEntity.java         | 132 +++++
 .../entity/TopologyExecutionStatus.java         |  38 ++
 .../entity/TopologyOperationEntity.java         | 105 ++++
 .../eagle-stream-application-manager/pom.xml    | 144 ++++++
 .../stream/application/TopologyException.java   |  26 +
 .../stream/application/TopologyExecutable.java  |  27 +
 .../stream/application/TopologyFactory.java     |  55 +++
 .../AbstractDynamicApplication.scala            |  32 ++
 .../stream/application/ApplicationManager.scala | 126 +++++
 .../application/ApplicationManagerUtils.scala   |  38 ++
 .../ApplicationSchedulerAsyncDAO.scala          | 179 +++++++
 .../stream/application/ExecutionPlatform.scala  |  30 ++
 .../application/ExecutionPlatformFactory.scala  |  49 ++
 .../eagle/stream/application/TaskExecutor.scala |  41 ++
 .../application/impl/StormDynamicTopology.scala |  44 ++
 .../impl/StormExecutionPlatform.scala           | 197 ++++++++
 .../scheduler/AppCommandExecutor.scala          | 170 +++++++
 .../scheduler/AppCommandLoader.scala            |  78 +++
 .../scheduler/ApplicationScheduler.scala        |  81 +++
 .../scheduler/StreamAppCoordinator.scala        |  54 ++
 .../src/test/resources/application.conf         |  42 ++
 .../src/test/resources/log4j.properties         |  35 ++
 .../application/scheduler/MockTopology.scala    |  30 ++
 .../scheduler/StormApplicationManagerSpec.scala |  40 ++
 .../application/scheduler/TestScheduler.scala   |  61 +++
 eagle-core/eagle-application-management/pom.xml |  40 ++
 .../eagle-data-process/eagle-job-common/pom.xml |   2 +-
 .../eagle-storm-jobrunning-spout/pom.xml        |   2 +-
 .../job/conf/TestJobConfParserImpl.java         |  43 ++
 .../src/test/resources/jobconf.html             | 230 +++++++++
 .../eagle-stream-pipeline/pom.xml               |   2 +-
 .../eagle/stream/pipeline/parser/Pipeline.scala |   6 +
 .../eagle-stream-process-api/pom.xml            |   2 +-
 .../src/main/resources/application.conf         |  78 +++
 .../src/main/resources/log4j.properties         |  40 ++
 .../core/StreamParallelismConfigExpansion.scala |   4 +-
 .../storm/StormTopologyExecutorImpl.scala       |  14 +-
 .../eagle-stream-process-base/pom.xml           |   4 +-
 eagle-core/eagle-data-process/pom.xml           |   4 +-
 .../eagle-embed/eagle-embed-hbase/pom.xml       |   2 +-
 .../eagle-embed/eagle-embed-server/pom.xml      |   2 +-
 eagle-core/eagle-embed/pom.xml                  |   4 +-
 .../eagle-machinelearning-base/pom.xml          |   4 +-
 eagle-core/eagle-machinelearning/pom.xml        |   4 +-
 eagle-core/eagle-metric/pom.xml                 |   4 +-
 .../eagle-policy/eagle-policy-base/pom.xml      |   2 +-
 .../apache/eagle/policy/common/Constants.java   |   5 +
 .../apache/eagle/policy/common/UrlBuilder.java  |   4 +-
 .../policy/siddhi/SiddhiPolicyEvaluator.java    |  57 ++-
 eagle-core/eagle-policy/pom.xml                 |   4 +-
 eagle-core/eagle-query/eagle-antlr/pom.xml      |   4 +-
 eagle-core/eagle-query/eagle-audit-base/pom.xml |   4 +-
 .../eagle-query/eagle-client-base/pom.xml       |   2 +-
 eagle-core/eagle-query/eagle-common/pom.xml     |   2 +-
 .../org/apache/eagle/common/DateTimeUtil.java   |  12 +
 .../apache/eagle/common/config/EagleConfig.java |   3 +
 .../common/config/EagleConfigConstants.java     |   3 +
 .../eagle/common/config/EagleConfigFactory.java |   5 +
 .../eagle/common/email/EagleMailClient.java     |  21 +-
 .../eagle-query/eagle-entity-base/pom.xml       |   2 +-
 eagle-core/eagle-query/eagle-query-base/pom.xml |   4 +-
 .../eagle-query/eagle-service-base/pom.xml      |   4 +-
 .../eagle-query/eagle-storage-base/pom.xml      |   4 +-
 .../eagle/storage/operation/CompiledQuery.java  |  21 +-
 .../eagle-query/eagle-storage-hbase/pom.xml     |   4 +-
 .../storage/hbase/HBaseEntitySchemaManager.java | 102 ++++
 .../eagle/storage/hbase/HBaseStorage.java       |   1 +
 .../eagle-query/eagle-storage-jdbc/pom.xml      |   2 +-
 .../eagle/storage/jdbc/JdbcConstants.java       |   7 +-
 .../criteria/impl/QueryCriteriaBuilder.java     |   2 +-
 .../jdbc/entity/impl/JdbcEntityWriterImpl.java  |  21 +-
 .../schema/JdbcEntityDefinitionManager.java     |   2 +-
 .../jdbc/schema/JdbcEntitySchemaManager.java    |   6 +-
 eagle-core/eagle-query/pom.xml                  |   2 +-
 eagle-core/pom.xml                              |   5 +-
 eagle-dev/eclipse-java-formatter.xml            | 311 ++++++++++++
 eagle-docs/images/appManager/admin-page.png     | Bin 0 -> 208534 bytes
 .../images/appManager/start-topology-1.png      | Bin 0 -> 212648 bytes
 .../images/appManager/start-topology-2.png      | Bin 0 -> 235826 bytes
 .../images/appManager/stop-topology-1.png       | Bin 0 -> 238503 bytes
 .../images/appManager/stop-topology-2.png       | Bin 0 -> 238064 bytes
 .../images/appManager/stop-topology-3.png       | Bin 0 -> 236337 bytes
 .../appManager/topology-configuration-1.png     | Bin 0 -> 241252 bytes
 .../appManager/topology-configuration-2.png     | Bin 0 -> 288253 bytes
 .../appManager/topology-configuration-save.png  | Bin 0 -> 243119 bytes
 .../images/appManager/topology-description.png  | Bin 0 -> 218471 bytes
 .../images/appManager/topology-execution.png    | Bin 0 -> 219798 bytes
 .../images/appManager/topology-monitor.png      | Bin 0 -> 197752 bytes
 eagle-docs/images/asf_logo.svg                  |  16 +
 eagle-docs/images/notificationPlugin.png        | Bin 0 -> 224458 bytes
 ...erequisites_for_maprFSAuditLog_monitoring.md | 122 +++++
 .../alert_notification_plugin_tutorial.md       |  87 ++++
 .../tutorial/application_manager_tutorial.md    | 117 +++++
 .../tutorial/getting_started_with_eagle.md      |   2 -
 eagle-examples/eagle-topology-example/pom.xml   |   4 +-
 eagle-examples/pom.xml                          |   2 +-
 eagle-external/eagle-kafka/pom.xml              |   4 +-
 eagle-external/eagle-log4jkafka/pom.xml         |   4 +-
 .../hadoop_jmx_collector/metric_collector.py    |   4 +-
 eagle-external/pom.xml                          |   4 +-
 eagle-gc/pom.xml                                |   2 +-
 eagle-hadoop-metric/pom.xml                     |   7 +-
 .../HadoopJmxMetricMonitoringTopology.java      |  37 ++
 .../src/main/resources/hadoop-metric-init.sh    |   2 +-
 .../src/main/resources/log4j.properties         |   5 -
 eagle-security/eagle-metric-collection/pom.xml  |   2 +-
 eagle-security/eagle-security-common/pom.xml    |   2 +-
 .../security/entity/OozieResourceEntity.java    |  82 ++++
 .../OozieResourceSensitivityAPIEntity.java      |  46 ++
 .../entity/SecurityEntityRepository.java        |   1 +
 .../security/hdfs/MAPRFSAuditLogObject.java     |  31 ++
 .../security/hdfs/MAPRFSAuditLogParser.java     |  67 +++
 .../resolver/MetadataAccessConfigRepo.java      |  15 +-
 .../AbstractResourceSensitivityPollingJob.java  |   2 +-
 .../eagle/security/util/ExternalDataJoiner.java |   8 +-
 .../crawler/audit/TestMAPRFSAuditLogParser.java |  64 +++
 .../audit/TestMetaDataAccessConfigRepo.java     |  50 +-
 .../eagle-security-hbase-securitylog/pom.xml    |   9 +-
 .../hbase/HbaseAuditLogMonitoringTopology.java  |  42 ++
 .../parse/HbaseAuditLogKafkaDeserializer.java   |  29 +-
 .../hbase/parse/HbaseAuditLogParser.java        | 144 ++----
 .../src/main/resources/log4j.properties         |  21 +
 .../hbase/TestHbaseAuditLogProcessTopology.java |  44 ++
 .../src/test/resources/application.conf         |  71 +++
 .../src/test/resources/log4j.properties         |  35 ++
 eagle-security/eagle-security-hbase-web/pom.xml |   4 +-
 .../eagle-security-hdfs-auditlog/pom.xml        |   7 +-
 .../HdfsAuditLogMonitoringTopology.java         |  40 ++
 .../auditlog/HdfsAuditLogProcessorMain.java     |  12 +-
 .../timer/FileSensitivityPollingJob.java        |   2 +-
 .../auditlog/timer/IPZonePollingJob.java        |   2 +-
 .../eagle-security-hdfs-securitylog/pom.xml     |   4 +-
 eagle-security/eagle-security-hdfs-web/pom.xml  |   2 +-
 eagle-security/eagle-security-hive-web/pom.xml  |   2 +-
 .../dao/HiveSensitivityMetadataDAOImpl.java     |   2 -
 .../hive/resolver/HiveMetadataResolver.java     |   2 -
 eagle-security/eagle-security-hive/pom.xml      |   9 +-
 .../hive/HiveJobRunningMonitoringTopology.java  |  48 ++
 ...HiveJobRunningSourcedStormSpoutProvider.java |   9 +-
 .../apache/eagle/security/hive/ql/Parser.java   |  52 +-
 .../HiveResourceSensitivityPollingJob.java      |   2 +-
 .../eagle/security/hive/ql/TestParser.java      |  64 ++-
 .../eagle-security-maprfs-auditlog/pom.xml      |  74 +++
 .../MapRFSAuditLogKafkaDeserializer.java        |  69 +++
 .../auditlog/MapRFSAuditLogProcessorMain.java   | 115 +++++
 .../src/main/resources/application.conf         |  69 +++
 .../src/main/resources/log4j.properties         |  40 ++
 .../src/main/resources/maprFSAuditLog-init.sh   | 213 ++++++++
 .../main/resources/security-auditlog-storm.yaml |  18 +
 .../eagle-security-maprfs-web/pom.xml           |  70 +++
 .../security/hdfs/MAPRFSResourceConstants.java  |  24 +
 .../hdfs/resolver/MAPRFSCommandResolver.java    |  72 +++
 .../hdfs/resolver/MAPRStatusCodeResolver.java   |  81 +++
 .../hdfs/rest/MAPRFSResourceWebResource.java    |  73 +++
 .../eagle-security-oozie-auditlog/pom.xml       |  40 ++
 .../parse/OozieAuditLogKafkaDeserializer.java   |  71 +++
 .../oozie/parse/OozieAuditLogObject.java        |  35 ++
 .../oozie/parse/OozieAuditLogParser.java        | 110 +++++
 .../oozie/parse/OozieAuditLogProcessorMain.java |  33 ++
 ...ozieResourceSensitivityDataJoinExecutor.java |  89 ++++
 .../OozieResourceSensitivityPollingJob.java     |  63 +++
 .../src/main/resources/application.conf         |  66 +++
 .../oozie/parse/TestOozieAuditLogParser.java    |  56 +++
 eagle-security/eagle-security-oozie-web/pom.xml |  91 ++++
 .../OozieResourceSensitivityDataJoiner.java     |  47 ++
 .../BadOozieMetadataAccessConfigException.java  |  27 +
 .../oozie/dao/OozieMetadataAccessConfig.java    |  87 ++++
 .../oozie/dao/OozieMetadataAccessConfigDAO.java |  23 +
 .../dao/OozieMetadataAccessConfigDAOImpl.java   |  29 ++
 .../security/oozie/dao/OozieMetadataDAO.java    |  25 +
 .../oozie/dao/OozieMetadataDAOImpl.java         |  54 ++
 .../oozie/dao/OozieSensitivityMetadataDAO.java  |  29 ++
 .../dao/OozieSensitivityMetadataDAOImpl.java    |  81 +++
 .../res/OozieMetadataBrowseWebResource.java     |  58 +++
 .../res/OozieMetadataBrowseWebResponse.java     |  44 ++
 .../TestOozieResourceSensitivityDataJoiner.java |  92 ++++
 .../dao/TestOozieMetadataAccessConfig.java      |  43 ++
 .../TestOozieSensitivityMetadataDAOImpl.java    | 120 +++++
 .../src/test/resources/coordinatorJob.json      |  94 ++++
 .../eagle-security-userprofile/common/pom.xml   |   2 +-
 .../detection/pom.xml                           |   2 +-
 .../eagle-security-userprofile/pom.xml          |   4 +-
 .../eagle-security-userprofile/training/pom.xml |   4 +-
 eagle-security/pom.xml                          |  53 +-
 eagle-topology-assembly/pom.xml                 |  46 +-
 .../src/assembly/eagle-topology-assembly.xml    |   4 +-
 eagle-webservice/pom.xml                        |  77 ++-
 .../profile/ApplicationSchedulerListener.java   |  63 +++
 .../profile/EagleServiceProfileInitializer.java |   3 +
 .../src/main/resources/application-derby.conf   |  30 ++
 .../src/main/resources/eagle-scheduler.conf     |  42 ++
 .../src/main/resources/log4j.properties         |   7 +-
 eagle-webservice/src/main/webapp/README.md      |  19 +
 .../src/main/webapp/WEB-INF/web.xml             |   6 +
 .../src/main/webapp/app/public/css/main.css     |   8 +
 .../public/feature/classification/controller.js |  58 ++-
 .../classification/page/sensitivity/job.html    |  92 ++++
 .../app/public/feature/common/controller.js     |  24 +-
 .../app/public/feature/metrics/controller.js    |   2 +-
 .../app/public/feature/topology/controller.js   | 257 ++++++++++
 .../feature/topology/page/management.html       |  52 ++
 .../feature/topology/page/monitoring.html       | 151 ++++++
 .../src/main/webapp/app/public/js/app.config.js |  15 +-
 .../src/main/webapp/app/public/js/app.js        |  13 +-
 .../src/main/webapp/app/public/js/common.js     |  49 +-
 .../public/js/ctrl/configurationController.js   |  10 +-
 .../webapp/app/public/js/srv/entitiesSrv.js     |  30 +-
 .../main/webapp/app/public/js/srv/siteSrv.js    |   2 +-
 .../src/main/webapp/app/public/js/srv/uiSrv.js  |  24 +-
 mkdocs.yml                                      |   2 +
 pom.xml                                         | 324 ++++++++----
 258 files changed, 9500 insertions(+), 1263 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/a0443561/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java
----------------------------------------------------------------------


[19/47] incubator-eagle git commit: EAGLE-296 Test unit for JobConfParserImpl Test unit for JobConfParserImpl

Posted by mw...@apache.org.
EAGLE-296 Test unit for JobConfParserImpl
Test unit for JobConfParserImpl

Author: JiJun Tang, tangjijun@yhd.com
Reviewer: Yong Zhang, yonzhang2012@apache.org

Closes #195


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/5578cfd9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/5578cfd9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/5578cfd9

Branch: refs/heads/master
Commit: 5578cfd912d70ebc0bb52a754f145996c6e5efd8
Parents: e618d25
Author: yonzhang <yo...@gmail.com>
Authored: Mon May 23 21:34:09 2016 -0700
Committer: yonzhang <yo...@gmail.com>
Committed: Mon May 23 21:34:09 2016 -0700

----------------------------------------------------------------------
 .../job/conf/TestJobConfParserImpl.java         |  43 ++++
 .../src/test/resources/jobconf.html             | 230 +++++++++++++++++++
 2 files changed, 273 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/5578cfd9/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/test/java/org/apache/eagle/jobrunning/job/conf/TestJobConfParserImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/test/java/org/apache/eagle/jobrunning/job/conf/TestJobConfParserImpl.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/test/java/org/apache/eagle/jobrunning/job/conf/TestJobConfParserImpl.java
new file mode 100644
index 0000000..fdc9359
--- /dev/null
+++ b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/test/java/org/apache/eagle/jobrunning/job/conf/TestJobConfParserImpl.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.eagle.jobrunning.job.conf;
+
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Document;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.io.InputStream;
+import java.util.Map;
+
+public class TestJobConfParserImpl {
+
+    public static final String SQL = "CREATE TABLE XXX.XXX as SELECT /*+ MAPJOIN(XXX,XXX) */ trim(x.XXX) AS hc.XXX, hc.XXX, SUM(x.XXX) AS XXX FROM XXX.XXX x INNER JOIN XXX.XXX XXX ON x.XXX = XXX.XXX AND XXX.XXX = 1 INNER JOIN XXX.XXX dp ON XXX.XXX = XXX.XXX AND XXX.XXX = 1 INNER JOIN XXX.XXX hc ON XXX.XXX = XXX.XXX AND XXX.XXX=1 LEFT OUTER JOIN XXX.XXX hsc ON hsc.XXX = hc.XXX AND hsc.XXX=1 WHERE x.ds = 'XXX' AND length(x.XXX) > 0 AND x.XXX = 51 GROUP BY trim(x.XXX), hc.XXX, hc.XXX";
+
+    @Test
+    public void test() throws Exception {
+        InputStream is = this.getClass().getResourceAsStream("/jobconf.html");
+        final Document doc = Jsoup.parse(is, "UTF-8", "{historyUrl}/jobhistory/conf/job_xxxxxxxxxxxxx_xxxxxx");
+        JobConfParser parser = new JobConfParserImpl();
+        Map<String, String> configs = parser.parse(doc);
+        Assert.assertEquals(configs.size(), 3);
+        Assert.assertEquals(SQL, configs.get("mapreduce.workflow.name"));
+        Assert.assertEquals("0.0.0.0:50070", configs.get("dfs.namenode.http-address"));
+        Assert.assertEquals("org.apache.hive.hcatalog.api.repl.exim.EximReplicationTaskFactory", configs.get("hive.repl.task.factory"));
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/5578cfd9/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/test/resources/jobconf.html
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/test/resources/jobconf.html b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/test/resources/jobconf.html
new file mode 100644
index 0000000..b579a51
--- /dev/null
+++ b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/test/resources/jobconf.html
@@ -0,0 +1,230 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+  <meta http-equiv="X-UA-Compatible" content="IE=8">
+  <meta http-equiv="Content-type" content="text/html; charset=UTF-8">
+  <style type="text/css">
+    #conf_paginate span {font-weight:normal}
+    #conf .progress {width:8em}
+    #conf_processing {top:-1.5em; font-size:1em;
+      color:#000; background:rgba(255, 255, 255, 0.8)}
+  </style>
+  <title>
+    Configuration for MapReduce Job job_1462444563491_89969
+  </title>
+  <link rel="stylesheet" href="/static/yarn.css">
+  <style type="text/css">
+    #layout { height: 100%; }
+    #layout thead td { height: 3em; }
+    #layout #navcell { width: 11em; padding: 0 1em; }
+    #layout td.content { padding-top: 0 }
+    #layout tbody { vertical-align: top; }
+    #layout tfoot td { height: 4em; }
+  </style>
+  <link rel="stylesheet" href="/static/jquery/themes-1.9.1/base/jquery-ui.css">
+  <link rel="stylesheet" href="/static/dt-1.9.4/css/jui-dt.css">
+  <script type="text/javascript" src="/static/jquery/jquery-1.8.2.min.js">
+  </script>
+  <script type="text/javascript" src="/static/jquery/jquery-ui-1.9.1.custom.min.js">
+  </script>
+  <script type="text/javascript" src="/static/dt-1.9.4/js/jquery.dataTables.min.js">
+  </script>
+  <script type="text/javascript" src="/static/yarn.dt.plugins.js">
+  </script>
+  <style type="text/css">
+    #jsnotice { padding: 0.2em; text-align: center; }
+    .ui-progressbar { height: 1em; min-width: 5em }
+  </style>
+  <script type="text/javascript">
+    $(function() {
+      $('#nav').accordion({autoHeight:false, active:1});
+    confDataTable =  $('#conf').dataTable({bStateSave : true, "fnStateSave": function (oSettings, oData) { sessionStorage.setItem( oSettings.sTableId, JSON.stringify(oData) ); }, "fnStateLoad": function (oSettings) { return JSON.parse( sessionStorage.getItem(oSettings.sTableId) );}, bJQueryUI:true, sPaginationType: 'full_numbers', iDisplayLength:20, aLengthMenu:[20, 40, 60, 80, 100]}).fnSetFilteringDelay(188);
+    var confInitVals = new Array();
+$('tfoot input').keyup( function () 
+{  confDataTable.fnFilter( this.value, $('tfoot input').index(this) );
+} );
+$('tfoot input').each( function (i) {
+  confInitVals[i] = this.value;
+} );
+$('tfoot input').focus( function () {
+  if ( this.className == 'search_init' )
+  {
+    this.className = '';
+    this.value = '';
+  }
+} );
+$('tfoot input').blur( function (i) {
+  if ( this.value == '' )
+  {
+    this.className = 'search_init';
+    this.value = confInitVals[$('tfoot input').index(this)];
+  }
+} );
+
+    });
+  </script>
+  <div id="jsnotice" class="ui-state-error">
+    This page works best with javascript enabled.
+  </div>
+  <script type="text/javascript">
+    $('#jsnotice').hide();
+  </script>
+  <table id="layout" class="ui-widget-content">
+    <thead>
+      <tr>
+        <td colspan="2">
+          <div id="header" class="ui-widget">
+            <div id="user">
+              Logged in as: dr.who
+            </div>
+            <div id="logo">
+              <img src="/static/hadoop-st.png">
+            </div>
+            <h1>
+              Configuration for MapReduce Job job_1462444563491_89969
+            </h1>
+          </div>
+        </td>
+      </tr>
+    </thead>
+    <tfoot>
+      <tr>
+        <td colspan="2">
+          <div id="footer" class="ui-widget">
+          </div>
+        </td>
+      </tr>
+    </tfoot>
+    <tbody>
+      <tr>
+        <td id="navcell">
+          <div id="nav">
+            <h3>
+              Application
+            </h3>
+            <ul>
+              <li>
+                <a href="/jobhistory/about">About</a>
+              <li>
+                <a href="/jobhistory/app">Jobs</a>
+            </ul>
+            <h3>
+              Job
+            </h3>
+            <ul>
+              <li>
+                <a href="/jobhistory/job/job_1462444563491_89969">Overview</a>
+              <li>
+                <a href="/jobhistory/jobcounters/job_1462444563491_89969">Counters</a>
+              <li>
+                <a href="/jobhistory/conf/job_1462444563491_89969">Configuration</a>
+              <li>
+                <a href="/jobhistory/tasks/job_1462444563491_89969/m">Map tasks</a>
+              <li>
+                <a href="/jobhistory/tasks/job_1462444563491_89969/r">Reduce tasks</a>
+            </ul>
+            <h3>
+              Tools
+            </h3>
+            <ul>
+              <li>
+                <a href="/conf">Configuration</a>
+              <li>
+                <a href="/logs">Local logs</a>
+              <li>
+                <a href="/stacks">Server stacks</a>
+              <li>
+                <a href="/metrics">Server metrics</a>
+            </ul>
+          </div>
+        </td>
+        <td class="content">
+          <div>
+            <h3>
+              viewfs://xxx/user/history/done/2016/05/13/000089/job_1462444563491_89969_conf.xml
+            </h3>
+          </div>
+          <table id="conf">
+            <thead>
+              <tr>
+                <th class="ui-state-default">
+                  key
+                </th>
+                <th class="ui-state-default">
+                  value
+                </th>
+                <th class="ui-state-default">
+                  source chain
+                </th>
+              </tr>
+            </thead>
+            <tbody>
+            <tr>
+              <td>
+                mapreduce.workflow.name
+              </td>
+              <td>
+                CREATE TABLE XXX.XXX  as SELECT /*+ MAPJOIN(XXX,XXX) */ trim(x.XXX)  AS   hc.XXX, hc.XXX, SUM(x.XXX)  AS  XXX FROM XXX.XXX x INNER   JOIN XXX.XXX XXX ON x.XXX = XXX.XXX AND XXX.XXX = 1 INNER  JOIN XXX.XXX dp ON XXX.XXX = XXX.XXX AND XXX.XXX = 1 INNER JOIN XXX.XXX hc ON XXX.XXX = XXX.XXX AND XXX.XXX=1 LEFT   OUTER JOIN XXX.XXX hsc ON hsc.XXX = hc.XXX AND hsc.XXX=1 WHERE x.ds = 'XXX' AND length(x.XXX) &gt; 0 AND x.XXX = 51 GROUP BY trim(x.XXX), hc.XXX, hc.XXX
+              </td>
+              <td>
+                job.xml &#11013; programatically
+              </td>
+            </tr>
+            <tr>
+              <td>
+                dfs.namenode.http-address
+              </td>
+              <td>
+                0.0.0.0:50070
+              </td>
+              <td>
+                job.xml &#11013; hdfs-default.xml
+              </td>
+            </tr>
+            <tr>
+              <td>
+                hive.repl.task.factory
+              </td>
+              <td>
+                org.apache.hive.hcatalog.api.repl.exim.EximReplicationTaskFactory
+              </td>
+              <td>
+                job.xml &#11013; org.apache.hadoop.hive.conf.LoopingByteArrayInputStream@61284cb6 &#11013; programatically
+              </td>
+            </tr>
+            </tbody>
+            <tfoot>
+              <tr>
+                <th>
+                  <input class="search_init" type="text" name="key" value="key">
+                </th>
+                <th>
+                  <input class="search_init" type="text" name="value" value="value">
+                </th>
+                <th>
+                  <input class="search_init" type="text" name="source chain" value="source chain">
+                </th>
+              </tr>
+            </tfoot>
+          </table>
+        </td>
+      </tr>
+    </tbody>
+  </table>
+</html>


[42/47] incubator-eagle git commit: [EAGLE-355] fix advanced sql parse logic

Posted by mw...@apache.org.
[EAGLE-355] fix advanced sql parse logic

Adjust the logic of expression parse

Author: jiljiang <ji...@ebay.com>

Closes #251 from zombieJ/branch-0.4.


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/6a3f152b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/6a3f152b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/6a3f152b

Branch: refs/heads/master
Commit: 6a3f152b3a5e44803f19592da6ce7f284232b37a
Parents: f76a972
Author: jiljiang <ji...@ebay.com>
Authored: Thu Jul 7 15:21:10 2016 +0800
Committer: Hao Chen <ha...@apache.org>
Committed: Thu Jul 7 15:21:10 2016 +0800

----------------------------------------------------------------------
 .../main/webapp/app/public/feature/common/controller.js  | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/6a3f152b/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js b/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js
index 72af7eb..b23d53b 100644
--- a/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js
+++ b/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js
@@ -644,15 +644,16 @@
 						// >> Parse expression
 						$scope.policy.__.conditions = {};
 						var _condition = _policyUnit.expression.match(/from\s+(\w+)(\[(.*)])?(#window[^\)]*\))?\s+(select (\w+, )?(\w+)\((\w+)\) as [\w\d_]+ (group by (\w+) )?having ([\w\d_]+) ([<>=]+) ([^\s]+))?/);
-						var _cond_stream = _condition[1];
-						var _cond_query = _condition[3] || "";
-						var _cond_window = _condition[4];
-						var _cond_group = _condition[5];
-						var _cond_groupUnit = _condition.slice(7,14);
 
 						if(!_condition) {
 							$scope.policy.__.advanced = true;
 						} else {
+							var _cond_stream = _condition[1];
+							var _cond_query = _condition[3] || "";
+							var _cond_window = _condition[4];
+							var _cond_group = _condition[5];
+							var _cond_groupUnit = _condition.slice(7,14);
+
 							// > StreamName
 							var _streamName = _cond_stream;
 							var _cond = _cond_query;


[23/47] incubator-eagle git commit: [EAGLE-298] Oozie auditlog integration for Oozie security monitoring

Posted by mw...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-oozie-web/src/test/java/org/apache/eagle/service/security/oozie/TestOozieResourceSensitivityDataJoiner.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-web/src/test/java/org/apache/eagle/service/security/oozie/TestOozieResourceSensitivityDataJoiner.java b/eagle-security/eagle-security-oozie-web/src/test/java/org/apache/eagle/service/security/oozie/TestOozieResourceSensitivityDataJoiner.java
new file mode 100644
index 0000000..50cd1f1
--- /dev/null
+++ b/eagle-security/eagle-security-oozie-web/src/test/java/org/apache/eagle/service/security/oozie/TestOozieResourceSensitivityDataJoiner.java
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.service.security.oozie;
+
+import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
+import org.apache.eagle.security.entity.OozieResourceEntity;
+import org.apache.eagle.security.entity.OozieResourceSensitivityAPIEntity;
+import org.apache.eagle.service.generic.GenericEntityServiceResource;
+import org.apache.eagle.service.security.oozie.dao.OozieSensitivityMetadataDAO;
+import org.apache.eagle.service.security.oozie.dao.OozieSensitivityMetadataDAOImpl;
+import org.apache.oozie.client.CoordinatorJob;
+import org.apache.oozie.client.rest.JsonTags;
+import org.apache.oozie.client.rest.JsonToBean;
+import org.json.simple.JSONArray;
+import org.json.simple.JSONObject;
+import org.json.simple.JSONValue;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static org.easymock.EasyMock.expect;
+import static org.powermock.api.easymock.PowerMock.createMock;
+import static org.powermock.api.easymock.PowerMock.expectNew;
+import static org.powermock.api.easymock.PowerMock.replay;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest(OozieResourceSensitivityDataJoiner.class)
+public class TestOozieResourceSensitivityDataJoiner {
+    @Test
+    public void testOozieResourceSensitivityDataJoiner() throws Exception {
+
+        List<CoordinatorJob> coordinatorJobs = getCoordinatorJobs();
+        mockGetOozieSensitivityMap();
+        OozieResourceSensitivityDataJoiner joiner = new OozieResourceSensitivityDataJoiner();
+        List<OozieResourceEntity> oozieResourceEntitys = joiner.joinOozieResourceSensitivity("test", coordinatorJobs);
+
+        Assert.assertEquals(3, oozieResourceEntitys.size());
+        Assert.assertEquals("0007197-160509174709457-oozie-oozi-C", oozieResourceEntitys.get(0).getJobId());
+        Assert.assertEquals("co_pms_ods_adv_click_log", oozieResourceEntitys.get(0).getName());
+        Assert.assertEquals("pms job", oozieResourceEntitys.get(0).getSensitiveType());
+
+        Assert.assertEquals("0007189-160509174709457-oozie-oozi-C", oozieResourceEntitys.get(1).getJobId());
+        Assert.assertEquals("co_tandem_ods_adv_click_log", oozieResourceEntitys.get(1).getName());
+        Assert.assertEquals("tandem job", oozieResourceEntitys.get(1).getSensitiveType());
+
+        Assert.assertEquals("0007188-160509174709457-oozie-oozi-C", oozieResourceEntitys.get(2).getJobId());
+        Assert.assertEquals("co_cpc_new_custorm", oozieResourceEntitys.get(2).getName());
+        Assert.assertEquals(null, oozieResourceEntitys.get(2).getSensitiveType());
+
+    }
+
+    private List<CoordinatorJob> getCoordinatorJobs() {
+        List<CoordinatorJob> coordinatorJobs;
+        InputStream jsonstream = this.getClass().getResourceAsStream("/coordinatorJob.json");
+        JSONObject json = (JSONObject) JSONValue.parse(new InputStreamReader(jsonstream));
+        JSONArray jobs = (JSONArray) json.get(JsonTags.COORDINATOR_JOBS);
+        coordinatorJobs = JsonToBean.createCoordinatorJobList(jobs);
+        return coordinatorJobs;
+    }
+
+    private void mockGetOozieSensitivityMap() throws Exception {
+        OozieSensitivityMetadataDAOImpl oozieSensitivityMetadataDAOMock = createMock(OozieSensitivityMetadataDAOImpl.class);
+        expectNew(OozieSensitivityMetadataDAOImpl.class).andReturn(oozieSensitivityMetadataDAOMock);
+        Map<String, String> oozieSensitivityMap = new HashMap<String, String>();
+        oozieSensitivityMap.put("0007197-160509174709457-oozie-oozi-C", "pms job");
+        oozieSensitivityMap.put("0007189-160509174709457-oozie-oozi-C", "tandem job");
+        expect(oozieSensitivityMetadataDAOMock.getOozieSensitivityMap("test")).andReturn(oozieSensitivityMap);
+        replay(oozieSensitivityMetadataDAOMock, OozieSensitivityMetadataDAOImpl.class);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-oozie-web/src/test/java/org/apache/eagle/service/security/oozie/dao/TestOozieMetadataAccessConfig.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-web/src/test/java/org/apache/eagle/service/security/oozie/dao/TestOozieMetadataAccessConfig.java b/eagle-security/eagle-security-oozie-web/src/test/java/org/apache/eagle/service/security/oozie/dao/TestOozieMetadataAccessConfig.java
new file mode 100644
index 0000000..59a3c0b
--- /dev/null
+++ b/eagle-security/eagle-security-oozie-web/src/test/java/org/apache/eagle/service/security/oozie/dao/TestOozieMetadataAccessConfig.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.service.security.oozie.dao;
+
+import com.typesafe.config.Config;
+import com.typesafe.config.ConfigFactory;
+import com.typesafe.config.ConfigParseOptions;
+import com.typesafe.config.ConfigSyntax;
+import junit.framework.Assert;
+import org.apache.eagle.common.config.EagleConfigConstants;
+import org.junit.Test;
+
+public class TestOozieMetadataAccessConfig {
+    @Test
+    public void testGetOozieConfig() throws Exception {
+        String oozieConfigStr = "classification.accessType=oozie_api\nclassification.oozieUrl=http://localhost:11000/oozie\nclassification.filter=status=RUNNING\nclassification.authType=SIMPLE";
+        ConfigParseOptions options = ConfigParseOptions.defaults()
+                .setSyntax(ConfigSyntax.PROPERTIES)
+                .setAllowMissing(false);
+        Config config = ConfigFactory.parseString(oozieConfigStr, options);
+        config = config.getConfig(EagleConfigConstants.CLASSIFICATION_CONFIG);
+        OozieMetadataAccessConfig oozieMetadataAccessConfig = OozieMetadataAccessConfig.config2Entity(config);
+        System.out.print(oozieMetadataAccessConfig);
+        Assert.assertEquals("oozie_api", oozieMetadataAccessConfig.getAccessType());
+        Assert.assertEquals("http://localhost:11000/oozie", oozieMetadataAccessConfig.getOozieUrl());
+        Assert.assertEquals("status=RUNNING", oozieMetadataAccessConfig.getFilter());
+        Assert.assertEquals("SIMPLE", oozieMetadataAccessConfig.getAuthType());
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-oozie-web/src/test/java/org/apache/eagle/service/security/oozie/dao/TestOozieSensitivityMetadataDAOImpl.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-web/src/test/java/org/apache/eagle/service/security/oozie/dao/TestOozieSensitivityMetadataDAOImpl.java b/eagle-security/eagle-security-oozie-web/src/test/java/org/apache/eagle/service/security/oozie/dao/TestOozieSensitivityMetadataDAOImpl.java
new file mode 100644
index 0000000..33845b9
--- /dev/null
+++ b/eagle-security/eagle-security-oozie-web/src/test/java/org/apache/eagle/service/security/oozie/dao/TestOozieSensitivityMetadataDAOImpl.java
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.service.security.oozie.dao;
+
+
+import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
+import org.apache.eagle.security.entity.OozieResourceSensitivityAPIEntity;
+import org.apache.eagle.service.generic.GenericEntityServiceResource;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static org.easymock.EasyMock.expect;
+import static org.powermock.api.easymock.PowerMock.*;
+
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest(OozieSensitivityMetadataDAOImpl.class)
+public class TestOozieSensitivityMetadataDAOImpl {
+    @Test
+    public void testGetAllOozieSensitivityMap() throws Exception {
+
+        String[] sites = new String[]{"test", "test"};
+        mockGenericEntityServiceResourceSearchMethod("OozieResourceSensitivityService[]{*}",sites);
+        OozieSensitivityMetadataDAO oozieSensitivityMetadataDAO = new OozieSensitivityMetadataDAOImpl();
+        Map<String, Map<String, String>> allOozieSensitivityMap = oozieSensitivityMetadataDAO.getAllOozieSensitivityMap();
+        Assert.assertEquals(1, allOozieSensitivityMap.size());
+        Assert.assertTrue(allOozieSensitivityMap.containsKey("test"));
+        Assert.assertTrue(allOozieSensitivityMap.get("test").containsKey("0007197-160509174709457-oozie-oozi-C"));
+        Assert.assertEquals("pms job", allOozieSensitivityMap.get("test").get("0007197-160509174709457-oozie-oozi-C"));
+        Assert.assertTrue(allOozieSensitivityMap.get("test").containsKey("0007189-160509174709457-oozie-oozi-C"));
+        Assert.assertEquals("tandem job", allOozieSensitivityMap.get("test").get("0007189-160509174709457-oozie-oozi-C"));
+
+    }
+
+    @Test
+    public void testGetAllOozieSensitivityMapWithDiffSite() throws Exception {
+
+        String[] sites = new String[]{"test", "test1"};
+        mockGenericEntityServiceResourceSearchMethod("OozieResourceSensitivityService[]{*}",sites);
+        OozieSensitivityMetadataDAO oozieSensitivityMetadataDAO = new OozieSensitivityMetadataDAOImpl();
+        Map<String, Map<String, String>> allOozieSensitivityMap = oozieSensitivityMetadataDAO.getAllOozieSensitivityMap();
+        Assert.assertEquals(2, allOozieSensitivityMap.size());
+        Assert.assertTrue(allOozieSensitivityMap.containsKey("test"));
+        Assert.assertTrue(allOozieSensitivityMap.containsKey("test1"));
+        Assert.assertTrue(allOozieSensitivityMap.get("test1").containsKey("0007197-160509174709457-oozie-oozi-C"));
+        Assert.assertEquals("pms job", allOozieSensitivityMap.get("test1").get("0007197-160509174709457-oozie-oozi-C"));
+        Assert.assertTrue(allOozieSensitivityMap.get("test").containsKey("0007189-160509174709457-oozie-oozi-C"));
+        Assert.assertEquals("tandem job", allOozieSensitivityMap.get("test").get("0007189-160509174709457-oozie-oozi-C"));
+
+    }
+
+    @Test
+    public void testGetOozieSensitivityMap() throws Exception {
+
+        String[] sites = new String[]{"test", "test"};
+        mockGenericEntityServiceResourceSearchMethod("OozieResourceSensitivityService[@site=\"test\"]{*}",sites);
+        OozieSensitivityMetadataDAO oozieSensitivityMetadataDAO = new OozieSensitivityMetadataDAOImpl();
+        Map<String, String> oozieSensitivityMap = oozieSensitivityMetadataDAO.getOozieSensitivityMap("test");
+        Assert.assertEquals(2, oozieSensitivityMap.size());
+        Assert.assertTrue(oozieSensitivityMap.containsKey("0007197-160509174709457-oozie-oozi-C"));
+        Assert.assertTrue(oozieSensitivityMap.containsKey("0007189-160509174709457-oozie-oozi-C"));
+        Assert.assertEquals("pms job", oozieSensitivityMap.get("0007197-160509174709457-oozie-oozi-C"));
+        Assert.assertEquals("tandem job", oozieSensitivityMap.get("0007189-160509174709457-oozie-oozi-C"));
+
+    }
+
+    private void mockGenericEntityServiceResourceSearchMethod(String queryStr ,String[] sites) throws Exception {
+        GenericEntityServiceResource genericEntityServiceResourceMock = createMock(GenericEntityServiceResource.class);
+        expectNew(GenericEntityServiceResource.class).andReturn(genericEntityServiceResourceMock);
+        GenericServiceAPIResponseEntity ret = new GenericServiceAPIResponseEntity();
+        List<OozieResourceSensitivityAPIEntity> entities = getOozieResourceSensitivityAPIEntities(sites);
+        ret.setObj(entities);
+        expect(genericEntityServiceResourceMock.search(queryStr, null, null, Integer.MAX_VALUE, null, false, false, 0L, 0, false,
+                0, null, false)).andReturn(ret);
+
+        replay(genericEntityServiceResourceMock, GenericEntityServiceResource.class);
+    }
+
+    private List<OozieResourceSensitivityAPIEntity> getOozieResourceSensitivityAPIEntities(final String[] sites) {
+        List<OozieResourceSensitivityAPIEntity> entities = new ArrayList<OozieResourceSensitivityAPIEntity>();
+        OozieResourceSensitivityAPIEntity entity1 = new OozieResourceSensitivityAPIEntity();
+        entity1.setTags(new HashMap<String, String>() {{
+            put("site", sites[0]);
+            put("oozieResource", "0007189-160509174709457-oozie-oozi-C");
+        }});
+        entity1.setSensitivityType("tandem job");
+        OozieResourceSensitivityAPIEntity entity2 = new OozieResourceSensitivityAPIEntity();
+        entity2.setTags(new HashMap<String, String>() {{
+            put("site", sites[1]);
+            put("oozieResource", "0007197-160509174709457-oozie-oozi-C");
+        }});
+        entity2.setSensitivityType("pms job");
+        entities.add(entity1);
+        entities.add(entity2);
+        return entities;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/eagle-security-oozie-web/src/test/resources/coordinatorJob.json
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-oozie-web/src/test/resources/coordinatorJob.json b/eagle-security/eagle-security-oozie-web/src/test/resources/coordinatorJob.json
new file mode 100644
index 0000000..f2e5d5c
--- /dev/null
+++ b/eagle-security/eagle-security-oozie-web/src/test/resources/coordinatorJob.json
@@ -0,0 +1,94 @@
+{
+  "total": 3,
+  "coordinatorjobs": [
+    {
+      "total": 0,
+      "pauseTime": null,
+      "coordJobName": "co_pms_ods_adv_click_log",
+      "coordJobPath": "\/user\/apps\/pms\/co_pms_cis_recommend_new_product",
+      "timeZone": "Asia\/Shanghai",
+      "frequency": "7",
+      "conf": null,
+      "endTime": "Tue, 17 May 2016 16:00:00 GMT",
+      "executionPolicy": "FIFO",
+      "startTime": "Tue, 17 May 2016 06:45:00 GMT",
+      "timeUnit": "DAY",
+      "concurrency": 1,
+      "coordJobId": "0007197-160509174709457-oozie-oozi-C",
+      "lastAction": "Tue, 24 May 2016 06:45:00 GMT",
+      "status": "RUNNING",
+      "acl": null,
+      "mat_throttling": 0,
+      "timeOut": 120,
+      "nextMaterializedTime": "Tue, 24 May 2016 06:45:00 GMT",
+      "bundleId": null,
+      "toString": "Coordinator application id[0007197-160509174709457-oozie-oozi-C] status[RUNNING]",
+      "coordExternalId": null,
+      "group": null,
+      "user": "pms",
+      "consoleUrl": null,
+      "actions": [
+      ]
+    },
+    {
+      "total": 0,
+      "pauseTime": null,
+      "coordJobName": "co_tandem_ods_adv_click_log",
+      "coordJobPath": "\/user\/apps\/cpc\/co_cpc_export_newcustomer",
+      "timeZone": "Asia\/Shanghai",
+      "frequency": "10",
+      "conf": null,
+      "endTime": "Mon, 23 Nov 2099 10:28:00 GMT",
+      "executionPolicy": "FIFO",
+      "startTime": "Mon, 16 May 2016 21:00:00 GMT",
+      "timeUnit": "DAY",
+      "concurrency": 1,
+      "coordJobId": "0007189-160509174709457-oozie-oozi-C",
+      "lastAction": "Thu, 26 May 2016 21:00:00 GMT",
+      "status": "RUNNING",
+      "acl": null,
+      "mat_throttling": 0,
+      "timeOut": 120,
+      "nextMaterializedTime": "Thu, 26 May 2016 21:00:00 GMT",
+      "bundleId": null,
+      "toString": "Coordinator application id[0007189-160509174709457-oozie-oozi-C] status[RUNNING]",
+      "coordExternalId": null,
+      "group": null,
+      "user": "tandem",
+      "consoleUrl": null,
+      "actions": [
+      ]
+    },
+    {
+      "total": 0,
+      "pauseTime": null,
+      "coordJobName": "co_cpc_new_custorm",
+      "coordJobPath": "\/user\/apps\/cpc\/co_cpc_new_custorm",
+      "timeZone": "Asia\/Shanghai",
+      "frequency": "1",
+      "conf": null,
+      "endTime": "Mon, 23 Nov 2099 10:28:00 GMT",
+      "executionPolicy": "FIFO",
+      "startTime": "Tue, 17 May 2016 23:40:00 GMT",
+      "timeUnit": "DAY",
+      "concurrency": 1,
+      "coordJobId": "0007188-160509174709457-oozie-oozi-C",
+      "lastAction": null,
+      "status": "PREP",
+      "acl": null,
+      "mat_throttling": 0,
+      "timeOut": 120,
+      "nextMaterializedTime": null,
+      "bundleId": null,
+      "toString": "Coordinator application id[0007188-160509174709457-oozie-oozi-C] status[PREP]",
+      "coordExternalId": null,
+      "group": null,
+      "user": "cpc",
+      "consoleUrl": null,
+      "actions": [
+      ]
+    }
+  ],
+  "len": 50,
+  "offset": 1
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-security/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/pom.xml b/eagle-security/pom.xml
index 93c5aa1..4735b69 100644
--- a/eagle-security/pom.xml
+++ b/eagle-security/pom.xml
@@ -18,31 +18,34 @@
   ~  */
   -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-		<groupId>org.apache.eagle</groupId>
-		<artifactId>eagle-parent</artifactId>
-		<version>0.4.0-incubating-SNAPSHOT</version>
-      <relativePath>../pom.xml</relativePath>
-  </parent>
-  <artifactId>eagle-security-parent</artifactId>
-  <name>eagle-security-parent</name>
-  <description>eagle security data activity monitoring project</description>
-  <packaging>pom</packaging>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.eagle</groupId>
+        <artifactId>eagle-parent</artifactId>
+        <version>0.4.0-incubating-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <artifactId>eagle-security-parent</artifactId>
+    <name>eagle-security-parent</name>
+    <description>eagle security data activity monitoring project</description>
+    <packaging>pom</packaging>
 
-  <modules>
-    <module>eagle-security-common</module>
-	<module>eagle-security-hdfs-auditlog</module>
-    <module>eagle-security-maprfs-auditlog</module>
-    <module>eagle-security-userprofile</module>
-    <module>eagle-security-hive</module>
-    <module>eagle-security-hive-web</module>
-    <module>eagle-security-hdfs-web</module>
-    <module>eagle-security-maprfs-web</module>
-    <module>eagle-security-hdfs-securitylog</module>
-    <module>eagle-security-hbase-securitylog</module>
-    <module>eagle-security-hbase-web</module>
-	<module>eagle-metric-collection</module>
-  </modules>
+    <modules>
+        <module>eagle-security-common</module>
+        <module>eagle-security-hdfs-auditlog</module>
+        <module>eagle-security-maprfs-auditlog</module>
+        <module>eagle-security-userprofile</module>
+        <module>eagle-security-hive</module>
+        <module>eagle-security-hive-web</module>
+        <module>eagle-security-hdfs-web</module>
+        <module>eagle-security-maprfs-web</module>
+        <module>eagle-security-hdfs-securitylog</module>
+        <module>eagle-security-hbase-securitylog</module>
+        <module>eagle-security-hbase-web</module>
+        <module>eagle-metric-collection</module>
+        <module>eagle-security-oozie-auditlog</module>
+        <module>eagle-security-oozie-web</module>
+    </modules>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-topology-assembly/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-topology-assembly/pom.xml b/eagle-topology-assembly/pom.xml
index ced6d45..0ecd227 100644
--- a/eagle-topology-assembly/pom.xml
+++ b/eagle-topology-assembly/pom.xml
@@ -16,8 +16,9 @@
   ~ limitations under the License.
   -->
 
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+         xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.eagle</groupId>
@@ -29,26 +30,31 @@
     <url>http://maven.apache.org</url>
     <packaging>jar</packaging>
     <dependencies>
-      <dependency>
-          <groupId>org.apache.eagle</groupId>
-          <artifactId>eagle-security-hdfs-auditlog</artifactId>
-          <version>${project.version}</version>
-      </dependency>
+        <dependency>
+            <groupId>org.apache.eagle</groupId>
+            <artifactId>eagle-security-hdfs-auditlog</artifactId>
+            <version>${project.version}</version>
+        </dependency>
         <dependency>
             <groupId>org.apache.eagle</groupId>
             <artifactId>eagle-security-hdfs-securitylog</artifactId>
             <version>${project.version}</version>
         </dependency>
-      <dependency>
-          <groupId>org.apache.eagle</groupId>
-          <artifactId>eagle-security-hive</artifactId>
-          <version>${project.version}</version>
-      </dependency>
-      <dependency>
-          <groupId>org.apache.eagle</groupId>
-          <artifactId>eagle-security-userprofile-detection</artifactId>
-          <version>${project.version}</version>
-      </dependency>
+        <dependency>
+            <groupId>org.apache.eagle</groupId>
+            <artifactId>eagle-security-hive</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.eagle</groupId>
+            <artifactId>eagle-security-userprofile-detection</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.eagle</groupId>
+            <artifactId>eagle-security-oozie-auditlog</artifactId>
+            <version>${project.version}</version>
+        </dependency>
         <dependency>
             <groupId>org.apache.eagle</groupId>
             <artifactId>eagle-security-hbase-securitylog</artifactId>
@@ -87,7 +93,7 @@
             <artifactId>eagle-hadoop-metric</artifactId>
             <version>${project.version}</version>
         </dependency>
-	    <dependency>
+        <dependency>
             <groupId>org.apache.eagle</groupId>
             <artifactId>eagle-gc</artifactId>
             <version>${project.version}</version>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-webservice/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-webservice/pom.xml b/eagle-webservice/pom.xml
index c316db2..9d379e7 100644
--- a/eagle-webservice/pom.xml
+++ b/eagle-webservice/pom.xml
@@ -12,7 +12,7 @@
 	under the License. -->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+		 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 	<modelVersion>4.0.0</modelVersion>
 	<parent>
 		<groupId>org.apache.eagle</groupId>
@@ -65,11 +65,11 @@
 			</exclusions>
 		</dependency>
 
-        <dependency>
-            <groupId>org.apache.eagle</groupId>
-            <artifactId>eagle-storage-jdbc</artifactId>
-            <version>${project.version}</version>
-        </dependency>
+		<dependency>
+			<groupId>org.apache.eagle</groupId>
+			<artifactId>eagle-storage-jdbc</artifactId>
+			<version>${project.version}</version>
+		</dependency>
 
 		<!-- jersey needs asm3, so use extcos 0.3b -->
 		<dependency>
@@ -142,6 +142,37 @@
 		</dependency>
 		<dependency>
 			<groupId>org.apache.eagle</groupId>
+			<artifactId>eagle-security-oozie-web</artifactId>
+			<version>${project.version}</version>
+			<exclusions>
+				<exclusion>
+					<groupId>org.ow2.asm</groupId>
+					<artifactId>asm-all</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>asm</groupId>
+					<artifactId>asm</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>asm</groupId>
+					<artifactId>asm-all</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>asm</groupId>
+					<artifactId>asm-commons</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>asm</groupId>
+					<artifactId>asm-tree</artifactId>
+				</exclusion>
+				<exclusion>
+					<artifactId>servlet-api</artifactId>
+					<groupId>javax.servlet</groupId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.eagle</groupId>
 			<artifactId>eagle-security-hdfs-web</artifactId>
 			<version>${project.version}</version>
 		</dependency>
@@ -156,17 +187,17 @@
 			<artifactId>eagle-stream-application-manager</artifactId>
 			<version>${project.version}</version>
 		</dependency> -->
-        <dependency>
-            <groupId>org.apache.eagle</groupId>
-            <artifactId>eagle-topology-assembly</artifactId>
-            <version>${project.version}</version>
+		<dependency>
+			<groupId>org.apache.eagle</groupId>
+			<artifactId>eagle-topology-assembly</artifactId>
+			<version>${project.version}</version>
 			<exclusions>
 				<exclusion>
 					<groupId>org.quartz-scheduler</groupId>
 					<artifactId>quartz</artifactId>
 				</exclusion>
 			</exclusions>
-        </dependency>
+		</dependency>
 
 		<!-- eagle user profile common dependency -->
 		<dependency>
@@ -288,10 +319,10 @@
 		</dependency>
 
 		<dependency>
-		    <groupId>javax.servlet</groupId>
-		    <artifactId>servlet-api</artifactId>
-		    <version>${servlet-api.version}</version>
-		    <scope>provided</scope>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+			<version>${servlet-api.version}</version>
+			<scope>provided</scope>
 		</dependency>
 
 	</dependencies>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-webservice/src/main/webapp/app/public/feature/classification/controller.js
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/app/public/feature/classification/controller.js b/eagle-webservice/src/main/webapp/app/public/feature/classification/controller.js
index b5d3e90..462b41b 100644
--- a/eagle-webservice/src/main/webapp/app/public/feature/classification/controller.js
+++ b/eagle-webservice/src/main/webapp/app/public/feature/classification/controller.js
@@ -85,7 +85,63 @@
 			});
 		};
 	});
-
+     // =============================================================
+    	// =                    Sensitivity - Job                   =
+    	// =============================================================
+    	feature.controller('sensitivityViewJob', function(Site, $scope, $wrapState, Entities) {
+    		$scope.items = [];
+
+    		// Mark sensitivity
+    		$scope._oriItem = {};
+    		$scope._markItem = {};
+
+    		// ======================= View =======================
+    		// Item
+    		$scope.updateItems = function() {
+    			$scope.items = Entities.query($scope.viewConfig.api, {site: Site.current().tags.site});
+    		};
+
+
+    		$scope.updateItems();
+
+    		// =================== Sensitivity ===================
+    		$scope.markSensitivity = function(item) {
+    			$scope._oriItem = item;
+    			$scope._markItem = {
+    				prefix: $scope.viewConfig.prefix,
+    				tags: {
+    					site: Site.current().tags.site
+    				},
+    				sensitivityType: ""
+    			};
+
+    			$scope._markItem.tags[$scope.viewConfig.keys[0]] = item.jobId;
+    			$("#sensitivityMDL").modal();
+    		};
+    		$scope.confirmUpateSensitivity = function() {
+    			$scope._oriItem.sensitiveType = $scope._markItem.sensitivityType;
+    			Entities.updateEntity($scope.viewConfig.service, $scope._markItem, {timestamp: false})._promise.success(function(data) {
+    				Entities.dialog(data);
+    			});
+    			$("#sensitivityMDL").modal('hide');
+    		};
+    		$scope.unmarkSensitivity = function(item) {
+    			$.dialog({
+    				title: "Unmark Confirm",
+    				content: "Do you want to remove the sensitivity mark on '" + item.jobId + "'?",
+    				confirm: true
+    			}, function(ret) {
+    				if(!ret) return;
+
+    				var _cond = {site: Site.current().tags.site};
+    				_cond[$scope.viewConfig.keys[0]] = item.jobId;
+    				Entities.deleteEntities($scope.viewConfig.service, _cond);
+
+    				item.sensitiveType = null;
+    				$scope.$apply();
+    			});
+    		};
+    	});
 	// =============================================================
 	// =                    Sensitivity - Folder                   =
 	// =============================================================

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/eagle-webservice/src/main/webapp/app/public/feature/classification/page/sensitivity/job.html
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/app/public/feature/classification/page/sensitivity/job.html b/eagle-webservice/src/main/webapp/app/public/feature/classification/page/sensitivity/job.html
new file mode 100644
index 0000000..05d70da
--- /dev/null
+++ b/eagle-webservice/src/main/webapp/app/public/feature/classification/page/sensitivity/job.html
@@ -0,0 +1,92 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+<div ng-controller="classification_sensitivityViewJob">
+    <ul class="list-inline path">
+        <li>Oozie CoordinatorJob:</li>
+    </ul>
+
+    <table class="table table-bordered">
+        <thead>
+        <tr>
+            <th width="15%">JobId</th>
+            <th width="10%">AppName</th>
+            <th>Sensitivity Type</th>
+            <th width="10" ng-show="Auth.isRole('ROLE_ADMIN')"> </th>
+        </tr>
+        </thead>
+        <tbody>
+        <tr ng-show="items._promise.$$state.status !== 1">
+            <td colspan="5">
+                <span class="fa fa-refresh fa-spin"> </span>
+                Loading...
+            </td>
+        </tr>
+        <tr ng-show="items._promise.$$state.status === 1 && !items.length">
+            <td colspan="5">
+                <span class="fa fa-exclamation-triangle"> </span>
+                Empty
+            </td>
+        </tr>
+        <tr ng-repeat="item in items" ng-class="{warning : item.sensitiveType}">
+            <td>{{item.jobId}}</td>
+            <td>{{item.name}}</td>
+            <td>{{item.sensitiveType}}</td>
+            <td ng-show="Auth.isRole('ROLE_ADMIN')">
+                <button class="fa fa-eye btn btn-primary btn-xs" ng-click="markSensitivity(item)" ng-show="!item.sensitiveType"
+                        uib-tooltip="Mark as sensitivity data" tooltip-animation="false" tooltip-placement="left"> </button>
+                <button class="fa fa-eye-slash btn btn-warning btn-xs" ng-click="unmarkSensitivity(item)" ng-show="item.sensitiveType"
+                        uib-tooltip="Remove the sensitivity mark" tooltip-animation="false" tooltip-placement="left"> </button>
+            </td>
+        </tr>
+        </tbody>
+    </table>
+
+
+    <!-- Modal: Create / Edit site -->
+    <div class="modal fade" id="sensitivityMDL" tabindex="-1" role="dialog">
+        <div class="modal-dialog" role="document">
+            <div class="modal-content">
+                <div class="modal-header">
+                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
+                        <span aria-hidden="true">&times;</span>
+                    </button>
+                    <h4 class="modal-title">Mark Sensitivity Data</h4>
+                </div>
+                <div class="modal-body">
+                    <div class="form-group">
+                        <label>Resource</label>
+                        <input type="text" readonly="readonly" class="form-control" ng-model="_markItem.tags.oozieResource" />
+                    </div>
+                    <div class="form-group">
+                        <label>* Sensitivity Type</label>
+                        <input type="text" class="form-control" ng-model="_markItem.sensitivityType" id="sensitiveType" />
+                    </div>
+                </div>
+                <div class="modal-footer">
+                    <button type="button" class="btn btn-default" data-dismiss="modal">
+                        Close
+                    </button>
+                    <button type="button" class="btn btn-primary" ng-click="confirmUpateSensitivity()" ng-disabled="!_markItem.sensitivityType">
+                        Update
+                    </button>
+                </div>
+            </div>
+        </div>
+    </div>
+
+</div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fd39e6e1/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f17e082..49c2971 100755
--- a/pom.xml
+++ b/pom.xml
@@ -179,6 +179,7 @@
 
         <!-- Common Versions -->
         <commons-cli.version>1.2</commons-cli.version>
+        <commons-xml.version>1.4.01</commons-xml.version>
         <commons-lang.version>2.6</commons-lang.version>
         <commons-lang3.version>3.3.2</commons-lang3.version>
         <commons-math3.version>3.5</commons-math3.version>
@@ -287,6 +288,11 @@
                 <version>${commons-cli.version}</version>
             </dependency>
             <dependency>
+                <groupId>xml-apis</groupId>
+                <artifactId>xml-apis</artifactId>
+                <version>${commons-xml.version}</version>
+            </dependency>
+            <dependency>
                 <groupId>commons-lang</groupId>
                 <artifactId>commons-lang</artifactId>
                 <version>${commons-lang.version}</version>



[04/47] incubator-eagle git commit: EAGLE-271 Topology management in remote/local mode including start/stop operations

Posted by mw...@apache.org.
EAGLE-271 Topology management in remote/local mode including start/stop operations

https://issues.apache.org/jira/browse/EAGLE-272
https://issues.apache.org/jira/browse/EAGLE-271
https://issues.apache.org/jira/browse/EAGLE-238

Author: Qingwen Zhao, Jilin Jiang
Reviewer: Ralph Su
Closes #160


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/ecf75b28
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/ecf75b28
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/ecf75b28

Branch: refs/heads/master
Commit: ecf75b280ba63733b285ee18925f0489f69601f0
Parents: 99b2575
Author: Zhao, Qingwen <qi...@ebay.com>
Authored: Mon Apr 25 11:57:47 2016 +0800
Committer: Zhao, Qingwen <qi...@ebay.com>
Committed: Mon Apr 25 11:57:47 2016 +0800

----------------------------------------------------------------------
 eagle-assembly/src/assembly/eagle-bin.xml       |   6 +-
 eagle-assembly/src/main/bin/eagle-service.sh    |   7 +
 .../src/main/bin/eagle-topology-init.sh         |   7 +-
 .../src/main/conf/eagle-scheduler.conf          |  41 +++
 eagle-assembly/src/main/conf/eagle-service.conf |  26 +-
 .../sandbox-hbaseSecurityLog-application.conf   |   2 +-
 .../service/alert/SiteApplicationObject.java    |  62 +++++
 .../service/alert/SiteApplicationResource.java  | 189 ++++++++++++++
 .../alert/resolver/SiteApplicationObject.java   |  62 -----
 .../alert/resolver/SiteApplicationResource.java | 189 --------------
 .../eagle-application-service/pom.xml           |  56 ++++
 .../application/AppManagerConstants.java        |  42 +++
 .../ApplicationManagementResource.java          | 101 ++++++++
 .../application/dao/ApplicationManagerDAO.java  |  32 +++
 .../dao/ApplicationManagerDaoImpl.java          |  77 ++++++
 .../entity/ApplicationEntityRepo.java           |  30 +++
 .../entity/TopologyDescriptionEntity.java       | 104 ++++++++
 .../entity/TopologyExecutionEntity.java         | 132 ++++++++++
 .../entity/TopologyExecutionStatus.java         |  38 +++
 .../entity/TopologyOperationEntity.java         | 105 ++++++++
 .../eagle-stream-application-manager/pom.xml    | 144 +++++++++++
 .../stream/application/TopologyException.java   |  26 ++
 .../stream/application/TopologyExecutable.java  |  27 ++
 .../stream/application/TopologyFactory.java     |  55 ++++
 .../AbstractDynamicApplication.scala            |  32 +++
 .../stream/application/ApplicationManager.scala | 126 +++++++++
 .../application/ApplicationManagerUtils.scala   |  38 +++
 .../ApplicationSchedulerAsyncDAO.scala          | 179 +++++++++++++
 .../stream/application/ExecutionPlatform.scala  |  30 +++
 .../application/ExecutionPlatformFactory.scala  |  49 ++++
 .../eagle/stream/application/TaskExecutor.scala |  41 +++
 .../application/impl/StormDynamicTopology.scala |  44 ++++
 .../impl/StormExecutionPlatform.scala           | 197 ++++++++++++++
 .../scheduler/AppCommandExecutor.scala          | 170 +++++++++++++
 .../scheduler/AppCommandLoader.scala            |  78 ++++++
 .../scheduler/ApplicationScheduler.scala        |  81 ++++++
 .../scheduler/StreamAppCoordinator.scala        |  54 ++++
 .../src/test/resources/application.conf         |  42 +++
 .../src/test/resources/log4j.properties         |  35 +++
 .../application/scheduler/MockTopology.scala    |  30 +++
 .../scheduler/StormApplicationManagerSpec.scala |  40 +++
 .../application/scheduler/TestScheduler.scala   |  61 +++++
 eagle-core/eagle-application-management/pom.xml |  40 +++
 .../eagle/stream/pipeline/parser/Pipeline.scala |   6 +
 .../storm/StormTopologyExecutorImpl.scala       |  14 +-
 .../apache/eagle/policy/common/Constants.java   |   4 +
 .../common/config/EagleConfigConstants.java     |   3 +
 .../eagle/storage/operation/CompiledQuery.java  |  21 +-
 .../criteria/impl/QueryCriteriaBuilder.java     |   2 +-
 .../schema/JdbcEntityDefinitionManager.java     |   2 +-
 eagle-core/pom.xml                              |   1 +
 eagle-docs/images/appManager/admin-page.png     | Bin 0 -> 208534 bytes
 .../images/appManager/start-topology-1.png      | Bin 0 -> 212648 bytes
 .../images/appManager/start-topology-2.png      | Bin 0 -> 235826 bytes
 .../images/appManager/stop-topology-1.png       | Bin 0 -> 238503 bytes
 .../images/appManager/stop-topology-2.png       | Bin 0 -> 238064 bytes
 .../images/appManager/stop-topology-3.png       | Bin 0 -> 236337 bytes
 .../appManager/topology-configuration-1.png     | Bin 0 -> 241252 bytes
 .../appManager/topology-configuration-2.png     | Bin 0 -> 288253 bytes
 .../appManager/topology-configuration-save.png  | Bin 0 -> 243119 bytes
 .../images/appManager/topology-description.png  | Bin 0 -> 218471 bytes
 .../images/appManager/topology-execution.png    | Bin 0 -> 219798 bytes
 .../images/appManager/topology-monitor.png      | Bin 0 -> 197752 bytes
 .../tutorial/application_manager_tutorial.md    | 109 ++++++++
 .../tutorial/getting_started_with_eagle.md      |   2 -
 eagle-hadoop-metric/pom.xml                     |   5 +
 .../HadoopJmxMetricMonitoringTopology.java      |  37 +++
 .../src/main/resources/hadoop-metric-init.sh    |   2 +-
 .../resolver/MetadataAccessConfigRepo.java      |  15 +-
 .../AbstractResourceSensitivityPollingJob.java  |   2 +-
 .../eagle/security/util/ExternalDataJoiner.java |   8 +-
 .../audit/TestMetaDataAccessConfigRepo.java     |  37 ++-
 .../eagle-security-hbase-securitylog/pom.xml    |   5 +
 .../hbase/HbaseAuditLogMonitoringTopology.java  |  42 +++
 .../parse/HbaseAuditLogKafkaDeserializer.java   |  29 +--
 .../hbase/parse/HbaseAuditLogParser.java        | 144 ++++-------
 .../src/main/resources/log4j.properties         |  21 ++
 .../hbase/TestHbaseAuditLogProcessTopology.java |  44 ++++
 .../src/test/resources/application.conf         |  66 +++++
 .../src/test/resources/log4j.properties         |  35 +++
 .../eagle-security-hdfs-auditlog/pom.xml        |   5 +
 .../HdfsAuditLogMonitoringTopology.java         |  40 +++
 .../timer/FileSensitivityPollingJob.java        |   2 +-
 .../auditlog/timer/IPZonePollingJob.java        |   2 +-
 eagle-security/eagle-security-hive/pom.xml      |   7 +-
 .../hive/HiveJobRunningMonitoringTopology.java  |  48 ++++
 ...HiveJobRunningSourcedStormSpoutProvider.java |   9 +-
 .../HiveResourceSensitivityPollingJob.java      |   2 +-
 eagle-topology-assembly/pom.xml                 |   4 +-
 .../src/assembly/eagle-topology-assembly.xml    |   4 +-
 eagle-webservice/pom.xml                        |  19 +-
 .../profile/ApplicationSchedulerListener.java   |  59 +++++
 .../profile/EagleServiceProfileInitializer.java |   3 +
 .../src/main/resources/application-derby.conf   |  30 +++
 .../src/main/resources/application.conf         |  24 +-
 .../src/main/resources/eagle-scheduler.conf     |  41 +++
 .../src/main/webapp/WEB-INF/web.xml             |   6 +
 .../src/main/webapp/app/public/css/main.css     |   8 +
 .../app/public/feature/metrics/controller.js    |   2 +-
 .../app/public/feature/topology/controller.js   | 255 +++++++++++++++++++
 .../feature/topology/page/management.html       |  52 ++++
 .../feature/topology/page/monitoring.html       | 151 +++++++++++
 .../src/main/webapp/app/public/js/app.config.js |  12 +-
 .../src/main/webapp/app/public/js/common.js     |  49 +++-
 .../public/js/ctrl/configurationController.js   |   6 +-
 .../webapp/app/public/js/srv/entitiesSrv.js     |  30 +--
 .../main/webapp/app/public/js/srv/siteSrv.js    |   2 +-
 .../src/main/webapp/app/public/js/srv/uiSrv.js  |  24 +-
 mkdocs.yml                                      |   1 +
 109 files changed, 4008 insertions(+), 472 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-assembly/src/assembly/eagle-bin.xml
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/assembly/eagle-bin.xml b/eagle-assembly/src/assembly/eagle-bin.xml
index 336dcef..c4a8e10 100644
--- a/eagle-assembly/src/assembly/eagle-bin.xml
+++ b/eagle-assembly/src/assembly/eagle-bin.xml
@@ -172,9 +172,9 @@
                 <exclude>WEB-INF/classes/config.properties</exclude>
                 <exclude>WEB-INF/lib/servlet-api-*.jar</exclude>
                 <exclude>WEB-INF/lib/jsp-api-*.jar</exclude>
-                <exclude>WEB-INF/lib/storm-*.jar</exclude>
-                <exclude>WEB-INF/lib/kafka_*.jar</exclude>
-                <exclude>WEB-INF/lib/kafka-*.jar</exclude>
+                <!--<exclude>WEB-INF/lib/storm-*.jar</exclude> -->
+                <!--<exclude>WEB-INF/lib/kafka_*.jar</exclude> -->
+                <exclude>WEB-INF/lib/slf4j-log4j12-*.jar</exclude>
                 <exclude>WEB-INF/lib/*-tests.jar</exclude>
                 <exclude>WEB-INF/lib/hadoop-mapreduce-*.jar</exclude>
                 <exclude>WEB-INF/lib/hadoop-minicluster-*.jar</exclude>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-assembly/src/main/bin/eagle-service.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/eagle-service.sh b/eagle-assembly/src/main/bin/eagle-service.sh
index d104f73..844a079 100755
--- a/eagle-assembly/src/main/bin/eagle-service.sh
+++ b/eagle-assembly/src/main/bin/eagle-service.sh
@@ -34,6 +34,7 @@ export CATALINA_LOGDIR=$EAGLE_HOME/logs
 export CATALINA_TMPDIR=$EAGLE_HOME/temp
 export CATALINA_OUT=$CATALINA_LOGDIR/eagle-service.out
 export CATALINA_PID=$CATALINA_TMPDIR/service.pid
+export JAVA_OPTS="-Xmx3072m -XX:MaxPermSize=1024m"
 
 # CLASSPATH
 export CLASSPATH=$CLASSPATH:$EAGLE_HOME/conf
@@ -51,6 +52,7 @@ fi
 
 EAGLE_SERVICE_CONF="eagle-service.conf"
 EAGLE_LDAP_CONF="ldap.properties"
+EAGLE_SCHEDULER_CONF="eagle-scheduler.conf"
 
 # Always copy conf/eagle-service.properties to lib/tomcat/webapps/eagle-service/WEB-INF/classes/application.conf before starting
 if [ ! -e ${EAGLE_HOME}/conf/${EAGLE_SERVICE_CONF} ]
@@ -64,6 +66,11 @@ if [ -e ${EAGLE_HOME}/conf/${EAGLE_LDAP_CONF} ]
 then
 	cp -f $EAGLE_HOME/conf/$EAGLE_LDAP_CONF ${EAGLE_HOME}/lib/tomcat/webapps/eagle-service/WEB-INF/classes/
 fi
+if [ -e ${EAGLE_HOME}/conf/${EAGLE_SCHEDULER_CONF} ]
+then
+	cp -f $EAGLE_HOME/conf/$EAGLE_SCHEDULER_CONF ${EAGLE_HOME}/lib/tomcat/webapps/eagle-service/WEB-INF/classes/
+fi
+
 
 case $1 in
 "start")

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-assembly/src/main/bin/eagle-topology-init.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/eagle-topology-init.sh b/eagle-assembly/src/main/bin/eagle-topology-init.sh
index 6fd7ac9..9d296fc 100755
--- a/eagle-assembly/src/main/bin/eagle-topology-init.sh
+++ b/eagle-assembly/src/main/bin/eagle-topology-init.sh
@@ -33,11 +33,12 @@ curl -silent -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Conten
 
 echo ""
 echo "Importing applications for sample site ..."
-curl -silent -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=SiteApplicationService" -d '[{"prefix":"eagleSiteApplication","tags":{"site" : "sandbox", "application":"hdfsAuditLog"}, "enabled": true, "config" : "web.fs.defaultFS: \"hdfs://sandbox.hortonworks.com:8020\""}]'
 
-curl -silent -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=SiteApplicationService" -d '[{"prefix":"eagleSiteApplication","tags":{"site" : "sandbox", "application":"hbaseSecurityLog"}, "enabled": true, "config" : "web.hbase.zookeeper.property.clientPort: \"2181\", web.hbase.zookeeper.quorum: \"localhost\""}]'
+curl -silent -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=SiteApplicationService" -d '[{"prefix":"eagleSiteApplication","tags":{"site" : "sandbox", "application":"hdfsAuditLog"}, "enabled": true, "config" : "classification.fs.defaultFS=hdfs://sandbox.hortonworks.com:8020"}]'
 
-curl -silent -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=SiteApplicationService" -d '[{"prefix":"eagleSiteApplication","tags":{"site" : "sandbox", "application":"hiveQueryLog"}, "enabled": true, "config":"web.accessType:\"metastoredb_jdbc\",web.password:\"hive\",web.user:\"hive\",web.jdbcDriverClassName:\"com.mysql.jdbc.Driver\",web.jdbcUrl:\"jdbc:mysql://sandbox.hortonworks.com/hive?createDatabaseIfNotExist=true\""}]'
+curl -silent -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=SiteApplicationService" -d '[{"prefix":"eagleSiteApplication","tags":{"site" : "sandbox", "application":"hbaseSecurityLog"}, "enabled": true, "config" : "classification.hbase.zookeeper.property.clientPort=2181\nclassification.hbase.zookeeper.quorum=localhost"}]'
+
+curl -silent -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=SiteApplicationService" -d '[{"prefix":"eagleSiteApplication","tags":{"site" : "sandbox", "application":"hiveQueryLog"}, "enabled": true, "config":"classification.accessType=metastoredb_jdbc\nclassification.password=hive\nclassification.user=hive\nclassification.jdbcDriverClassName=com.mysql.jdbc.Driver\nclassification.jdbcUrl=jdbc:mysql://sandbox.hortonworks.com/hive?createDatabaseIfNotExist=true"}]'
 
 echo ""
 echo "Importing application definitions ..."

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-assembly/src/main/conf/eagle-scheduler.conf
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/conf/eagle-scheduler.conf b/eagle-assembly/src/main/conf/eagle-scheduler.conf
new file mode 100644
index 0000000..aaab131
--- /dev/null
+++ b/eagle-assembly/src/main/conf/eagle-scheduler.conf
@@ -0,0 +1,41 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+### scheduler propertise
+appCommandLoaderIntervalSecs = 1
+appHealthCheckIntervalSecs = 5
+
+### execution platform properties
+envContextConfig.env = "storm"
+envContextConfig.url = "http://sandbox.hortonworks.com:8744"
+envContextConfig.nimbusHost = "sandbox.hortonworks.com"
+envContextConfig.nimbusThriftPort = 6627
+envContextConfig.jarFile = "/dir-to-jar/eagle-topology-0.3.0-incubating-assembly.jar"
+
+### default topology properties
+eagleProps.mailHost = "mailHost.com"
+eagleProps.mailSmtpPort = "25"
+eagleProps.mailDebug = "true"
+eagleProps.eagleService.host = "localhost"
+eagleProps.eagleService.port = 9099
+eagleProps.eagleService.username = "admin"
+eagleProps.eagleService.password = "secret"
+eagleProps.dataJoinPollIntervalSec = 30
+
+dynamicConfigSource.enabled = true
+dynamicConfigSource.initDelayMillis = 0
+dynamicConfigSource.delayMillis = 30000
+

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-assembly/src/main/conf/eagle-service.conf
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/conf/eagle-service.conf b/eagle-assembly/src/main/conf/eagle-service.conf
index 59e970f..49e40ee 100644
--- a/eagle-assembly/src/main/conf/eagle-service.conf
+++ b/eagle-assembly/src/main/conf/eagle-service.conf
@@ -13,16 +13,18 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-eagle {
-	service {
-		storage-type="jdbc"
-		storage-adapter="derby"
-		storage-username="eagle"
-		storage-password=eagle
-		storage-database=eagle
-		storage-connection-url="jdbc:derby:/tmp/eagle-db-local;create=true"
-		storage-connection-props="encoding=UTF-8"
-		storage-driver-class="org.apache.derby.jdbc.EmbeddedDriver"
-		storage-connection-max=8
+
+eagle{
+	service{
+		storage-type="hbase"
+		hbase-zookeeper-quorum="sandbox.hortonworks.com"
+		hbase-zookeeper-property-clientPort=2181
+		zookeeper-znode-parent="/hbase-unsecure",
+		springActiveProfile="sandbox"
+		audit-enabled=true
 	}
-}
\ No newline at end of file
+}
+
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-assembly/src/main/conf/sandbox-hbaseSecurityLog-application.conf
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/conf/sandbox-hbaseSecurityLog-application.conf b/eagle-assembly/src/main/conf/sandbox-hbaseSecurityLog-application.conf
index 58468ea..875bb0b 100644
--- a/eagle-assembly/src/main/conf/sandbox-hbaseSecurityLog-application.conf
+++ b/eagle-assembly/src/main/conf/sandbox-hbaseSecurityLog-application.conf
@@ -28,7 +28,7 @@
     "topic" : "sandbox_hbase_security_log",
     "zkConnection" : "127.0.0.1:2181",
     "zkConnectionTimeoutMS" : 15000,
-    "consumerGroupId" : "EagleConsumer",
+    "brokerZkPath" : "/brokers",
     "fetchSize" : 1048586,
     "deserializerClass" : "org.apache.eagle.security.hbase.parse.HbaseAuditLogKafkaDeserializer",
     "transactionZKServers" : "127.0.0.1",

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/SiteApplicationObject.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/SiteApplicationObject.java b/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/SiteApplicationObject.java
new file mode 100644
index 0000000..41ece1d
--- /dev/null
+++ b/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/SiteApplicationObject.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.service.alert;
+
+
+import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
+import org.apache.eagle.alert.entity.SiteApplicationServiceEntity;
+
+import java.util.List;
+import java.util.Map;
+
+public class SiteApplicationObject extends TaggedLogAPIEntity {
+
+    public Boolean getEnabled() {
+        return enabled;
+    }
+
+    public void setEnabled(Boolean enabled) {
+        this.enabled = enabled;
+        valueChanged("enabled");
+    }
+
+    public List<SiteApplicationServiceEntity> getApplications() {
+        return applications;
+    }
+
+    public void setApplications(List<SiteApplicationServiceEntity> applications) {
+        this.applications = applications;
+        valueChanged("applicationList");
+    }
+
+    @Override
+    public Map<String, String> getTags() {
+        return tags;
+    }
+
+    @Override
+    public void setTags(Map<String, String> tags) {
+        this.tags = tags;
+        valueChanged("tags");
+    }
+
+    Map<String, String> tags;
+    Boolean enabled;
+    List<SiteApplicationServiceEntity> applications;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/SiteApplicationResource.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/SiteApplicationResource.java b/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/SiteApplicationResource.java
new file mode 100644
index 0000000..e399189
--- /dev/null
+++ b/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/SiteApplicationResource.java
@@ -0,0 +1,189 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.service.alert;
+
+import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
+import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
+import org.apache.eagle.policy.common.Constants;
+import org.apache.eagle.alert.entity.SiteDescServiceEntity;
+import org.apache.eagle.service.generic.GenericEntityServiceResource;
+import org.apache.eagle.alert.entity.ApplicationDescServiceEntity;
+import org.apache.eagle.alert.entity.SiteApplicationServiceEntity;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.map.type.TypeFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.ws.rs.*;
+import javax.ws.rs.core.MediaType;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.*;
+
+@Path(SiteApplicationResource.ROOT_PATH)
+public class SiteApplicationResource {
+    private final static Logger LOG = LoggerFactory.getLogger(SiteApplicationResource.class);
+    private final static GenericEntityServiceResource resource = new GenericEntityServiceResource();
+    public final static String ROOT_PATH = "/module";
+
+    @Path("site")
+    @DELETE
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    public GenericServiceAPIResponseEntity deleteSite(@QueryParam("site") String site) {
+        String siteQuery = Constants.SITE_DESCRIPTION_SERVICE_ENDPOINT_NAME+ "[@site=\"" + site + "\"]{*}";
+        String siteApplicationQuery = Constants.SITE_APPLICATION_SERVICE_ENDPOINT_NAME + "[@site=\"" + site + "\"]{*}";
+        int pageSize = Integer.MAX_VALUE;
+
+        GenericServiceAPIResponseEntity response = resource.deleteByQuery(siteQuery, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
+        if(response.isSuccess()) {
+            response = resource.deleteByQuery(siteApplicationQuery, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
+            if(!response.isSuccess()) {
+                LOG.error(response.getException());
+            }
+        } else {
+            LOG.error(response.getException());
+        }
+        return response;
+    }
+
+    @Path("application")
+    @DELETE
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    public GenericServiceAPIResponseEntity deleteApplication(@QueryParam("application") String application) {
+        String applicationQuery = Constants.APPLICATION_DESCRIPTION_SERVICE_ENDPOINT_NAME+ "[@application=\"" + application + "\"]{*}";
+        String siteApplicationQuery = Constants.SITE_APPLICATION_SERVICE_ENDPOINT_NAME + "[@application=\"" + application + "\"]{*}";
+        int pageSize = Integer.MAX_VALUE;
+
+        GenericServiceAPIResponseEntity response = resource.deleteByQuery(applicationQuery, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
+        if(response.isSuccess()) {
+            response = resource.deleteByQuery(siteApplicationQuery, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
+            if(!response.isSuccess()) {
+                LOG.error(response.getException());
+            }
+        } else {
+            LOG.error(response.getException());
+        }
+        return response;
+    }
+
+    @Path("feature")
+    @DELETE
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    public GenericServiceAPIResponseEntity deleteFeature(@QueryParam("feature") String feature) {
+        String featureQuery = Constants.FEATURE_DESCRIPTION_SERVICE_ENDPOINT_NAME+ "[@feature=\"" + feature + "\"]{*}";
+        String applicationQuery = Constants.APPLICATION_DESCRIPTION_SERVICE_ENDPOINT_NAME + "[]{*}";
+        int pageSize = Integer.MAX_VALUE;
+
+        GenericServiceAPIResponseEntity response = resource.deleteByQuery(featureQuery, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
+        if(response.isSuccess()) {
+            response = resource.search(applicationQuery, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
+            if(response.isSuccess()) {
+                List<ApplicationDescServiceEntity> entityList = response.getObj();
+                Boolean isModified = false;
+                for(ApplicationDescServiceEntity entity : entityList) {
+                    if(entity.getFeatures().contains(feature)) {
+                        List<String> features = entity.getFeatures();
+                        features.remove(feature);
+                        entity.setFeatures(features);
+                        isModified = true;
+                    }
+                }
+                if(isModified) {
+                    response = resource.updateEntities(entityList, Constants.APPLICATION_DESCRIPTION_SERVICE_ENDPOINT_NAME);
+                }
+            }
+        }
+        if(!response.isSuccess()) {
+            LOG.error(response.getException());
+        }
+        return response;
+    }
+
+    @Path("siteApplication")
+    @POST
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    public GenericServiceAPIResponseEntity createSiteApplications(InputStream inputStream) {
+        GenericServiceAPIResponseEntity response = new GenericServiceAPIResponseEntity<>();
+        int pageSize = Integer.MAX_VALUE;
+        try {
+            List<SiteApplicationObject> entities = (List<SiteApplicationObject>) unmarshalSiteApplicationEntities(inputStream);
+            if(entities == null) {
+                throw new IllegalArgumentException("cannot convert to SiteApplicationObject");
+            }
+            List<SiteDescServiceEntity> siteEntities = new LinkedList<>();
+            List<SiteApplicationServiceEntity> applicationEntities = new LinkedList<>();
+            Set<String> sites = new HashSet<>();
+            for(SiteApplicationObject e : entities) {
+                sites.add(e.getTags().get("site"));
+                SiteDescServiceEntity entity = new SiteDescServiceEntity();
+                entity.setEnabled(e.getEnabled());
+                entity.setTags(e.getTags());
+                siteEntities.add(entity);
+                applicationEntities.addAll(e.getApplications());
+            }
+            response = resource.updateEntities(siteEntities, Constants.SITE_DESCRIPTION_SERVICE_ENDPOINT_NAME);
+            if(response.isSuccess()) {
+                String query = buildQueryWithAttributeList(Constants.SITE_APPLICATION_SERVICE_ENDPOINT_NAME, "site", sites);
+                LOG.info("query=" + query);
+                response = resource.search(query, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
+                if(response.isSuccess()) {
+                    List<SiteApplicationServiceEntity> applications = response.getObj();
+                    for(SiteApplicationServiceEntity app : applications) {
+                        app.setEnabled(false);
+                    }
+                    response = resource.updateEntities(applications, Constants.SITE_APPLICATION_SERVICE_ENDPOINT_NAME);
+                    if(response.isSuccess()) {
+                        response = resource.updateEntities(applicationEntities, Constants.SITE_APPLICATION_SERVICE_ENDPOINT_NAME);
+                    }
+                }
+            }
+            if(!response.isSuccess()) {
+                LOG.error(response.getException());
+            }
+        } catch (Exception ex) {
+            LOG.error(ex.getMessage(), ex);
+            response.setException(ex);
+        }
+        return response;
+    }
+
+    private String buildQueryWithAttributeList(String serviceName, String attr, Set<String> sets) {
+        StringBuilder builder = new StringBuilder(serviceName + "[");
+        String attribute = "@" + attr + "=";
+        String condition = " OR ";
+        for(String s : sets) {
+            String value = String.format("\"%s\"", s);
+            builder.append(attribute + value);
+            builder.append(condition);
+        }
+        String result = builder.substring(0, builder.length()-condition.length());
+        result = result + "]{*}";
+        return result;
+    }
+
+    private List<? extends TaggedLogAPIEntity> unmarshalSiteApplicationEntities(InputStream inputStream) throws IllegalAccessException, InstantiationException, IOException {
+        ObjectMapper objectMapper = new ObjectMapper();
+        return objectMapper.readValue(inputStream, TypeFactory.defaultInstance().constructCollectionType(LinkedList.class, SiteApplicationObject.class));
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/SiteApplicationObject.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/SiteApplicationObject.java b/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/SiteApplicationObject.java
deleted file mode 100644
index 42f95f7..0000000
--- a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/SiteApplicationObject.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-
-package org.apache.eagle.service.alert.resolver;
-
-
-import org.apache.eagle.alert.entity.SiteApplicationServiceEntity;
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-
-import java.util.List;
-import java.util.Map;
-
-public class SiteApplicationObject extends TaggedLogAPIEntity {
-
-    public Boolean getEnabled() {
-        return enabled;
-    }
-
-    public void setEnabled(Boolean enabled) {
-        this.enabled = enabled;
-        valueChanged("enabled");
-    }
-
-    public List<SiteApplicationServiceEntity> getApplications() {
-        return applications;
-    }
-
-    public void setApplications(List<SiteApplicationServiceEntity> applications) {
-        this.applications = applications;
-        valueChanged("applicationList");
-    }
-
-    @Override
-    public Map<String, String> getTags() {
-        return tags;
-    }
-
-    @Override
-    public void setTags(Map<String, String> tags) {
-        this.tags = tags;
-        valueChanged("tags");
-    }
-
-    Map<String, String> tags;
-    Boolean enabled;
-    List<SiteApplicationServiceEntity> applications;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/SiteApplicationResource.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/SiteApplicationResource.java b/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/SiteApplicationResource.java
deleted file mode 100644
index 903a220..0000000
--- a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/SiteApplicationResource.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-
-package org.apache.eagle.service.alert.resolver;
-
-import org.apache.eagle.alert.entity.ApplicationDescServiceEntity;
-import org.apache.eagle.alert.entity.SiteApplicationServiceEntity;
-import org.apache.eagle.alert.entity.SiteDescServiceEntity;
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.service.generic.GenericEntityServiceResource;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.type.TypeFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.ws.rs.*;
-import javax.ws.rs.core.MediaType;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-
-@Path(SiteApplicationResource.ROOT_PATH)
-public class SiteApplicationResource {
-    private final static Logger LOG = LoggerFactory.getLogger(SiteApplicationResource.class);
-    private final static GenericEntityServiceResource resource = new GenericEntityServiceResource();
-    public final static String ROOT_PATH = "/module";
-
-    @Path("site")
-    @DELETE
-    @Consumes(MediaType.APPLICATION_JSON)
-    @Produces(MediaType.APPLICATION_JSON)
-    public GenericServiceAPIResponseEntity deleteSite(@QueryParam("site") String site) {
-        String siteQuery = Constants.SITE_DESCRIPTION_SERVICE_ENDPOINT_NAME+ "[@site=\"" + site + "\"]{*}";
-        String siteApplicationQuery = Constants.SITE_APPLICATION_SERVICE_ENDPOINT_NAME + "[@site=\"" + site + "\"]{*}";
-        int pageSize = Integer.MAX_VALUE;
-
-        GenericServiceAPIResponseEntity response = resource.deleteByQuery(siteQuery, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
-        if(response.isSuccess()) {
-            response = resource.deleteByQuery(siteApplicationQuery, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
-            if(!response.isSuccess()) {
-                LOG.error(response.getException());
-            }
-        } else {
-            LOG.error(response.getException());
-        }
-        return response;
-    }
-
-    @Path("application")
-    @DELETE
-    @Consumes(MediaType.APPLICATION_JSON)
-    @Produces(MediaType.APPLICATION_JSON)
-    public GenericServiceAPIResponseEntity deleteApplication(@QueryParam("application") String application) {
-        String applicationQuery = Constants.APPLICATION_DESCRIPTION_SERVICE_ENDPOINT_NAME+ "[@application=\"" + application + "\"]{*}";
-        String siteApplicationQuery = Constants.SITE_APPLICATION_SERVICE_ENDPOINT_NAME + "[@application=\"" + application + "\"]{*}";
-        int pageSize = Integer.MAX_VALUE;
-
-        GenericServiceAPIResponseEntity response = resource.deleteByQuery(applicationQuery, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
-        if(response.isSuccess()) {
-            response = resource.deleteByQuery(siteApplicationQuery, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
-            if(!response.isSuccess()) {
-                LOG.error(response.getException());
-            }
-        } else {
-            LOG.error(response.getException());
-        }
-        return response;
-    }
-
-    @Path("feature")
-    @DELETE
-    @Consumes(MediaType.APPLICATION_JSON)
-    @Produces(MediaType.APPLICATION_JSON)
-    public GenericServiceAPIResponseEntity deleteFeature(@QueryParam("feature") String feature) {
-        String featureQuery = Constants.FEATURE_DESCRIPTION_SERVICE_ENDPOINT_NAME+ "[@feature=\"" + feature + "\"]{*}";
-        String applicationQuery = Constants.APPLICATION_DESCRIPTION_SERVICE_ENDPOINT_NAME + "[]{*}";
-        int pageSize = Integer.MAX_VALUE;
-
-        GenericServiceAPIResponseEntity response = resource.deleteByQuery(featureQuery, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
-        if(response.isSuccess()) {
-            response = resource.search(applicationQuery, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
-            if(response.isSuccess()) {
-                List<ApplicationDescServiceEntity> entityList = response.getObj();
-                Boolean isModified = false;
-                for(ApplicationDescServiceEntity entity : entityList) {
-                    if(entity.getFeatures().contains(feature)) {
-                        List<String> features = entity.getFeatures();
-                        features.remove(feature);
-                        entity.setFeatures(features);
-                        isModified = true;
-                    }
-                }
-                if(isModified) {
-                    response = resource.updateEntities(entityList, Constants.APPLICATION_DESCRIPTION_SERVICE_ENDPOINT_NAME);
-                }
-            }
-        }
-        if(!response.isSuccess()) {
-            LOG.error(response.getException());
-        }
-        return response;
-    }
-
-    @Path("siteApplication")
-    @POST
-    @Consumes(MediaType.APPLICATION_JSON)
-    @Produces(MediaType.APPLICATION_JSON)
-    public GenericServiceAPIResponseEntity createSiteApplications(InputStream inputStream) {
-        GenericServiceAPIResponseEntity response = new GenericServiceAPIResponseEntity<>();
-        int pageSize = Integer.MAX_VALUE;
-        try {
-            List<SiteApplicationObject> entities = (List<SiteApplicationObject>) unmarshalSiteApplicationEntities(inputStream);
-            if(entities == null) {
-                throw new IllegalArgumentException("cannot convert to SiteApplicationObject");
-            }
-            List<SiteDescServiceEntity> siteEntities = new LinkedList<>();
-            List<SiteApplicationServiceEntity> applicationEntities = new LinkedList<>();
-            Set<String> sites = new HashSet<>();
-            for(SiteApplicationObject e : entities) {
-                sites.add(e.getTags().get("site"));
-                SiteDescServiceEntity entity = new SiteDescServiceEntity();
-                entity.setEnabled(e.getEnabled());
-                entity.setTags(e.getTags());
-                siteEntities.add(entity);
-                applicationEntities.addAll(e.getApplications());
-            }
-            response = resource.updateEntities(siteEntities, Constants.SITE_DESCRIPTION_SERVICE_ENDPOINT_NAME);
-            if(response.isSuccess()) {
-                String query = buildQueryWithAttributeList(Constants.SITE_APPLICATION_SERVICE_ENDPOINT_NAME, "site", sites);
-                LOG.info("query=" + query);
-                response = resource.search(query, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
-                if(response.isSuccess()) {
-                    List<SiteApplicationServiceEntity> applications = response.getObj();
-                    for(SiteApplicationServiceEntity app : applications) {
-                        app.setEnabled(false);
-                    }
-                    response = resource.updateEntities(applications, Constants.SITE_APPLICATION_SERVICE_ENDPOINT_NAME);
-                    if(response.isSuccess()) {
-                        response = resource.updateEntities(applicationEntities, Constants.SITE_APPLICATION_SERVICE_ENDPOINT_NAME);
-                    }
-                }
-            }
-            if(!response.isSuccess()) {
-                LOG.error(response.getException());
-            }
-        } catch (Exception ex) {
-            LOG.error(ex.getMessage(), ex);
-            response.setException(ex);
-        }
-        return response;
-    }
-
-    private String buildQueryWithAttributeList(String serviceName, String attr, Set<String> sets) {
-        StringBuilder builder = new StringBuilder(serviceName + "[");
-        String attribute = "@" + attr + "=";
-        String condition = " OR ";
-        for(String s : sets) {
-            String value = String.format("\"%s\"", s);
-            builder.append(attribute + value);
-            builder.append(condition);
-        }
-        String result = builder.substring(0, builder.length()-condition.length());
-        result = result + "]{*}";
-        return result;
-    }
-
-    private List<? extends TaggedLogAPIEntity> unmarshalSiteApplicationEntities(InputStream inputStream) throws IllegalAccessException, InstantiationException, IOException {
-        ObjectMapper objectMapper = new ObjectMapper();
-        return objectMapper.readValue(inputStream, TypeFactory.defaultInstance().constructCollectionType(LinkedList.class, SiteApplicationObject.class));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-application-service/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-application-service/pom.xml b/eagle-core/eagle-application-management/eagle-application-service/pom.xml
new file mode 100644
index 0000000..ade47d7
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-application-service/pom.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>eagle-application-management</artifactId>
+        <groupId>org.apache.eagle</groupId>
+        <version>0.3.0-incubating</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>eagle-application-service</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.eagle</groupId>
+            <artifactId>eagle-policy-base</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.eagle</groupId>
+            <artifactId>eagle-service-base</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <skipTests>true</skipTests>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/AppManagerConstants.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/AppManagerConstants.java b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/AppManagerConstants.java
new file mode 100644
index 0000000..dafd7fb
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/AppManagerConstants.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.service.application;
+
+
+public class AppManagerConstants {
+    public final static String SITE_TAG = "site";
+    public final static String APPLICATION_TAG = "application";
+    public final static String OPERATION_TAG = "operation";
+    public final static String OPERATION_ID_TAG = "operationID";
+    public final static String TOPOLOGY_TAG = "topology";
+    public final static String FULLNAME = "fullName";
+    public final static String APPLICATION_ID = "id";
+
+    public final static String CLUSTER_ENV = "envContextConfig.env";
+    public final static String CLUSTER_URL = "envContextConfig.url";
+    public final static String DEFAULT_CLUSTER_URL = "http://sandbox.hortonworks.com:8744";
+
+    public final static String RUNNING_MODE = "envContextConfig.mode";
+    public final static String EAGLE_CLUSTER_STORM = "storm";
+    public final static String EAGLE_CLUSTER_SPARK = "spark";
+
+    public final static String APP_COMMAND_LOADER_INTERVAL_SECS = "appCommandLoaderIntervalSecs";
+    public final static String APP_HEALTH_CHECK_INTERVAL_SECS = "appHealthCheckIntervalSecs";
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/ApplicationManagementResource.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/ApplicationManagementResource.java b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/ApplicationManagementResource.java
new file mode 100644
index 0000000..779fbe5
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/ApplicationManagementResource.java
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.service.application;
+
+
+import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
+import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
+import org.apache.eagle.service.application.dao.ApplicationManagerDAO;
+import org.apache.eagle.service.application.dao.ApplicationManagerDaoImpl;
+import org.apache.eagle.service.application.entity.TopologyExecutionStatus;
+import org.apache.eagle.service.application.entity.TopologyOperationEntity;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.map.type.TypeFactory;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.*;
+
+@Path(ApplicationManagementResource.ROOT_PATH)
+public class ApplicationManagementResource {
+    private final static ApplicationManagerDAO dao = new ApplicationManagerDaoImpl();
+    public final static String ROOT_PATH = "/app";
+
+    @Path("operation")
+    @POST
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    public GenericServiceAPIResponseEntity createOperation(InputStream inputStream) {
+        GenericServiceAPIResponseEntity response = new GenericServiceAPIResponseEntity<>();
+        List<TopologyOperationEntity> operations = new LinkedList<>();
+        try {
+            List<TopologyOperationEntity> entities = (List<TopologyOperationEntity>) unmarshalOperationEntities(inputStream);
+            if (entities == null) {
+                throw new IllegalArgumentException("inputStream cannot convert to TopologyOperationEntity");
+            }
+            for (TopologyOperationEntity entity : entities) {
+                String status = dao.loadTopologyExecutionStatus(entity.getSite(), entity.getApplication(), entity.getTopology());
+                if(status == null) {
+                    throw new Exception(String.format("Fail to fetch the topology execution status by site=%s, application=%s, topology=%s", entity.getSite(), entity.getApplication(), entity.getTopology()));
+                }
+                int operationsInRunning = dao.loadTopologyOperationsInRunning(entity.getSite(), entity.getApplication(), entity.getTopology());
+                if(operationsInRunning !=0) {
+                    throw new Exception(operationsInRunning + "operations are running, please wait for a minute");
+                }
+                if (validateOperation(entity.getOperation(), status)) {
+                    Map<String, String> tags = entity.getTags();
+                    tags.put(AppManagerConstants.OPERATION_ID_TAG, UUID.randomUUID().toString());
+                    entity.setTags(tags);
+                    entity.setLastModifiedDate(System.currentTimeMillis());
+                    entity.setTimestamp(System.currentTimeMillis());
+                    operations.add(entity);
+                } else {
+                    throw new Exception(String.format("%s is an invalid operation, as the topology's current status is %s", entity.getOperation(), status));
+                }
+            }
+            response = dao.createOperation(operations);
+        } catch (Exception e) {
+            response.setSuccess(false);
+            response.setException(e);
+        }
+        return response;
+    }
+
+    private boolean validateOperation(String operation, String status) {
+        boolean ret = false;
+        switch (operation) {
+            case TopologyOperationEntity.OPERATION.START:
+                return TopologyExecutionStatus.isReadyToStart(status);
+            case TopologyOperationEntity.OPERATION.STOP:
+                return TopologyExecutionStatus.isReadyToStop(status);
+            default: break;
+        }
+        return ret;
+    }
+
+    private List<? extends TaggedLogAPIEntity> unmarshalOperationEntities(InputStream inputStream) throws IllegalAccessException, InstantiationException, IOException {
+        ObjectMapper objectMapper = new ObjectMapper();
+        return objectMapper.readValue(inputStream, TypeFactory.defaultInstance().constructCollectionType(LinkedList.class, TopologyOperationEntity.class));
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/dao/ApplicationManagerDAO.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/dao/ApplicationManagerDAO.java b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/dao/ApplicationManagerDAO.java
new file mode 100644
index 0000000..189370b
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/dao/ApplicationManagerDAO.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.service.application.dao;
+
+
+import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
+import org.apache.eagle.service.application.entity.TopologyExecutionStatus;
+import org.apache.eagle.service.application.entity.TopologyOperationEntity;
+
+import java.util.List;
+
+public interface ApplicationManagerDAO {
+    String loadTopologyExecutionStatus(String site, String application, String topology);
+    int loadTopologyOperationsInRunning(String site, String application, String topology) throws Exception;
+    GenericServiceAPIResponseEntity createOperation(List<TopologyOperationEntity> entities) throws Exception;
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/dao/ApplicationManagerDaoImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/dao/ApplicationManagerDaoImpl.java b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/dao/ApplicationManagerDaoImpl.java
new file mode 100644
index 0000000..e21f624
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/dao/ApplicationManagerDaoImpl.java
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.service.application.dao;
+
+
+import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
+import org.apache.eagle.policy.common.Constants;
+import org.apache.eagle.service.application.entity.TopologyExecutionEntity;
+import org.apache.eagle.service.application.entity.TopologyExecutionStatus;
+import org.apache.eagle.service.application.entity.TopologyOperationEntity;
+import org.apache.eagle.service.generic.GenericEntityServiceResource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+
+public class ApplicationManagerDaoImpl implements ApplicationManagerDAO {
+    private static Logger LOG = LoggerFactory.getLogger(ApplicationManagerDaoImpl.class);
+    GenericEntityServiceResource resource = new GenericEntityServiceResource();
+
+    @Override
+    public String loadTopologyExecutionStatus(String site, String application, String topology) {
+        String query = String.format("%s[@site=\"%s\" AND @application=\"%s\" AND @topology=\"%s\"]{*}", Constants.TOPOLOGY_EXECUTION_SERVICE_ENDPOINT_NAME, site, application, topology);
+        GenericServiceAPIResponseEntity<TopologyExecutionEntity> response = resource.search(query,  null, null, Integer.MAX_VALUE, null, false, false, 0L, 0, false, 0, null, false);
+        if(!response.isSuccess()) {
+            LOG.error(response.getException());
+            return null;
+        }
+        List<TopologyExecutionEntity> list = response.getObj();
+        if(list == null || list.size() != 1) {
+            LOG.error("ERROR: fetching 0 or more than 1 topology execution entities");
+            return null;
+        }
+        return list.get(0).getStatus();
+    }
+
+    @Override
+    public int loadTopologyOperationsInRunning(String site, String application, String topology) throws Exception {
+        int ret = 0;
+        String query = String.format("%s[@site=\"%s\" AND @application=\"%s\" AND @topology=\"%s\" AND (@status=\"%s\" OR @status=\"%s\")]{*}", Constants.TOPOLOGY_OPERATION_SERVICE_ENDPOINT_NAME, site, application, topology, TopologyOperationEntity.OPERATION_STATUS.INITIALIZED, TopologyOperationEntity.OPERATION_STATUS.PENDING);
+        GenericServiceAPIResponseEntity<TopologyExecutionEntity> response = resource.search(query, null, null, Integer.MAX_VALUE, null, false, false, 0L, 0, false, 0, null, false);
+        if(!response.isSuccess()) {
+            throw new Exception(response.getException());
+        }
+        if(response.getObj() != null && response.getObj().size() != 0) {
+            ret = response.getObj().size();
+        }
+        return ret;
+    }
+
+    @Override
+    public GenericServiceAPIResponseEntity createOperation(List<TopologyOperationEntity> entities) throws Exception {
+        if(entities.size() == 0) {
+            LOG.info("TopologyOperationEntity set is empty.");
+        }
+        GenericServiceAPIResponseEntity response = resource.updateEntities(entities, Constants.TOPOLOGY_OPERATION_SERVICE_ENDPOINT_NAME);
+        return response;
+    }
+
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/entity/ApplicationEntityRepo.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/entity/ApplicationEntityRepo.java b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/entity/ApplicationEntityRepo.java
new file mode 100644
index 0000000..3226650
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/entity/ApplicationEntityRepo.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.service.application.entity;
+
+
+import org.apache.eagle.log.entity.repo.EntityRepository;
+
+public class ApplicationEntityRepo  extends EntityRepository {
+    public ApplicationEntityRepo() {
+        this.registerEntity(TopologyDescriptionEntity.class);
+        this.registerEntity(TopologyExecutionEntity.class);
+        this.registerEntity(TopologyOperationEntity.class);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/entity/TopologyDescriptionEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/entity/TopologyDescriptionEntity.java b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/entity/TopologyDescriptionEntity.java
new file mode 100644
index 0000000..6442e6c
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/entity/TopologyDescriptionEntity.java
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.service.application.entity;
+
+
+import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
+import org.apache.eagle.log.entity.meta.*;
+import org.apache.eagle.policy.common.Constants;
+import org.apache.eagle.service.application.AppManagerConstants;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+import java.util.HashMap;
+import java.util.Map;
+
+
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+@Table("eagle_metadata")
+@ColumnFamily("f")
+@Prefix("topologyDescription")
+@Service(Constants.TOPOLOGY_DESCRIPTION_SERVICE_ENDPOINT_NAME)
+@JsonIgnoreProperties(ignoreUnknown = true)
+@TimeSeries(false)
+@Tags({"topology"})
+public class TopologyDescriptionEntity extends TaggedLogAPIEntity {
+    @Column("a")
+    private String exeClass;
+    @Column("b")
+    private String type;
+    @Column("c")
+    private String description;
+    @Column("d")
+    private String version;
+    private String context;
+    public String getContext() {
+        return context;
+    }
+
+    public void setContext(String context) {
+        this.context = context;
+    }
+
+    public String getExeClass() {
+        return exeClass;
+    }
+
+    public void setExeClass(String exeClass) {
+        this.exeClass = exeClass;
+        valueChanged("exeClass");
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+        valueChanged("type");
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+        valueChanged("description");
+    }
+
+    public String getVersion() {
+        return version;
+    }
+
+    public void setVersion(String version) {
+        this.version = version;
+        valueChanged("version");
+    }
+
+    public String getTopology() {
+        return this.getTags().get(AppManagerConstants.TOPOLOGY_TAG);
+    }
+
+    public final static class TYPE {
+        public final static String DYNAMIC = "DYNAMIC";
+        public final static String CLASS = "CLASS";
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/entity/TopologyExecutionEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/entity/TopologyExecutionEntity.java b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/entity/TopologyExecutionEntity.java
new file mode 100644
index 0000000..9991d3b
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/entity/TopologyExecutionEntity.java
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.service.application.entity;
+
+import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
+import org.apache.eagle.log.entity.meta.*;
+import org.apache.eagle.policy.common.Constants;
+
+import org.apache.eagle.service.application.AppManagerConstants;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+import java.util.HashMap;
+import java.util.Map;
+
+
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+@Table("eagle_metadata")
+@ColumnFamily("f")
+@Prefix("topologyExecution")
+@Service(Constants.TOPOLOGY_EXECUTION_SERVICE_ENDPOINT_NAME)
+@JsonIgnoreProperties(ignoreUnknown = true)
+@TimeSeries(false)
+@Tags({"site", "application", "topology"})
+public class TopologyExecutionEntity extends TaggedLogAPIEntity {
+    @Column("a")
+    private String fullName;
+    @Column("b")
+    private String url;
+    @Column("c")
+    private String description;
+    @Column("d")
+    private String status;
+    @Column("e")
+    private long lastModifiedDate;
+    @Column("f")
+    private String mode;
+    @Column("g")
+    private String environment;
+
+    public String getEnvironment() {
+        return environment;
+    }
+
+    public void setEnvironment(String environment) {
+        this.environment = environment;
+        valueChanged("environment");
+    }
+
+    public String getMode() {
+        return mode;
+    }
+
+    public void setMode(String mode) {
+        this.mode = mode;
+        valueChanged("mode");
+    }
+
+    public String getFullName() {
+        return fullName;
+    }
+
+    public void setFullName(String fullName) {
+        this.fullName = fullName;
+        valueChanged("fullName");
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+        valueChanged("url");
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+        valueChanged("description");
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+        valueChanged("status");
+    }
+
+    public long getLastModifiedDate() {
+        return lastModifiedDate;
+    }
+
+    public void setLastModifiedDate(long lastModifiedDate) {
+        this.lastModifiedDate = lastModifiedDate;
+        valueChanged("lastModifiedDate");
+    }
+
+    public String getSite() {
+        return this.getTags().get(AppManagerConstants.SITE_TAG);
+    }
+
+    public String getApplication() {
+        return this.getTags().get(AppManagerConstants.APPLICATION_TAG);
+    }
+
+    public String getTopology() {
+        return this.getTags().get(AppManagerConstants.TOPOLOGY_TAG);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/entity/TopologyExecutionStatus.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/entity/TopologyExecutionStatus.java b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/entity/TopologyExecutionStatus.java
new file mode 100644
index 0000000..f62ad8a
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/entity/TopologyExecutionStatus.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.service.application.entity;
+
+
+public class TopologyExecutionStatus {
+    public final static String STOPPED = "STOPPED";
+    public final static String STARTED = "STARTED";
+    public final static String STARTING = "STARTING";
+    public final static String STOPPING = "STOPPING";
+    public final static String NEW = "NEW";
+
+    public static boolean isReadyToStart(String status){
+        return status.equals(STOPPED) || status.equals(NEW);
+    }
+
+    public static boolean isReadyToStop(String status){
+        return status.equals(STARTED);
+    }
+
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/entity/TopologyOperationEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/entity/TopologyOperationEntity.java b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/entity/TopologyOperationEntity.java
new file mode 100644
index 0000000..6d8f1a0
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/entity/TopologyOperationEntity.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.service.application.entity;
+
+import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
+import org.apache.eagle.log.entity.meta.*;
+import org.apache.eagle.policy.common.Constants;
+
+import org.apache.eagle.service.application.AppManagerConstants;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+import java.util.HashMap;
+import java.util.Map;
+
+
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+@Table("eagle_metadata")
+@ColumnFamily("f")
+@Prefix("topologyOperation")
+@Service(Constants.TOPOLOGY_OPERATION_SERVICE_ENDPOINT_NAME)
+@JsonIgnoreProperties(ignoreUnknown = true)
+@TimeSeries(true)
+@Tags({"site", "application", "topology", "operationID", "operation"})
+public class TopologyOperationEntity extends TaggedLogAPIEntity {
+    @Column("a")
+    private String status;
+    @Column("b")
+    private String message;
+    @Column("c")
+    private long lastModifiedDate;
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+        valueChanged("status");
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+        valueChanged("message");
+    }
+
+    public long getLastModifiedDate() {
+        return lastModifiedDate;
+    }
+
+    public void setLastModifiedDate(long lastModifiedDate) {
+        this.lastModifiedDate = lastModifiedDate;
+        valueChanged("lastModifiedDate");
+    }
+
+    public final static class OPERATION {
+        public final static String START = "START";
+        public final static String STOP = "STOP";
+        public final static String STATUS = "STATUS";
+    }
+
+    public final static class OPERATION_STATUS {
+        public final static String PENDING = "PENDING";
+        public final static String INITIALIZED = "INITIALIZED";
+        public final static String SUCCESS = "SUCCESS";
+        public final static String FAILED = "FAILED";
+    }
+
+    public String getSite() {
+        return this.getTags().get(AppManagerConstants.SITE_TAG);
+    }
+
+    public String getApplication() {
+        return this.getTags().get(AppManagerConstants.APPLICATION_TAG);
+    }
+
+    public String getTopology() {
+        return this.getTags().get(AppManagerConstants.TOPOLOGY_TAG);
+    }
+
+    public String getOperation() {
+        return this.getTags().get(AppManagerConstants.OPERATION_TAG);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-stream-application-manager/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-stream-application-manager/pom.xml b/eagle-core/eagle-application-management/eagle-stream-application-manager/pom.xml
new file mode 100644
index 0000000..83598c1
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-stream-application-manager/pom.xml
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>eagle-application-management</artifactId>
+        <groupId>org.apache.eagle</groupId>
+        <version>0.3.0-incubating</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>eagle-stream-application-manager</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.eagle</groupId>
+            <artifactId>eagle-application-service</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.eagle</groupId>
+            <artifactId>eagle-stream-pipeline</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.storm</groupId>
+            <artifactId>storm-core</artifactId>
+            <version>${storm.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>ch.qos.logback</groupId>
+                    <artifactId>logback-classic</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>log4j</groupId>
+                    <artifactId>log4j</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>log4j-over-slf4j</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.scala-lang</groupId>
+            <artifactId>scala-reflect</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.scala-lang</groupId>
+            <artifactId>scala-compiler</artifactId>
+            <version>${scala.version}.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.scalatest</groupId>
+            <artifactId>scalatest_${scala.version}</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.typesafe.akka</groupId>
+            <artifactId>akka-actor_${scala.version}</artifactId>
+            <version>${akka.actor.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.typesafe.akka</groupId>
+            <artifactId>akka-testkit_${scala.version}</artifactId>
+            <version>${akka.actor.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.scala-tools</groupId>
+                <artifactId>maven-scala-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>scala-compile-first</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>add-source</goal>
+                            <goal>compile</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>scala-test-compile</id>
+                        <phase>process-test-resources</phase>
+                        <goals>
+                            <goal>testCompile</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <skipTests>true</skipTests>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.scalatest</groupId>
+                <artifactId>scalatest-maven-plugin</artifactId>
+                <configuration>
+                    <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
+                    <junitxml>.</junitxml>
+                    <filereports>TestSuite.txt</filereports>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>test</id>
+                        <goals>
+                            <goal>test</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/java/org/apache/eagle/stream/application/TopologyException.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/java/org/apache/eagle/stream/application/TopologyException.java b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/java/org/apache/eagle/stream/application/TopologyException.java
new file mode 100644
index 0000000..d382629
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/java/org/apache/eagle/stream/application/TopologyException.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.stream.application;
+
+
+public class TopologyException extends Exception {
+    public TopologyException(String s, Exception e) { super(s,e); }
+    public TopologyException(Exception e) { super(e); }
+    public TopologyException(String s) { super(s); }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/java/org/apache/eagle/stream/application/TopologyExecutable.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/java/org/apache/eagle/stream/application/TopologyExecutable.java b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/java/org/apache/eagle/stream/application/TopologyExecutable.java
new file mode 100644
index 0000000..8f625c7
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/java/org/apache/eagle/stream/application/TopologyExecutable.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.stream.application;
+
+
+import com.typesafe.config.Config;
+
+
+public interface TopologyExecutable {
+    void submit(String topology, Config config);
+}



[05/47] incubator-eagle git commit: delete duplicate email template

Posted by mw...@apache.org.
delete duplicate email template


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/035a9f69
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/035a9f69
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/035a9f69

Branch: refs/heads/master
Commit: 035a9f6949e3ef378e98c9fad84c3087afef5e4d
Parents: ecf75b2
Author: Zhao, Qingwen <qi...@ebay.com>
Authored: Mon Apr 25 17:03:09 2016 +0800
Committer: Zhao, Qingwen <qi...@ebay.com>
Committed: Mon Apr 25 17:03:09 2016 +0800

----------------------------------------------------------------------
 .../src/main/resources/ALERT_DEFAULT.vm         |  15 +-
 .../src/main/resources/ALERT_DEFAULT.vm         | 266 -------------------
 2 files changed, 3 insertions(+), 278 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/035a9f69/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/ALERT_DEFAULT.vm
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/ALERT_DEFAULT.vm b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/ALERT_DEFAULT.vm
index 0a044f6..3e29439 100644
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/ALERT_DEFAULT.vm
+++ b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/ALERT_DEFAULT.vm
@@ -124,9 +124,6 @@
 							<td style="padding: 0 0 0 0;" align="left" >
 								<p style="color:#FFFFFF;font-weight: bold; font-size: 24px">Eagle</p>
 							</td>
-							<td style="padding: 0 0 0 0;" align="right">
-								<p style="color:#FFFFFF;font-weight: bold;">DAM Alert</p>
-							</td>
 						</tr>
 					</table>
 				</td>
@@ -139,7 +136,7 @@
 						<tr>
 							<!-- Title -->
 							<td align="center">
-								<h1>Malicious Data Operation Detected</h1>
+								<h1>$elem["application"] Alert Detected</h1>
 							</td>
 						</tr>
 						<tr>
@@ -214,9 +211,6 @@
 									</tr>
 									<tr>
 										<th>
-											<p>Alert Type</p>
-										</th>
-										<th>
 											<p>Policy Name</p>
 										</th>
 										<th>
@@ -225,9 +219,6 @@
 									</tr>
 									<tr>
 										<td>
-											<p>DAM Alert</p>
-										</td>									
-										<td>
 											<p>$elem["policyId"]</p>
 										</td>
 										<td>
@@ -258,13 +249,13 @@
 						<tr>
 							<!-- Possible Root Causes Content -->
 							<td class="panel" valign="top" style="background: #F4F4F4; border: 1px solid #AAAAAA; padding: 10px 10px 12px 10px;">
-								<p> Malicious data operation found, please check.</p>
+								<p> $elem["application"] alert found, please check.</p>
 							</td>
 						</tr>
 						<tr>
 							<!-- Copyright -->
 							<td align="center">
-								<p><a href="http://<Eagle-Host>/alerts/alertlist.html">Apache Eagle</a></p>
+								<p><a href="<Eagle-Host>/alerts/alertlist.html">Apache Eagle</a></p>
 							</td>
 						</tr>
 					</table>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/035a9f69/eagle-core/eagle-alert/eagle-alert-process/src/main/resources/ALERT_DEFAULT.vm
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/resources/ALERT_DEFAULT.vm b/eagle-core/eagle-alert/eagle-alert-process/src/main/resources/ALERT_DEFAULT.vm
deleted file mode 100644
index ca0f79c..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/main/resources/ALERT_DEFAULT.vm
+++ /dev/null
@@ -1,266 +0,0 @@
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~    http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-	<head>
-		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-		<meta name="viewport" content="width=device-width"/>
-		<style>
-			body {
-				width:100% !important;
-				min-width: 100%;
-				-webkit-text-size-adjust:100%;
-				-ms-text-size-adjust:100%;
-				margin:0;
-				padding:0;
-			}
-
-			table {
-				border-spacing: 0;
-				border-collapse: collapse;
-			}
-
-			table th,
-			table td {
-				padding: 3px 0 3px 0;
-			}
-
-			.body {
-				width: 100%;
-			}
-
-			p,a,h1,h2,h3,ul,ol,li {
-				font-family: Helvetica, Arial, sans-serif;
-				font-weight: normal;
-				margin: 0;
-				padding: 0;
-			}
-			p {
-				font-size: 14px;
-				line-height: 19px;
-			}
-			a {
-				color: #3294b1;
-			}
-			h1 {
-				font-size: 36px;
-				margin: 15px 0 5px 0;
-			}
-			h2 {
-				font-size: 32px;
-			}
-			h3 {
-				font-size: 28px;
-			}
-
-			ul,ol {
-				margin: 0 0 0 25px;
-				padding: 0;
-			}
-
-			.btn {
-				background: #2ba6cb !important;
-				border: 1px solid #2284a1;
-				padding: 10px 20px 10px 20px;
-				text-align: center;
-			}
-			.btn:hover {
-				background: #2795b6 !important;
-			}
-			.btn a {
-				color: #FFFFFF;
-				text-decoration: none;
-				font-weight: bold;
-				padding: 10px 20px 10px 20px;
-			}
-
-			.tableBordered {
-				border-top: 1px solid #b9e5ff;
-			}
-			.tableBordered th {
-				background: #ECF8FF;
-			}
-			.tableBordered th p {
-				font-weight: bold;
-				color: #3294b1;
-			}
-			.tableBordered th,
-			.tableBordered td {
-				color: #333333;
-				border-bottom: 1px solid #b9e5ff;
-				text-align: center;
-				padding-bottom: 5px;
-			}
-
-			.panel {
-				height: 100px;
-			}
-		</style>
-	</head>
-	<body>
-		#set ( $elem = $alertList[0] )
-		#set ( $alertUrl = $elem["alertDetailUrl"] )
-		#set ( $policyUrl = $elem["policyDetailUrl"] )
-		<table class="body">
-			<tr>
-				<td align="center" valign="top" style="background: #999999; padding: 0 0 0 0;">
-					<!-- Eagle Header -->
-					<table width="580">
-						<tr>
-							<td style="padding: 0 0 0 0;" align="left" >
-								<p style="color:#FFFFFF;font-weight: bold; font-size: 24px">Eagle</p>
-							</td>
-						</tr>
-					</table>
-				</td>
-			</tr>
-
-			<tr>
-				<td align="center" valign="top">
-					<!-- Eagle Body -->
-					<table width="580">
-						<tr>
-							<!-- Title -->
-							<td align="center">
-								<h1>$elem["dataSource"] Alert Detected</h1>
-							</td>
-						</tr>
-						<tr>
-							<!-- Time -->
-							<td>
-								<table width="580">
-									<tr>
-										<td>
-											<p><b>Detected Time: $elem["alertTimestamp"]</b></p>
-										</td>
-										#set ( $severity = $elem["severity"] )
-										#if (!$severity || ("$severity" == ""))
-											#set ( $elem["severity"] = "WARNING")
-										#end
-										<td align="right">
-											<p><b>
-												Severity:
-									            #if ($elem["severity"] == "WARNING")
-													<span>$elem["severity"]</span>												
-    											#else
-													<span style="color: #FF0000;">$elem["severity"]</span>
-    											#end
-											</b></p>
-										</td>
-									</tr>
-								</table>
-							</td>
-						</tr>
-						<tr>
-							<!-- Description -->
-							<td valign="top" style="background: #ECF8FF; border: 1px solid #b9e5ff; padding: 10px 10px 12px 10px;">
-								<p>$elem["alertMessage"]</p>
-							</td>
-						</tr>
-						<tr>
-							<!-- View Detail -->
-							<td align="center" style="padding: 10px 0 0 0;">
-								<table width="580">
-									<tr>
-										<td class="btn">
-											<a href="$alertUrl">View Alert Details on Eagle Web</a>
-										</td>
-									</tr>
-								</table>
-							</td>
-						</tr>
-						<tr>
-							<!-- Basic Information -->
-							<td style="padding: 20px 0 0 0;">
-								<p><b>Basic Information:</b></p>
-							</td>
-						</tr>
-						<tr>
-							<!-- Basic Information Content -->
-							<td>
-								<table class="tableBordered" width="580">
-									<tr>
-										<th>
-											<p>Site</p>
-										</th>
-										<th>
-											<p>Data Source</p>
-										</th>
-									</tr>
-									<tr>
-										<td>
-											<p>$elem["site"]</p>
-										</td>
-										<td>
-											<p>$elem["dataSource"]</p>
-										</td>
-									</tr>
-									<tr>
-										<th>
-											<p>Policy Name</p>
-										</th>
-										<th>
-											<p>Severity</p>
-										</th>
-									</tr>
-									<tr>
-										<td>
-											<p>$elem["policyId"]</p>
-										</td>
-										<td>
-											<p>$elem["severity"]</p>
-										</td>
-									</tr>
-								</table>
-							</td>
-						</tr>
-						<tr>
-							<!-- View Detail -->
-							<td align="center" style="padding: 10px 0 0 0;">
-								<table width="580">
-									<tr>
-										<td class="btn">
-											<a href="$policyUrl">View Policy Details on Eagle Web</a>
-										</td>
-									</tr>
-								</table>
-							</td>
-						</tr>						
-						<tr>
-							<!-- Actions Required -->
-							<td style="padding: 20px 0 0 0;">
-								<p><b>Actions Required:</b></p>
-							</td>
-						</tr>
-						<tr>
-							<!-- Possible Root Causes Content -->
-							<td class="panel" valign="top" style="background: #F4F4F4; border: 1px solid #AAAAAA; padding: 10px 10px 12px 10px;">
-								<p> $elem["dataSource"] alert found, please check.</p>
-							</td>
-						</tr>
-						<tr>
-							<!-- Copyright -->
-							<td align="center">
-								<p><a href="<Eagle-Host>/alerts/alertlist.html">Apache Eagle</a></p>
-							</td>
-						</tr>
-					</table>
-				</td>
-			</tr>
-		</table>
-	</body>
-</html>
\ No newline at end of file


[44/47] incubator-eagle git commit: EAGLE-365 delete .jar files to fix the issue found in voting of 0.4.0-incubating-rc2

Posted by mw...@apache.org.
EAGLE-365 delete .jar files to fix the issue found in voting of 0.4.0-incubating-rc2

https://issues.apache.org/jira/browse/EAGLE-365

- delete eagle-assembly/src/main/lib/tomcat/bin/bootstrap.jar
- delete eagle-assembly/src/main/lib/tomcat/bin/commons-daemon.jar
- delete eagle-assembly/src/main/lib/tomcat/bin/tomcat-juli.jar

author: anyway1021 <mw...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/9cd75b18
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/9cd75b18
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/9cd75b18

Branch: refs/heads/master
Commit: 9cd75b188941bf476878a2210984546e4e257c7a
Parents: 2f90188
Author: anyway1021 <mw...@apache.org>
Authored: Mon Jul 11 14:53:01 2016 +0800
Committer: anyway1021 <mw...@apache.org>
Committed: Mon Jul 11 16:54:52 2016 +0800

----------------------------------------------------------------------
 .../src/main/lib/tomcat/bin/bootstrap.jar          | Bin 28052 -> 0 bytes
 .../src/main/lib/tomcat/bin/commons-daemon.jar     | Bin 24283 -> 0 bytes
 .../src/main/lib/tomcat/bin/tomcat-juli.jar        | Bin 38222 -> 0 bytes
 3 files changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9cd75b18/eagle-assembly/src/main/lib/tomcat/bin/bootstrap.jar
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/bin/bootstrap.jar b/eagle-assembly/src/main/lib/tomcat/bin/bootstrap.jar
deleted file mode 100644
index 8f43864..0000000
Binary files a/eagle-assembly/src/main/lib/tomcat/bin/bootstrap.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9cd75b18/eagle-assembly/src/main/lib/tomcat/bin/commons-daemon.jar
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/bin/commons-daemon.jar b/eagle-assembly/src/main/lib/tomcat/bin/commons-daemon.jar
deleted file mode 100644
index 2b6b9c6..0000000
Binary files a/eagle-assembly/src/main/lib/tomcat/bin/commons-daemon.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9cd75b18/eagle-assembly/src/main/lib/tomcat/bin/tomcat-juli.jar
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/bin/tomcat-juli.jar b/eagle-assembly/src/main/lib/tomcat/bin/tomcat-juli.jar
deleted file mode 100644
index e1b80ad..0000000
Binary files a/eagle-assembly/src/main/lib/tomcat/bin/tomcat-juli.jar and /dev/null differ


[17/47] incubator-eagle git commit: EAGLE-294 fix default value fillup issue If a policy metadata field is not set, add null attributes to input stream for SiddhiCEP

Posted by mw...@apache.org.
EAGLE-294 fix default value fillup issue
 If a policy metadata field is not set, add null attributes to input stream for SiddhiCEP

Author: Huizhi Lu, ihuizhi.lu@gmail.com
Reviewer: Hao Chen, Yong Zhang

Closes #196


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/9ad4b635
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/9ad4b635
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/9ad4b635

Branch: refs/heads/master
Commit: 9ad4b635d1bad7d7db9470b7ab48d99d1e4aa3e1
Parents: e7433a3
Author: yonzhang <yo...@gmail.com>
Authored: Mon May 23 18:17:38 2016 -0700
Committer: yonzhang <yo...@gmail.com>
Committed: Mon May 23 18:17:38 2016 -0700

----------------------------------------------------------------------
 .../src/main/resources/application.conf         | 73 ++++++++++++++++++++
 .../src/main/resources/log4j.properties         | 40 +++++++++++
 .../policy/siddhi/SiddhiPolicyEvaluator.java    | 57 ++++++++++-----
 3 files changed, 152 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9ad4b635/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/resources/application.conf b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/resources/application.conf
new file mode 100644
index 0000000..72c2ae5
--- /dev/null
+++ b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/resources/application.conf
@@ -0,0 +1,73 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{
+  "envContextConfig" : {
+    "env" : "storm",
+    "mode" : "local",
+    "topologyName" : "SpadesMonitorTopology",
+    "stormConfigFile" : "spades-monitor-storm.yaml",
+    "parallelismConfig" : {
+      "SpadesMonitorStream" : 1,
+      "SpadesMonitorExecutor*" : 1
+    }
+  },
+  "dataSourceConfig": {
+    "topic" : "spades_monitor_sandbox",
+    "zkConnection" : "sandbox.hortonworks.com:2181",
+    "zkConnectionTimeoutMS" : 15000,
+    "consumerGroupId" : "eagle.consumer",
+    "fetchSize" : 1048586,
+    "deserializerClass" : "org.apache.eagle.datastream.storm.JsonMessageDeserializer",
+    "transactionZKServers" : "sandbox.hortonworks.com",
+    "transactionZKPort" : 2181,
+    "transactionZKRoot" : "/consumers",
+    "transactionStateUpdateMS" : 2000
+  },
+  "alertExecutorConfigs" : {
+    "SpadesMonitorExecutor" : {
+      "parallelism" : 1,
+      "partitioner" : "org.apache.eagle.policy.DefaultPolicyPartitioner"
+      "needValidation" : "true"
+    }
+  },
+  "eagleProps" : {
+    "site" : "sandbox",
+    "application": "SpadesMonitor",
+    "dataJoinPollIntervalSec" : 30,
+    "mailHost" : "mailHost.com",
+    "mailSmtpPort":"25",
+    "mailDebug" : "true",
+    "balancePartitionEnabled" : true,
+    #"partitionRefreshIntervalInMin" : 60,
+    #"kafkaStatisticRangeInMin" : 60,
+    "eagleService": {
+      "host": "localhost",
+      "port": 9099,
+      "username": "admin",
+      "password": "secret"
+    }
+    "readHdfsUserCommandPatternFrom" : "file"
+  },
+  "dynamicConfigSource" : {
+    "enabled" : true,
+    "initDelayMillis" : 0,
+    "delayMillis" : 30000
+  },
+  "eagleNotificationProps" : {
+    "eagleStoreEnabled": true,
+    "kafka_broker":"127.0.0.1:6667"
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9ad4b635/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/resources/log4j.properties b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/resources/log4j.properties
new file mode 100644
index 0000000..ae58e6b
--- /dev/null
+++ b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/resources/log4j.properties
@@ -0,0 +1,40 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+log4j.rootLogger=info, stdout, DRFA
+
+eagle.log.dir=./logs
+eagle.log.file=eagle.log
+
+
+#log4j.logger.org.apache.eagle.security.auditlog.IPZoneDataJoinExecutor=DEBUG
+#log4j.logger.org.apache.eagle.security.auditlog.FileSensitivityDataJoinExecutor=DEBUG
+log4j.logger.org.apache.eagle.security.auditlog.HdfsUserCommandReassembler=DEBUG
+#log4j.logger.org.apache.eagle.executor.AlertExecutor=DEBUG
+# standard output
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
+
+# Daily Rolling File Appender
+log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.DRFA.File=${eagle.log.dir}/${eagle.log.file}
+log4j.appender.DRFA.DatePattern=yyyy-MM-dd
+## 30-day backup
+# log4j.appender.DRFA.MaxBackupIndex=30
+log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
+
+# Pattern format: Date LogLevel LoggerName LogMessage
+log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9ad4b635/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiPolicyEvaluator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiPolicyEvaluator.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiPolicyEvaluator.java
index c289d08..cbee286 100644
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiPolicyEvaluator.java
+++ b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiPolicyEvaluator.java
@@ -207,17 +207,25 @@ public class SiddhiPolicyEvaluator<T extends AbstractPolicyDefinitionEntity, K>
     @Override
     public void evaluate(ValuesArray data) throws Exception {
         if (!siddhiRuntime.markdownEnabled) {
-            if (LOG.isDebugEnabled()) LOG.debug("Siddhi policy evaluator consumers data :" + data);
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("Siddhi policy evaluator consumers data :" + data);
+            }
             Collector outputCollector = (Collector) data.get(0);
             String streamName = (String) data.get(1);
-            SortedMap map = (SortedMap) data.get(2);
-            validateEventInRuntime(streamName, map);
+            SortedMap dataMap = (SortedMap) data.get(2);
+
+            // Get metadata keyset for the stream.
+            Set<String> metadataKeys = StreamMetadataManager.getInstance()
+                    .getMetadataEntityMapForStream(streamName).keySet();
+
+            validateEventInRuntime(streamName, dataMap, metadataKeys);
+
             synchronized (siddhiRuntime) {
                 // retain the collector in the context. This assignment is idempotent
                 context.outputCollector = outputCollector;
 
-                List<Object> input = new ArrayList<>();
-                putAttrsIntoInputStream(input, streamName, map);
+                List<Object> input = new ArrayList<Object>();
+                putAttrsIntoInputStream(input, streamName, metadataKeys, dataMap);
                 siddhiRuntime.siddhiInputHandlers.get(streamName).send(input.toArray(new Object[0]));
             }
         }
@@ -232,28 +240,41 @@ public class SiddhiPolicyEvaluator<T extends AbstractPolicyDefinitionEntity, K>
      * @param data         input event
      * @see <a href="https://issues.apache.org/jira/browse/EAGLE-49">https://issues.apache.org/jira/browse/EAGLE-49</a>
      */
-    private void validateEventInRuntime(String sourceStream, SortedMap data) {
-        if (!needValidation)
+    private void validateEventInRuntime(String sourceStream, SortedMap data, Set<String> metadataKeys) {
+        if (!needValidation) {
             return;
-        SortedMap<String, AlertStreamSchemaEntity> map = StreamMetadataManager.getInstance().getMetadataEntityMapForStream(sourceStream);
-        if (!map.keySet().equals(data.keySet())) {
+        }
+
+        if (!metadataKeys.equals(data.keySet())) {
             Set<Object> badKeys = new TreeSet<>();
-            for (Object key : data.keySet()) if (!map.containsKey(key)) badKeys.add(key);
-            LOG.warn(String.format("Ignore invalid fields %s in event: %s from stream: %s, valid fields are: %s", badKeys.toString(), data.toString(), sourceStream, map.keySet().toString()));
-            for (Object key : badKeys) data.remove(key);
+            for (Object key : data.keySet()) {
+                if (!metadataKeys.contains(key)) {
+                    badKeys.add(key);
+                }
+            }
+            LOG.warn(String.format("Ignore invalid fields %s in event: %s from stream: %s, valid fields are: %s",
+                    badKeys.toString(), data.toString(), sourceStream, metadataKeys.toString()));
+
+            for (Object key : badKeys) {
+                data.remove(key);
+            }
         }
     }
 
-    private void putAttrsIntoInputStream(List<Object> input, String streamName, SortedMap map) {
+    private void putAttrsIntoInputStream(List<Object> input, String streamName, Set<String> metadataKeys, SortedMap dataMap) {
         if (!needValidation) {
-            input.addAll(map.values());
+            input.addAll(dataMap.values());
             return;
         }
-        for (Object key : map.keySet()) {
-            Object value = map.get(key);
+
+        // If a metadata field is not set, we put null for the field's value.
+        for (String key : metadataKeys) {
+            Object value = dataMap.get(key);
             if (value == null) {
-                input.add(SiddhiStreamMetadataUtils.getAttrDefaultValue(streamName, (String) key));
-            } else input.add(value);
+                input.add(SiddhiStreamMetadataUtils.getAttrDefaultValue(streamName, key));
+            } else {
+                input.add(value);
+            }
         }
     }
 


[08/47] incubator-eagle git commit: Add configuration value to enable application Manager

Posted by mw...@apache.org.
Add configuration value to enable application Manager


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/02fcb79d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/02fcb79d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/02fcb79d

Branch: refs/heads/master
Commit: 02fcb79d7dcb959338547bec280cff1991b33cdb
Parents: d8be43f
Author: Zhao, Qingwen <qi...@ebay.com>
Authored: Fri May 6 11:21:48 2016 +0800
Committer: Zhao, Qingwen <qi...@ebay.com>
Committed: Fri May 6 11:21:48 2016 +0800

----------------------------------------------------------------------
 eagle-assembly/src/main/conf/eagle-scheduler.conf            | 1 +
 .../eagle/service/application/AppManagerConstants.java       | 1 +
 .../security/profile/ApplicationSchedulerListener.java       | 8 ++++++--
 eagle-webservice/src/main/resources/eagle-scheduler.conf     | 1 +
 4 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/02fcb79d/eagle-assembly/src/main/conf/eagle-scheduler.conf
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/conf/eagle-scheduler.conf b/eagle-assembly/src/main/conf/eagle-scheduler.conf
index aaab131..74ff18b 100644
--- a/eagle-assembly/src/main/conf/eagle-scheduler.conf
+++ b/eagle-assembly/src/main/conf/eagle-scheduler.conf
@@ -15,6 +15,7 @@
 
 
 ### scheduler propertise
+appCommandLoaderEnabled = false
 appCommandLoaderIntervalSecs = 1
 appHealthCheckIntervalSecs = 5
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/02fcb79d/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/AppManagerConstants.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/AppManagerConstants.java b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/AppManagerConstants.java
index dafd7fb..3aa3579 100644
--- a/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/AppManagerConstants.java
+++ b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/AppManagerConstants.java
@@ -36,6 +36,7 @@ public class AppManagerConstants {
     public final static String EAGLE_CLUSTER_STORM = "storm";
     public final static String EAGLE_CLUSTER_SPARK = "spark";
 
+    public final static String APP_COMMAND_LOADER_ENABLED = "appCommandLoaderEnabled";
     public final static String APP_COMMAND_LOADER_INTERVAL_SECS = "appCommandLoaderIntervalSecs";
     public final static String APP_HEALTH_CHECK_INTERVAL_SECS = "appHealthCheckIntervalSecs";
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/02fcb79d/eagle-webservice/src/main/java/org/apache/eagle/service/security/profile/ApplicationSchedulerListener.java
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/java/org/apache/eagle/service/security/profile/ApplicationSchedulerListener.java b/eagle-webservice/src/main/java/org/apache/eagle/service/security/profile/ApplicationSchedulerListener.java
index a225192..3ef9756 100644
--- a/eagle-webservice/src/main/java/org/apache/eagle/service/security/profile/ApplicationSchedulerListener.java
+++ b/eagle-webservice/src/main/java/org/apache/eagle/service/security/profile/ApplicationSchedulerListener.java
@@ -22,7 +22,9 @@ package org.apache.eagle.service.security.profile;
 import akka.actor.ActorSystem;
 import com.typesafe.config.Config;
 import com.typesafe.config.ConfigFactory;
+import org.apache.eagle.service.application.AppManagerConstants;
 import org.apache.eagle.stream.application.scheduler.ApplicationScheduler;
+import org.apache.hadoop.yarn.api.ApplicationConstants;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import scala.concurrent.duration.Duration;
@@ -42,7 +44,9 @@ public class ApplicationSchedulerListener implements ServletContextListener {
         //Get the actor system from the spring context
         //SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
         Config config = ConfigFactory.load("eagle-scheduler.conf");
-        system = new ApplicationScheduler().start(config);
+        if(config.hasPath(AppManagerConstants.APP_COMMAND_LOADER_ENABLED) && config.getBoolean(AppManagerConstants.APP_COMMAND_LOADER_ENABLED)) {
+            system = new ApplicationScheduler().start(config);
+        }
     }
 
     @Override
@@ -52,7 +56,7 @@ public class ApplicationSchedulerListener implements ServletContextListener {
             system.shutdown();
             system.awaitTermination(Duration.create(15, TimeUnit.SECONDS));
         } else {
-            LOG.warn("No actor system loaded, yet trying to shut down. Check AppContext config and consider if you need this listener.");
+            LOG.warn("No actor system loaded, yet trying to shut down. Check eagle-scheduler.conf and consider if you need this listener.");
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/02fcb79d/eagle-webservice/src/main/resources/eagle-scheduler.conf
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/resources/eagle-scheduler.conf b/eagle-webservice/src/main/resources/eagle-scheduler.conf
index aaab131..74ff18b 100644
--- a/eagle-webservice/src/main/resources/eagle-scheduler.conf
+++ b/eagle-webservice/src/main/resources/eagle-scheduler.conf
@@ -15,6 +15,7 @@
 
 
 ### scheduler propertise
+appCommandLoaderEnabled = false
 appCommandLoaderIntervalSecs = 1
 appHealthCheckIntervalSecs = 5
 


[15/47] incubator-eagle git commit: EAGLE-297 Email with authentication Email with authentication can not be validated and sent out

Posted by mw...@apache.org.
EAGLE-297 Email with authentication
Email with authentication can not be validated and sent out

https://issues.apache.org/jira/browse/EAGLE-297

Author: Huizhi Lu, ihuizhi.lu@gmail.com
Reviewer: Qingwen, Zhao

Closes #187


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/8df78b18
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/8df78b18
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/8df78b18

Branch: refs/heads/master
Commit: 8df78b185eaba1c094ae7b713b4342a476e9b92a
Parents: 8dbbf71
Author: yonzhang <yo...@gmail.com>
Authored: Mon May 23 17:17:32 2016 -0700
Committer: yonzhang <yo...@gmail.com>
Committed: Mon May 23 17:17:32 2016 -0700

----------------------------------------------------------------------
 .../eagle/common/email/EagleMailClient.java     | 21 ++++++++++++--------
 .../src/test/resources/application.conf         |  9 +++++++--
 2 files changed, 20 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/8df78b18/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/email/EagleMailClient.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/email/EagleMailClient.java b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/email/EagleMailClient.java
index e647a2f..6edac0a 100755
--- a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/email/EagleMailClient.java
+++ b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/email/EagleMailClient.java
@@ -58,7 +58,7 @@ public class EagleMailClient {
 	private static final String AUTH_CONFIG = "mail.smtp.auth";
 	private static final String DEBUG_CONFIG = "mail.debug";
 	private static final String USER_CONFIG = "mail.user";
-	private static final String PWD_CONFIG = "mail.pwd";
+	private static final String PASSWORD_CONFIG = "mail.password";
 
 	private VelocityEngine velocityEngine;
 	private Session session;
@@ -67,7 +67,7 @@ public class EagleMailClient {
 	public EagleMailClient() {
 		this(new ConcurrentMapConfiguration());
 	}
-	
+
 	public EagleMailClient(AbstractConfiguration configuration) {
 		try {
 			ConcurrentMapConfiguration con = (ConcurrentMapConfiguration)configuration;
@@ -81,13 +81,13 @@ public class EagleMailClient {
 			if(Boolean.parseBoolean(config.getProperty(AUTH_CONFIG))){
 				session = Session.getDefaultInstance(config, new Authenticator() {
 					protected PasswordAuthentication getPasswordAuthentication() {
-						return new PasswordAuthentication(config.getProperty(USER_CONFIG), config.getProperty(PWD_CONFIG));
+						return new PasswordAuthentication(config.getProperty(USER_CONFIG), config.getProperty(PASSWORD_CONFIG));
 					}
 				});
 			}
 			else session = Session.getDefaultInstance(config, new Authenticator() {});
-			final String debugMode =  config.getProperty(DEBUG_CONFIG, "false");
-			final boolean debug =  Boolean.parseBoolean(debugMode);
+			final String debugMode = config.getProperty(DEBUG_CONFIG, "false");
+			final boolean debug = Boolean.parseBoolean(debugMode);
 			session.setDebug(debug);
 		} catch (Exception e) {
             LOG.error("Failed connect to smtp server",e);
@@ -111,7 +111,9 @@ public class EagleMailClient {
 			//msg.setRecipients(Message.RecipientType.BCC, InternetAddress.parse(DEFAULT_BCC_ADDRESS));
 			msg.setContent(content, "text/html;charset=utf-8");
 			LOG.info(String.format("Going to send mail: from[%s], to[%s], cc[%s], title[%s]", from, to, cc, title));
+
 			Transport.send(msg);
+
 			return true;
 		} catch (AddressException e) {
 			LOG.info("Send mail failed, got an AddressException: " + e.getMessage(), e);
@@ -123,7 +125,7 @@ public class EagleMailClient {
 	}
 
 	private boolean _send(String from,String to,String cc,String title,String content,List<MimeBodyPart> attachments){
-		MimeMessage  mail = new MimeMessage(session);
+		MimeMessage mail = new MimeMessage(session);
 		try {
 			mail.setFrom(new InternetAddress(from));
 			mail.setSubject(title);
@@ -135,13 +137,13 @@ public class EagleMailClient {
 				mail.setRecipients(Message.RecipientType.CC,
 						InternetAddress.parse(cc));
 			}
-			
+
 			//mail.setRecipients(Message.RecipientType.BCC, InternetAddress.parse(DEFAULT_BCC_ADDRESS));
 
 			MimeBodyPart mimeBodyPart = new MimeBodyPart();
 			mimeBodyPart.setContent(content,"text/html;charset=utf-8");
 
-			Multipart  multipart = new MimeMultipart();
+			Multipart multipart = new MimeMultipart();
 			multipart.addBodyPart(mimeBodyPart);
 
 			for(MimeBodyPart attachment:attachments){
@@ -151,7 +153,9 @@ public class EagleMailClient {
 			mail.setContent(multipart);
 //			mail.setContent(content, "text/html;charset=utf-8");
 			LOG.info(String.format("Going to send mail: from[%s], to[%s], cc[%s], title[%s]", from, to, cc, title));
+
 			Transport.send(mail);
+
 			return true;
 		} catch (AddressException e) {
 			LOG.info("Send mail failed, got an AddressException: " + e.getMessage(), e);
@@ -173,6 +177,7 @@ public class EagleMailClient {
 		try {
 			t = velocityEngine.getTemplate(BASE_PATH + templatePath);
 		} catch (ResourceNotFoundException ex) {
+
 		}
 		if (t == null) {
 			try {

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/8df78b18/eagle-security/eagle-security-hbase-securitylog/src/test/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hbase-securitylog/src/test/resources/application.conf b/eagle-security/eagle-security-hbase-securitylog/src/test/resources/application.conf
index 2fc60a5..0f11452 100644
--- a/eagle-security/eagle-security-hbase-securitylog/src/test/resources/application.conf
+++ b/eagle-security/eagle-security-hbase-securitylog/src/test/resources/application.conf
@@ -48,8 +48,13 @@
     "site" : "sandbox",
     "application": "hbaseSecurityLog",
     "dataJoinPollIntervalSec" : 30,
-    "mailHost" : "mailHost.com",
-    "mailSmtpPort":"25",
+    "mailHost" : "smtp.office365.com",
+    "mailSmtpPort":"587",
+    "mailSmtpAuth" : "true",
+    "mailSmtpUser" : "username",
+    "mailSmtpPassword" : "password",
+    #"mailSmtpSslEnable" : "true",
+    "mailSmtpTlsEnable" : "true",
     "mailDebug" : "true",
     "eagleService": {
       "host": "localhost",


[33/47] incubator-eagle git commit: EAGLE-333 Fix hive.ql.Parser cant parse complex SQL fix hive parser issues

Posted by mw...@apache.org.
EAGLE-333 Fix hive.ql.Parser cant parse complex SQL
fix hive parser issues

Author: @wangyum <wg...@gmail.com>
Reviewer: @yonzhang <yo...@gmail.com>

Closes: #230


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/11d4be76
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/11d4be76
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/11d4be76

Branch: refs/heads/master
Commit: 11d4be769b9cc1decd97f9d18f96236afbf153bf
Parents: 4627eb0
Author: yonzhang <yo...@gmail.com>
Authored: Thu Jun 16 15:17:51 2016 -0700
Committer: yonzhang <yo...@gmail.com>
Committed: Thu Jun 16 15:17:51 2016 -0700

----------------------------------------------------------------------
 .../apache/eagle/security/hive/ql/Parser.java   |  6 ++--
 .../eagle/security/hive/ql/TestParser.java      | 34 ++++++++++++++++++++
 2 files changed, 37 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/11d4be76/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/ql/Parser.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/ql/Parser.java b/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/ql/Parser.java
index 19ce003..f812d1e 100644
--- a/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/ql/Parser.java
+++ b/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/ql/Parser.java
@@ -303,7 +303,7 @@ public class Parser {
         }
         break;
 
-      case HiveParser.TOK_FUNCTION:
+      case HiveParser.TOK_FUNCTION: case HiveParser.TOK_FUNCTIONDI:
         // Traverse children to get TOK_TABLE_OR_COL
         Set<String> tempSet = new HashSet<>();
         parseTokFunction(asn, tempSet);
@@ -337,14 +337,14 @@ public class Parser {
         String colRealName = convAliasToReal(columnAliasMap, ast.getChild(0).getText());
         set.add(colRealName);
         break;
-      case HiveParser.TOK_FUNCTION:
+      // Not only HiveParser.TOK_FUNCTION, but also HiveParser.KW_ADD, HiveParser.KW_WHEN ...
+      default:
         for (int i = 0; i < ast.getChildCount(); i++) {
           ASTNode n = (ASTNode)ast.getChild(i);
           if (n != null) {
             parseTokFunction(n, set);
           }
         }
-        break;
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/11d4be76/eagle-security/eagle-security-hive/src/test/java/org/apache/eagle/security/hive/ql/TestParser.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hive/src/test/java/org/apache/eagle/security/hive/ql/TestParser.java b/eagle-security/eagle-security-hive/src/test/java/org/apache/eagle/security/hive/ql/TestParser.java
index 0bd994f..fd2296d 100644
--- a/eagle-security/eagle-security-hive/src/test/java/org/apache/eagle/security/hive/ql/TestParser.java
+++ b/eagle-security/eagle-security-hive/src/test/java/org/apache/eagle/security/hive/ql/TestParser.java
@@ -235,6 +235,40 @@ public class TestParser {
     }
 
     @Test
+    public void testCountDistinct() throws Exception {
+        String query =  "SELECT count(distinct id) FROM db.table1";
+        String expectedOperation = "SELECT";
+        Map<String, Set<String>> expectedTableColumn = new HashMap<String, Set<String>>();
+        Set<String> set = new HashSet<String>();
+        set.add("id");
+        expectedTableColumn.put("db.table1", set);
+        _testParsingQuery(query, expectedOperation, null, expectedTableColumn);
+    }
+
+    @Test
+    public void testComplextQuery() throws Exception {
+        String query =  "SELECT id, \n" +
+                "  SUM(CASE WHEN(type=1 AND ds < '2016-05-12' AND category IN ('1', '2')) " +
+                "    THEN 1 ELSE 0 end) / COUNT(DISTINCT id) AS col1, \n" +
+                "  CASE WHEN SUM(CASE WHEN type=1 THEN 1 ELSE 0 END)=0 THEN 0 " +
+                "    ELSE SUM(CASE WHEN type=1 AND DATEDIFF('2016-05-21', ds)=1 " +
+                "    THEN 1 ELSE 0 END) * DATEDIFF('2016-05-21', '2016-04-21') / " +
+                "    SUM(CASE WHEN type=1 THEN 1 ELSE 0 END) END AS col2 \n" +
+                "FROM db.table1 \n" +
+                "WHERE ds < '2016-05-21' \n" +
+                "GROUP BY id";
+        String expectedOperation = "SELECT";
+        Map<String, Set<String>> expectedTableColumn = new HashMap<String, Set<String>>();
+        Set<String> set = new HashSet<String>();
+        set.add("id");
+        set.add("ds");
+        set.add("type");
+        set.add("category");
+        expectedTableColumn.put("db.table1", set);
+        _testParsingQuery(query, expectedOperation, null, expectedTableColumn);
+    }
+
+    @Test
     public void testCreateTable() throws Exception {
         String query = "CREATE TABLE page_view(viewTime INT, userid BIGINT,\n" +
                 "                page_url STRING, referrer_url STRING,\n" +


[02/47] incubator-eagle git commit: EAGLE-271 Topology management in remote/local mode including start/stop operations

Posted by mw...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/criteria/impl/QueryCriteriaBuilder.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/criteria/impl/QueryCriteriaBuilder.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/criteria/impl/QueryCriteriaBuilder.java
index 9687cad..8975051 100644
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/criteria/impl/QueryCriteriaBuilder.java
+++ b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/criteria/impl/QueryCriteriaBuilder.java
@@ -107,7 +107,7 @@ public class QueryCriteriaBuilder implements CriteriaBuilder {
         root.addFrom(this.tableName);
 
         // WHERE timestamp in time range
-        Criterion where = new Criterion(new ColumnImpl(this.tableName, JdbcConstants.TIMESTAMP_COLUMN_NAME),query.getStartTime(), SqlEnum.GREATER_EQUAL)
+        Criterion where = new Criterion(new ColumnImpl(this.tableName, JdbcConstants.TIMESTAMP_COLUMN_NAME), query.getStartTime(), SqlEnum.GREATER_EQUAL)
                         .and(new Criterion(new ColumnImpl(this.tableName, JdbcConstants.TIMESTAMP_COLUMN_NAME),query.getEndTime(), SqlEnum.LESS_THAN));
         ORExpression expression = searchCondition.getQueryExpression();
         if(expression!=null){

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java
index 15810b2..b98d881 100644
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java
+++ b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java
@@ -147,7 +147,7 @@ public class JdbcEntityDefinitionManager {
     }
 
     //================================================
-    // Intially bind basic java types with SQL types
+    // Initially bind basic java types with SQL types
     //================================================
     static {
         registerJdbcType(String.class, Types.LONGVARCHAR);

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/pom.xml b/eagle-core/pom.xml
index 7debe69..a236739 100644
--- a/eagle-core/pom.xml
+++ b/eagle-core/pom.xml
@@ -42,5 +42,6 @@
    		<module>eagle-machinelearning</module>
         <module>eagle-embed</module>
         <module>eagle-metric</module>
+        <module>eagle-application-management</module>
     </modules>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-docs/images/appManager/admin-page.png
----------------------------------------------------------------------
diff --git a/eagle-docs/images/appManager/admin-page.png b/eagle-docs/images/appManager/admin-page.png
new file mode 100644
index 0000000..961487c
Binary files /dev/null and b/eagle-docs/images/appManager/admin-page.png differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-docs/images/appManager/start-topology-1.png
----------------------------------------------------------------------
diff --git a/eagle-docs/images/appManager/start-topology-1.png b/eagle-docs/images/appManager/start-topology-1.png
new file mode 100644
index 0000000..29274a0
Binary files /dev/null and b/eagle-docs/images/appManager/start-topology-1.png differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-docs/images/appManager/start-topology-2.png
----------------------------------------------------------------------
diff --git a/eagle-docs/images/appManager/start-topology-2.png b/eagle-docs/images/appManager/start-topology-2.png
new file mode 100644
index 0000000..440aec1
Binary files /dev/null and b/eagle-docs/images/appManager/start-topology-2.png differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-docs/images/appManager/stop-topology-1.png
----------------------------------------------------------------------
diff --git a/eagle-docs/images/appManager/stop-topology-1.png b/eagle-docs/images/appManager/stop-topology-1.png
new file mode 100644
index 0000000..4b28192
Binary files /dev/null and b/eagle-docs/images/appManager/stop-topology-1.png differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-docs/images/appManager/stop-topology-2.png
----------------------------------------------------------------------
diff --git a/eagle-docs/images/appManager/stop-topology-2.png b/eagle-docs/images/appManager/stop-topology-2.png
new file mode 100644
index 0000000..88f9f6d
Binary files /dev/null and b/eagle-docs/images/appManager/stop-topology-2.png differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-docs/images/appManager/stop-topology-3.png
----------------------------------------------------------------------
diff --git a/eagle-docs/images/appManager/stop-topology-3.png b/eagle-docs/images/appManager/stop-topology-3.png
new file mode 100644
index 0000000..3f593b2
Binary files /dev/null and b/eagle-docs/images/appManager/stop-topology-3.png differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-docs/images/appManager/topology-configuration-1.png
----------------------------------------------------------------------
diff --git a/eagle-docs/images/appManager/topology-configuration-1.png b/eagle-docs/images/appManager/topology-configuration-1.png
new file mode 100644
index 0000000..fae6b84
Binary files /dev/null and b/eagle-docs/images/appManager/topology-configuration-1.png differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-docs/images/appManager/topology-configuration-2.png
----------------------------------------------------------------------
diff --git a/eagle-docs/images/appManager/topology-configuration-2.png b/eagle-docs/images/appManager/topology-configuration-2.png
new file mode 100644
index 0000000..1d333a5
Binary files /dev/null and b/eagle-docs/images/appManager/topology-configuration-2.png differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-docs/images/appManager/topology-configuration-save.png
----------------------------------------------------------------------
diff --git a/eagle-docs/images/appManager/topology-configuration-save.png b/eagle-docs/images/appManager/topology-configuration-save.png
new file mode 100644
index 0000000..45ca922
Binary files /dev/null and b/eagle-docs/images/appManager/topology-configuration-save.png differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-docs/images/appManager/topology-description.png
----------------------------------------------------------------------
diff --git a/eagle-docs/images/appManager/topology-description.png b/eagle-docs/images/appManager/topology-description.png
new file mode 100644
index 0000000..57ac504
Binary files /dev/null and b/eagle-docs/images/appManager/topology-description.png differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-docs/images/appManager/topology-execution.png
----------------------------------------------------------------------
diff --git a/eagle-docs/images/appManager/topology-execution.png b/eagle-docs/images/appManager/topology-execution.png
new file mode 100644
index 0000000..6b20bdc
Binary files /dev/null and b/eagle-docs/images/appManager/topology-execution.png differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-docs/images/appManager/topology-monitor.png
----------------------------------------------------------------------
diff --git a/eagle-docs/images/appManager/topology-monitor.png b/eagle-docs/images/appManager/topology-monitor.png
new file mode 100644
index 0000000..bd007be
Binary files /dev/null and b/eagle-docs/images/appManager/topology-monitor.png differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-docs/tutorial/application_manager_tutorial.md
----------------------------------------------------------------------
diff --git a/eagle-docs/tutorial/application_manager_tutorial.md b/eagle-docs/tutorial/application_manager_tutorial.md
new file mode 100644
index 0000000..5083111
--- /dev/null
+++ b/eagle-docs/tutorial/application_manager_tutorial.md
@@ -0,0 +1,109 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+> Application manager aims to manage topology status on EAGLE UI. Users can easily start/start topologies remotely or locally without shell commands.
+
+This tutorial will go through all parts of appliaction manager and then give an example to use it. 
+
+### Design
+Briefly speaking, Application manager consists of a deamon scheduler and the application manager. The scheduler loads user operations(start/stop), and the applicaiton manager is responsible to execute these operations. For more details, please refer to [here](https://cwiki.apache.org/confluence/display/EAG/Application+Management)
+
+### Manual
+
+#### Step 1: configure the scheduler
+The configuration file `eagle-scheduler.conf` defines scheduler parameters, topology execution platform settings and parts of topology settings. Here are some important ones:
+
+* `envContextConfig.env`
+
+   application execution platform. Default value is storm
+   
+* `envContextConfig.url`
+   
+   execution platform http url. Default is "http://sandbox.hortonworks.com:8744"
+   
+* `envContextConfig.nimbusHost`
+  
+   Storm nimbus host. Default is "sandbox.hortonworks.com"
+   
+* `envContextConfig.nimbusThriftPort`
+   
+   Default is 6627
+   
+* `envContextConfig.jarFile`
+
+   Storm fat jar path. The only setting users must specify "/dir-to-jar/eagle-topology-0.3.0-incubating-assembly.jar"
+   
+After the configuration is ready, start Eagle service `bin/eagle-service.sh start`. 
+  
+#### Step 2: add topologies on UI
+1. First of all, go to admin page 
+   ![admin page](/images/appManager/admin-page.png)
+   ![admin page](/images/appManager/topology-monitor.png)
+    
+2. Go to management page, and create a topology description. There are three required fields
+    * name: topology name
+    * type: topology type [CLASS, DYNAMIC]
+    * execution entry: either the class which implement interface TopologyExecutable or eagle [DSL](https://github.com/apache/incubator-eagle/blob/master/eagle-assembly/src/main/conf/sandbox-hadoopjmx-pipeline.conf) based topology definition
+   ![admin page](/images/appManager/topology-description.png)
+   
+3. Back to monitoring page, and choose the site/application to deploy the topology 
+   ![admin page](/images/appManager/topology-execution.png)
+   
+4. Go to site page, and edit site->application and add some new configurations. Blow are some example configurations for [site=sandbox, applicatoin=hbaseSecurityLog]
+   `These configurations have a higher priority than those in eagle-scheduler.conf`
+   
+           classification.hbase.zookeeper.property.clientPort=2181
+           classification.hbase.zookeeper.quorum=sandbox.hortonworks.com
+           # platform related configurations
+           app.envContextConfig.env=storm
+           app.envContextConfig.mode=cluster
+           # data source related configurations
+           app.dataSourceConfig.topic=sandbox_hbase_security_log
+           app.dataSourceConfig.zkConnection=sandbox.hortonworks.com:2181
+           app.dataSourceConfig.zkConnectionTimeoutMS=15000
+           app.dataSourceConfig.brokerZkPath=/brokers
+           app.dataSourceConfig.fetchSize=1048586
+           app.dataSourceConfig.transactionZKServers=sandbox.hortonworks.com
+           app.dataSourceConfig.transactionZKPort=2181
+           app.dataSourceConfig.transactionZKRoot=/consumers
+           app.dataSourceConfig.consumerGroupId=eagle.hbasesecurity.consumer
+           app.dataSourceConfig.transactionStateUpdateMS=2000
+           app.dataSourceConfig.deserializerClass=org.apache.eagle.security.hbase.parse.HbaseAuditLogKafkaDeserializer
+           # service related configurations
+           app.eagleProps.site=sandbox
+           app.eagleProps.application=hbaseSecurityLog
+           app.eagleProps.dataJoinPollIntervalSec=30
+           app.eagleProps.mailHost=atom.corp.ebay.com
+           app.eagleProps.mailSmtpPort=25
+           app.eagleProps.mailDebug=true
+           app.eagleProps.eagleService.host=localhost
+           app.eagleProps.eagleService.port=9099
+           app.eagleProps.eagleService.username=admin
+           app.eagleProps.eagleService.password=secret
+   ![admin page](/images/appManager/topology-configuration-1.png)
+   ![admin page](/images/appManager/topology-configuration-2.png)
+   
+5. Go to monitoring page, and start topologies
+   ![admin page](/images/appManager/start-topology-1.png)
+   ![admin page](/images/appManager/start-topology-2.png)
+   
+6. stop topologies on monitoring page
+   ![admin page](/images/appManager/stop-topology-1.png)
+   ![admin page](/images/appManager/stop-topology-2.png)
+   ![admin page](/images/appManager/stop-topology-3.png)
+
+ 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-docs/tutorial/getting_started_with_eagle.md
----------------------------------------------------------------------
diff --git a/eagle-docs/tutorial/getting_started_with_eagle.md b/eagle-docs/tutorial/getting_started_with_eagle.md
index 37e0741..0e83a01 100644
--- a/eagle-docs/tutorial/getting_started_with_eagle.md
+++ b/eagle-docs/tutorial/getting_started_with_eagle.md
@@ -1,5 +1,4 @@
 <!--
-{% comment %}
 Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
@@ -14,5 +13,4 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-{% endcomment %}
 -->
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-hadoop-metric/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-hadoop-metric/pom.xml b/eagle-hadoop-metric/pom.xml
index fda911f..24f7a3b 100644
--- a/eagle-hadoop-metric/pom.xml
+++ b/eagle-hadoop-metric/pom.xml
@@ -32,6 +32,11 @@
             <artifactId>eagle-stream-process-api</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.eagle</groupId>
+            <artifactId>eagle-stream-application-manager</artifactId>
+            <version>${project.version}</version>
+        </dependency>
     </dependencies>
 
     <build>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-hadoop-metric/src/main/java/org/apache/eagle/hadoop/metric/HadoopJmxMetricMonitoringTopology.java
----------------------------------------------------------------------
diff --git a/eagle-hadoop-metric/src/main/java/org/apache/eagle/hadoop/metric/HadoopJmxMetricMonitoringTopology.java b/eagle-hadoop-metric/src/main/java/org/apache/eagle/hadoop/metric/HadoopJmxMetricMonitoringTopology.java
new file mode 100644
index 0000000..044a48f
--- /dev/null
+++ b/eagle-hadoop-metric/src/main/java/org/apache/eagle/hadoop/metric/HadoopJmxMetricMonitoringTopology.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.hadoop.metric;
+
+
+import com.typesafe.config.Config;
+import org.apache.eagle.datastream.ExecutionEnvironments;
+import org.apache.eagle.datastream.core.StreamProducer;
+import org.apache.eagle.datastream.storm.StormExecutionEnvironment;
+import org.apache.eagle.stream.application.TopologyExecutable;
+
+public class HadoopJmxMetricMonitoringTopology implements TopologyExecutable {
+    @Override
+    public void submit(String topology, Config config) {
+        StormExecutionEnvironment env = ExecutionEnvironments.getStorm(config);
+        String streamName = "hadoopJmxMetricEventStream";
+        StreamProducer sp = env.fromSpout(Utils.createProvider(env.getConfig())).withOutputFields(2).nameAs(streamName);
+        sp.alertWithConsumer(streamName, "hadoopJmxMetricAlertExecutor");
+        env.execute();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-hadoop-metric/src/main/resources/hadoop-metric-init.sh
----------------------------------------------------------------------
diff --git a/eagle-hadoop-metric/src/main/resources/hadoop-metric-init.sh b/eagle-hadoop-metric/src/main/resources/hadoop-metric-init.sh
index dbcb9b8..849f462 100755
--- a/eagle-hadoop-metric/src/main/resources/hadoop-metric-init.sh
+++ b/eagle-hadoop-metric/src/main/resources/hadoop-metric-init.sh
@@ -34,7 +34,7 @@ curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:a
            "application":"hadoopJmxMetricDataSource"
         },
         "enabled": true,
-        "config": "{\"druid\": {\"coordinator\": \"coordinatorHost:port\", \"broker\": \"brokerHost:port\"}}"
+        "config": "web.druid.coordinator=coordinatorHost:port\nweb.druid.broker=brokerHost:port"
      }
   ]
   '

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/resolver/MetadataAccessConfigRepo.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/resolver/MetadataAccessConfigRepo.java b/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/resolver/MetadataAccessConfigRepo.java
index fa178c9..1292fb8 100644
--- a/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/resolver/MetadataAccessConfigRepo.java
+++ b/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/resolver/MetadataAccessConfigRepo.java
@@ -19,9 +19,7 @@
 package org.apache.eagle.security.resolver;
 
 
-import com.typesafe.config.Config;
-import com.typesafe.config.ConfigFactory;
-import com.typesafe.config.ConfigValue;
+import com.typesafe.config.*;
 import org.apache.eagle.alert.entity.SiteApplicationServiceEntity;
 import org.apache.eagle.common.config.EagleConfigConstants;
 import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
@@ -47,11 +45,14 @@ public class MetadataAccessConfigRepo {
         if (list == null || list.size() == 0)
             throw new Exception("Config is empty for site=" + siteId +" application=" + application + ".");
         String originalConfigStr = list.get(0).getConfig();
-        Config originalConfig = ConfigFactory.parseString(originalConfigStr);
-        if(!originalConfig.hasPath(EagleConfigConstants.WEB_CONFIG)) {
-            throw new Exception("Fail to get WEB_CONFIG configurations for data classification");
+        ConfigParseOptions options = ConfigParseOptions.defaults()
+                .setSyntax(ConfigSyntax.PROPERTIES)
+                .setAllowMissing(false);
+        Config originalConfig = ConfigFactory.parseString(originalConfigStr, options);
+        if(!originalConfig.hasPath(EagleConfigConstants.CLASSIFICATION_CONFIG)) {
+            throw new Exception("Fail to get CLASSIFICATION_CONFIG for data classification");
         }
-        return originalConfig.getConfig(EagleConfigConstants.WEB_CONFIG);
+        return originalConfig.getConfig(EagleConfigConstants.CLASSIFICATION_CONFIG);
     }
 
     public Configuration convert(Config originalConfig) throws Exception {

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/util/AbstractResourceSensitivityPollingJob.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/util/AbstractResourceSensitivityPollingJob.java b/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/util/AbstractResourceSensitivityPollingJob.java
index 2d4af7f..8cd1317 100644
--- a/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/util/AbstractResourceSensitivityPollingJob.java
+++ b/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/util/AbstractResourceSensitivityPollingJob.java
@@ -36,7 +36,7 @@ public class AbstractResourceSensitivityPollingJob {
     protected <R extends TaggedLogAPIEntity> List<R> load(JobDataMap jobDataMap, String service) throws Exception {
         Map<String, Object> map = (Map<String, Object>) jobDataMap.get(EagleConfigConstants.EAGLE_SERVICE);
         String eagleServiceHost = (String) map.get(EagleConfigConstants.HOST);
-        Integer eagleServicePort = (Integer) map.get(EagleConfigConstants.PORT);
+        Integer eagleServicePort = Integer.parseInt(map.get(EagleConfigConstants.PORT).toString());
         String username = map.containsKey(EagleConfigConstants.USERNAME) ? (String) map.get(EagleConfigConstants.USERNAME) : null;
         String password = map.containsKey(EagleConfigConstants.PASSWORD) ? (String) map.get(EagleConfigConstants.PASSWORD) : null;
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/util/ExternalDataJoiner.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/util/ExternalDataJoiner.java b/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/util/ExternalDataJoiner.java
index 79a44c0..e5e4ae0 100644
--- a/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/util/ExternalDataJoiner.java
+++ b/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/util/ExternalDataJoiner.java
@@ -19,6 +19,7 @@ package org.apache.eagle.security.util;
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.eagle.common.config.EagleConfigConstants;
 import org.quartz.Job;
 import org.quartz.JobBuilder;
 import org.quartz.JobDataMap;
@@ -77,19 +78,20 @@ public class ExternalDataJoiner {
 	
 	public void start(){
 		// for job
-		String group = String.format("%s.%s.%s", QUARTZ_GROUP_NAME, jobDataMap.getString("site"), jobDataMap.getString("dataSource"));
+		String group = String.format("%s.%s.%s", QUARTZ_GROUP_NAME, jobDataMap.getString(EagleConfigConstants.SITE), jobDataMap.getString(EagleConfigConstants.APPLICATION));
 		JobDetail job = JobBuilder.newJob(jobCls)
 		     .withIdentity(jobCls.getName() + ".job", group)
-		     .setJobData(jobDataMap)
+		     .usingJobData(jobDataMap)
 		     .build();
 		
 		// for trigger
 		Object interval = jobDataMap.get(DATA_JOIN_POLL_INTERVALSEC);
+        int dataJoinPollIntervalSec = (interval == null ? defaultIntervalSeconds : Integer.parseInt(interval.toString()));
 		Trigger trigger = TriggerBuilder.newTrigger() 
 			  .withIdentity(jobCls.getName() + ".trigger", QUARTZ_GROUP_NAME) 
 		      .startNow() 
 		      .withSchedule(SimpleScheduleBuilder.simpleSchedule() 
-		          .withIntervalInSeconds(interval == null ? defaultIntervalSeconds : ((Integer)interval).intValue()) 
+		          .withIntervalInSeconds(dataJoinPollIntervalSec)
 		          .repeatForever()) 
 		      .build(); 
 		try{

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-security/eagle-security-common/src/test/java/org/apache/eagle/security/crawler/audit/TestMetaDataAccessConfigRepo.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-common/src/test/java/org/apache/eagle/security/crawler/audit/TestMetaDataAccessConfigRepo.java b/eagle-security/eagle-security-common/src/test/java/org/apache/eagle/security/crawler/audit/TestMetaDataAccessConfigRepo.java
index 146e757..3306c40 100644
--- a/eagle-security/eagle-security-common/src/test/java/org/apache/eagle/security/crawler/audit/TestMetaDataAccessConfigRepo.java
+++ b/eagle-security/eagle-security-common/src/test/java/org/apache/eagle/security/crawler/audit/TestMetaDataAccessConfigRepo.java
@@ -19,9 +19,7 @@
 package org.apache.eagle.security.crawler.audit;
 
 
-import com.typesafe.config.Config;
-import com.typesafe.config.ConfigFactory;
-import com.typesafe.config.ConfigValue;
+import com.typesafe.config.*;
 import junit.framework.Assert;
 import org.apache.eagle.common.config.EagleConfigConstants;
 import org.junit.Test;
@@ -32,24 +30,35 @@ public class TestMetaDataAccessConfigRepo {
 
     @Test
     public void testStringToConfig() {
-        String hdfsConfigStr = "web.fs.defaultFS: \"hdfs://sandbox.hortonworks.com:8020\"";
-        Config config = ConfigFactory.parseString(hdfsConfigStr);
-        Assert.assertTrue(config.hasPath(EagleConfigConstants.WEB_CONFIG));
+        String hdfsConfigStr = "classification.fs.defaultFS=hdfs://sandbox.hortonworks.com:8020";
+        ConfigParseOptions options = ConfigParseOptions.defaults()
+                .setSyntax(ConfigSyntax.PROPERTIES)
+                .setAllowMissing(false);
+        Config config = ConfigFactory.parseString(hdfsConfigStr, options);
+        Assert.assertTrue(config.hasPath(EagleConfigConstants.CLASSIFICATION_CONFIG));
 
-        String hiveConfigStr = "web.accessType:\"metastoredb_jdbc\",web.password:\"hive\",web.user:\"hive\",web.jdbcDriverClassName:\"com.mysql.jdbc.Driver\",web.jdbcUrl:\"jdbc:mysql://sandbox.hortonworks.com/hive?createDatabaseIfNotExist=true\"";
-        config = ConfigFactory.parseString(hiveConfigStr);
+        String hiveConfigStr = "classification.accessType=metastoredb_jdbc\nclassification.password=hive\nclassification.user=hive\nclassification.jdbcDriverClassName=com.mysql.jdbc.Driver\nclassification.jdbcUrl=jdbc:mysql://sandbox.hortonworks.com/hive?createDatabaseIfNotExist=true";
+        config = ConfigFactory.parseString(hiveConfigStr, options);
         Config hiveConfig = null;
-        if(config.hasPath(EagleConfigConstants.WEB_CONFIG)) {
-            hiveConfig = config.getConfig(EagleConfigConstants.WEB_CONFIG);
+        if(config.hasPath(EagleConfigConstants.CLASSIFICATION_CONFIG)) {
+            hiveConfig = config.getConfig(EagleConfigConstants.CLASSIFICATION_CONFIG);
             Assert.assertTrue(hiveConfig.getString("accessType").equals("metastoredb_jdbc"));
         }
 
-        String hbaseConfigStr = "web.hbase.zookeeper.property.clientPort: \"2181\", web.hbase.zookeeper.quorum: \"localhost\"";
-        config = ConfigFactory.parseString(hbaseConfigStr);
+        String hbaseConfigStr = "classification.hbase.zookeeper.property.clientPort=2181\nclassification.hbase.zookeeper.quorum=localhost";
+        config = ConfigFactory.parseString(hbaseConfigStr, options);
         Config hbaseConfig = null;
-        if(config.hasPath(EagleConfigConstants.WEB_CONFIG)) {
-            hbaseConfig = config.getConfig(EagleConfigConstants.WEB_CONFIG);
+        if(config.hasPath(EagleConfigConstants.CLASSIFICATION_CONFIG)) {
+            hbaseConfig = config.getConfig(EagleConfigConstants.CLASSIFICATION_CONFIG);
             Assert.assertTrue(hbaseConfig.getString("hbase.zookeeper.property.clientPort").equals("2181"));
         }
+
+        String appConfigStr = "classification.hbase.zookeeper.property.clientPort=2181\nclassification.hbase.zookeeper.quorum=sandbox.hortonworks.com\n\napp.envContextConfig.env=storm\napp.envContextConfig.mode=cluster\napp.dataSourceConfig.topic=sandbox_hbase_security_log\napp.dataSourceConfig.zkConnection=127.0.0.1:2181\napp.dataSourceConfig.zkConnectionTimeoutMS=15000\napp.dataSourceConfig.brokerZkPath=/brokers\napp.dataSourceConfig.fetchSize=1048586\napp.dataSourceConfig.transactionZKServers=127.0.0.1\napp.dataSourceConfig.transactionZKPort=2181\napp.dataSourceConfig.transactionZKRoot=/consumers\napp.dataSourceConfig.consumerGroupId=eagle.hbasesecurity.consumer\napp.dataSourceConfig.transactionStateUpdateMS=2000\napp.dataSourceConfig.deserializerClass=org.apache.eagle.security.hbase.parse.HbaseAuditLogKafkaDeserializer\napp.eagleProps.site=sandbox\napp.eagleProps.application=hbaseSecurityLog\napp.eagleProps.dataJoinPollIntervalSec=30\napp.eagleProps.mailHost=mailHost.com\napp.ea
 gleProps.mailSmtpPort=25\napp.eagleProps.mailDebug=true\napp.eagleProps.eagleService.host=localhost\napp.eagleProps.eagleService.port=9099\napp.eagleProps.eagleService.username=admin\napp.eagleProps.eagleService.password=secret";
+        config = ConfigFactory.parseString(appConfigStr, options);
+        Config appConfig = null;
+        if(config.hasPath(EagleConfigConstants.APP_CONFIG)) {
+            appConfig = config.getConfig(EagleConfigConstants.APP_CONFIG);
+            Assert.assertTrue(appConfig.getString("envContextConfig.mode").equals("cluster"));
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-security/eagle-security-hbase-securitylog/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hbase-securitylog/pom.xml b/eagle-security/eagle-security-hbase-securitylog/pom.xml
index 1f4bfc8..9e8fd72 100644
--- a/eagle-security/eagle-security-hbase-securitylog/pom.xml
+++ b/eagle-security/eagle-security-hbase-securitylog/pom.xml
@@ -36,5 +36,10 @@
             <artifactId>eagle-security-common</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.eagle</groupId>
+            <artifactId>eagle-stream-application-manager</artifactId>
+            <version>${project.version}</version>
+        </dependency>
     </dependencies>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-security/eagle-security-hbase-securitylog/src/main/java/org/apache/eagle/security/hbase/HbaseAuditLogMonitoringTopology.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hbase-securitylog/src/main/java/org/apache/eagle/security/hbase/HbaseAuditLogMonitoringTopology.java b/eagle-security/eagle-security-hbase-securitylog/src/main/java/org/apache/eagle/security/hbase/HbaseAuditLogMonitoringTopology.java
new file mode 100644
index 0000000..0077912
--- /dev/null
+++ b/eagle-security/eagle-security-hbase-securitylog/src/main/java/org/apache/eagle/security/hbase/HbaseAuditLogMonitoringTopology.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.security.hbase;
+
+
+import com.typesafe.config.Config;
+import com.typesafe.config.ConfigFactory;
+import org.apache.eagle.dataproc.impl.storm.kafka.KafkaSourcedSpoutProvider;
+import org.apache.eagle.datastream.ExecutionEnvironments;
+import org.apache.eagle.datastream.storm.StormExecutionEnvironment;
+import org.apache.eagle.security.hbase.sensitivity.HbaseResourceSensitivityDataJoinExecutor;
+import org.apache.eagle.stream.application.TopologyExecutable;
+
+
+public class HbaseAuditLogMonitoringTopology implements TopologyExecutable {
+    @Override
+    public void submit(String application, Config config) {
+        //Config baseConfig = ConfigFactory.load();
+        //config = (config != null) ? config.withFallback(baseConfig): baseConfig;
+        StormExecutionEnvironment env = ExecutionEnvironments.getStorm(config);
+        env.fromSpout(new KafkaSourcedSpoutProvider()).withOutputFields(1).nameAs("kafkaMsgConsumer")
+                .flatMap(new HbaseResourceSensitivityDataJoinExecutor())
+                .alertWithConsumer("hbaseSecurityLogEventStream", "hbaseSecurityLogAlertExecutor");
+        env.execute();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-security/eagle-security-hbase-securitylog/src/main/java/org/apache/eagle/security/hbase/parse/HbaseAuditLogKafkaDeserializer.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hbase-securitylog/src/main/java/org/apache/eagle/security/hbase/parse/HbaseAuditLogKafkaDeserializer.java b/eagle-security/eagle-security-hbase-securitylog/src/main/java/org/apache/eagle/security/hbase/parse/HbaseAuditLogKafkaDeserializer.java
index 6d6f5c4..ff98ed9 100644
--- a/eagle-security/eagle-security-hbase-securitylog/src/main/java/org/apache/eagle/security/hbase/parse/HbaseAuditLogKafkaDeserializer.java
+++ b/eagle-security/eagle-security-hbase-securitylog/src/main/java/org/apache/eagle/security/hbase/parse/HbaseAuditLogKafkaDeserializer.java
@@ -40,26 +40,23 @@ public class HbaseAuditLogKafkaDeserializer implements SpoutKafkaMessageDeserial
         String logLine = new String(arg0);
 
         HbaseAuditLogParser parser = new HbaseAuditLogParser();
-        HbaseAuditLogObject entity = null;
         try{
-            entity = parser.parse(logLine);
+            HbaseAuditLogObject entity = parser.parse(logLine);
+            if(entity == null) return null;
+
+            Map<String, Object> map = new TreeMap<String, Object>();
+            map.put("action", entity.action);
+            map.put("host", entity.host);
+            map.put("status", entity.status);
+            map.put("request", entity.request);
+            map.put("scope", entity.scope);
+            map.put("user", entity.user);
+            map.put("timestamp", entity.timestamp);
+            return map;
         }catch(Exception ex){
-            LOG.error("Failing parse audit log message", ex);
-        }
-        if(entity == null){
-            LOG.warn("Event ignored as it can't be correctly parsed, the log is ", logLine);
+            LOG.error("Failing parse audit log:" + logLine, ex);
             return null;
         }
-        Map<String, Object> map = new TreeMap<String, Object>();
-        map.put("action", entity.action);
-        map.put("host", entity.host);
-        map.put("status", entity.status);
-        map.put("request", entity.request);
-        map.put("scope", entity.scope);
-        map.put("user", entity.user);
-        map.put("timestamp", entity.timestamp);
-
-        return map;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-security/eagle-security-hbase-securitylog/src/main/java/org/apache/eagle/security/hbase/parse/HbaseAuditLogParser.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hbase-securitylog/src/main/java/org/apache/eagle/security/hbase/parse/HbaseAuditLogParser.java b/eagle-security/eagle-security-hbase-securitylog/src/main/java/org/apache/eagle/security/hbase/parse/HbaseAuditLogParser.java
index 6fdb03f..0504ed0 100644
--- a/eagle-security/eagle-security-hbase-securitylog/src/main/java/org/apache/eagle/security/hbase/parse/HbaseAuditLogParser.java
+++ b/eagle-security/eagle-security-hbase-securitylog/src/main/java/org/apache/eagle/security/hbase/parse/HbaseAuditLogParser.java
@@ -18,6 +18,7 @@
 package org.apache.eagle.security.hbase.parse;
 
 import java.io.Serializable;
+import java.text.ParseException;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.regex.Matcher;
@@ -36,111 +37,72 @@ public class HbaseAuditLogParser implements Serializable {
     private final static int LOGDATE_INDEX = 1;
     private final static int LOGLEVEL_INDEX = 2;
     private final static int LOGATTRS_INDEX = 3;
-    private final static String LOGDATE="logdate";
-    private final static String LOGLEVEL="loglevel";
-    private final static String CONTROLLER = "SecurityLogger.org.apache.hadoop.hbase.security.access.AccessController";
-    private final static String REASON = "reason";
-    private final static String ADDRESS = "address";
-    private final static String REQUEST = "request";
     private final static String ALLOWED = "allowed";
     private final static String DENIED = "denied";
-    private final static String USER = "user";
-    private final static String SCOPE = "scope";
-    private final static String FAMILY = "family";
-    private final static String ACTION = "action";
     private final static Pattern loggerPattern = Pattern.compile("^([\\d\\s\\-:,]+)\\s+(\\w+)\\s+(.*)");
-    private final static Pattern loggerAttributesPattern = Pattern.compile("([\\w\\.]+:[/\\w\\.\\s\\\\]+);\\s+");
-    private final static Pattern loggerContextPattern = Pattern.compile("\\((.*)\\)");
+    private final static Pattern loggerContextPattern = Pattern.compile("\\w+:\\s*\\(user=(.*),\\s*scope=(.*),\\s*family=(.*),\\s*action=(.*)\\)");
     private final static Pattern allowedPattern = Pattern.compile(ALLOWED);
 
 
-    public HbaseAuditLogObject parse(String logLine) throws Exception {
-        HbaseAuditLogObject ret = new HbaseAuditLogObject();
-        Map<String, String> auditMap = parseAudit(logLine);
-        if(auditMap == null) return null;
-
-        String status = auditMap.get(CONTROLLER);
-        if(StringUtils.isNotEmpty(status)) {
-            ret.status = allowedPattern.matcher(status).find() ? ALLOWED : DENIED;
-        }
-
-        String scope = auditMap.get(SCOPE);
-        String family = auditMap.get(FAMILY);
-        if(StringUtils.isNotEmpty(family)) {
-            if(!scope.contains(":")) scope = "default:" + scope;
-            scope = String.format("%s:%s", scope, family);
-        }
-        String ip = auditMap.get(ADDRESS);
-        if(StringUtils.isNotEmpty(ip)) {
-            ret.host = ip.substring(1);
-        }
-        ret.scope = scope;
-        ret.action = auditMap.get(ACTION);
-        ret.user = LogParseUtil.parseUserFromUGI(auditMap.get(USER));
-        ret.request = auditMap.get(REQUEST);
-        ret.timestamp = DateTimeUtil.humanDateToMilliseconds(auditMap.get(LOGDATE));
-        return ret;
-    }
-
-    Map<String, String> parseContext(String logLine) {
-        Matcher loggerMatcher = loggerContextPattern.matcher(logLine);
-        Map<String, String> ret = new HashMap<>();
-        if(loggerMatcher.find()) {
-            String context = loggerMatcher.group(1);
-            String [] kvs = context.split(",");
-            for(String kv : kvs){
-                String [] vals = kv.split("=");
-                if(vals.length > 1) {
-                    ret.put(vals[0].trim(), vals[1].trim());
-                } else {
-                    ret.put(vals[0].trim(), "");
-                }
-            }
-        }
-        return ret;
-    }
-
-    Map<String, String> parseAttribute(String logLine) {
-        Map<String, String> ret = new HashMap<>();
-        Matcher loggerMatcher = loggerAttributesPattern.matcher(logLine);
-        while(loggerMatcher.find()) {
-            String kv = loggerMatcher.group(1);
-            String[] kvs = kv.split(":");
-            if(kvs.length > 1) {
-                ret.put(kvs[0].trim(), kvs[1].trim());
-            } else {
-                ret.put(kvs[0].trim(), "");
-            }
-        }
-        return ret;
-    }
+    public HbaseAuditLogObject parse(String logLine) {
+        if(logLine == null || logLine.isEmpty()) return null;
 
-    Map<String, String> parseAudit(String logLine) {
-        Map<String, String> ret = null;
+        HbaseAuditLogObject ret = new HbaseAuditLogObject();
+        String timestamp = "";
+        String user = "";
+        String scope = "";
+        String action = "";
+        String ip = "";
+        String request = "";
+        String family = "";
+        String context = "";
 
         Matcher loggerMatcher = loggerPattern.matcher(logLine);
         if(loggerMatcher.find()) {
             try {
-                ret = new HashMap<>();
-                ret.put(LOGDATE, loggerMatcher.group(LOGDATE_INDEX));
-                ret.put(LOGLEVEL, loggerMatcher.group(LOGLEVEL_INDEX));
-                String logAttr = loggerMatcher.group(LOGATTRS_INDEX);
-                Map<String, String> attrs = parseAttribute(logAttr);
-                ret.put(CONTROLLER, attrs.get(CONTROLLER));
-                ret.put(REASON, attrs.get(REASON));
-                ret.put(ADDRESS, attrs.get(ADDRESS));
-                ret.put(REQUEST, attrs.get(REQUEST));
-                Map<String, String> contextMap = parseContext(logAttr);
-                ret.put(USER, contextMap.get(USER));
-                ret.put(SCOPE, contextMap.get(SCOPE));
-                ret.put(FAMILY, contextMap.get(FAMILY));
-                ret.put(ACTION, contextMap.get(ACTION));
-            } catch(IndexOutOfBoundsException e) {
+                timestamp = loggerMatcher.group(LOGDATE_INDEX);
+                String [] attrs = loggerMatcher.group(LOGATTRS_INDEX).split(";");
+                ret.status = allowedPattern.matcher(attrs[0]).find() ? ALLOWED : DENIED;
+                try {
+                    ip = attrs[2].split(":")[1].trim();
+                } catch (Exception e) {
+                    ip = "";
+                }
+                try {
+                    request = attrs[3].split(":")[1].trim();
+                } catch (Exception e) {
+                    request = "";
+                }
+                try {
+                    context = attrs[4].trim();
+                } catch (Exception e) {
+                    context = "";
+                }
+                Matcher contextMatcher = loggerContextPattern.matcher(context);
+                if(contextMatcher.find()) {
+                    user = contextMatcher.group(1);
+                    scope = contextMatcher.group(2);
+                    family = contextMatcher.group(3);
+                    action = contextMatcher.group(4);
+                }
+                if(StringUtils.isNotEmpty(family)) {
+                    if(!scope.contains(":")) scope = "default:" + scope;
+                    scope = String.format("%s:%s", scope, family);
+                }
+                if(StringUtils.isNotEmpty(ip)) {
+                    ret.host = ip.substring(1);
+                }
+                ret.timestamp = DateTimeUtil.humanDateToMilliseconds(timestamp);
+                ret.scope = scope;
+                ret.action = action;
+                ret.user = LogParseUtil.parseUserFromUGI(user);
+                ret.request = request;
+                return ret;
+            } catch(Exception e) {
                 LOG.error("Got exception when parsing audit log:" + logLine + ", exception:" + e.getMessage(), e);
-                ret = null;
             }
         }
-        return ret;
+        return null;
     }
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-security/eagle-security-hbase-securitylog/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hbase-securitylog/src/main/resources/log4j.properties b/eagle-security/eagle-security-hbase-securitylog/src/main/resources/log4j.properties
new file mode 100644
index 0000000..fb13ad5
--- /dev/null
+++ b/eagle-security/eagle-security-hbase-securitylog/src/main/resources/log4j.properties
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+log4j.rootLogger=DEBUG, stdout
+
+# standard output
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-security/eagle-security-hbase-securitylog/src/test/java/org/apache/eagle/security/hbase/TestHbaseAuditLogProcessTopology.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hbase-securitylog/src/test/java/org/apache/eagle/security/hbase/TestHbaseAuditLogProcessTopology.java b/eagle-security/eagle-security-hbase-securitylog/src/test/java/org/apache/eagle/security/hbase/TestHbaseAuditLogProcessTopology.java
new file mode 100644
index 0000000..c1be351
--- /dev/null
+++ b/eagle-security/eagle-security-hbase-securitylog/src/test/java/org/apache/eagle/security/hbase/TestHbaseAuditLogProcessTopology.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.security.hbase;
+
+import com.typesafe.config.Config;
+import com.typesafe.config.ConfigFactory;
+import com.typesafe.config.ConfigParseOptions;
+import com.typesafe.config.ConfigSyntax;
+import org.apache.eagle.common.config.EagleConfigConstants;
+import org.junit.Test;
+
+
+public class TestHbaseAuditLogProcessTopology {
+    @Test
+    public void test() throws Exception {
+        //Config baseConfig = ConfigFactory.load("eagle-scheduler.conf");
+        ConfigParseOptions options = ConfigParseOptions.defaults()
+                .setSyntax(ConfigSyntax.PROPERTIES)
+                .setAllowMissing(false);
+        String topoConfigStr = "web.hbase.zookeeper.property.clientPort=2181\nweb.hbase.zookeeper.quorum=sandbox.hortonworks.com\n\napp.envContextConfig.env=storm\napp.envContextConfig.mode=local\napp.dataSourceConfig.topic=sandbox_hbase_security_log\napp.dataSourceConfig.zkConnection=sandbox.hortonworks.com:2181\napp.dataSourceConfig.zkConnectionTimeoutMS=15000\napp.dataSourceConfig.brokerZkPath=/brokers\napp.dataSourceConfig.fetchSize=1048586\napp.dataSourceConfig.transactionZKServers=sandbox.hortonworks.com\napp.dataSourceConfig.transactionZKPort=2181\napp.dataSourceConfig.transactionZKRoot=/consumers\napp.dataSourceConfig.consumerGroupId=eagle.hbasesecurity.consumer\napp.dataSourceConfig.transactionStateUpdateMS=2000\napp.dataSourceConfig.deserializerClass=org.apache.eagle.security.hbase.parse.HbaseAuditLogKafkaDeserializer\napp.eagleProps.site=sandbox\napp.eagleProps.application=hbaseSecurityLog\napp.eagleProps.dataJoinPollIntervalSec=30\napp.eagleProps.mailHost=mailHost.com\na
 pp.eagleProps.mailSmtpPort=25\napp.eagleProps.mailDebug=true\napp.eagleProps.eagleService.host=localhost\napp.eagleProps.eagleService.port=9098\napp.eagleProps.eagleService.username=admin\napp.eagleProps.eagleService.password=secret";
+
+        Config topoConfig = ConfigFactory.parseString(topoConfigStr, options);
+        Config conf = topoConfig.getConfig(EagleConfigConstants.APP_CONFIG);
+
+        HbaseAuditLogMonitoringTopology topology = new HbaseAuditLogMonitoringTopology();
+        //topology.submit("", conf);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-security/eagle-security-hbase-securitylog/src/test/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hbase-securitylog/src/test/resources/application.conf b/eagle-security/eagle-security-hbase-securitylog/src/test/resources/application.conf
new file mode 100644
index 0000000..2fc60a5
--- /dev/null
+++ b/eagle-security/eagle-security-hbase-securitylog/src/test/resources/application.conf
@@ -0,0 +1,66 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{
+  "envContextConfig" : {
+    "env" : "storm",
+    "mode" : "local",
+    "topologyName" : "sandbox-hbaseSecurityLog-topology",
+    "stormConfigFile" : "security-auditlog-storm.yaml",
+    "parallelismConfig" : {
+      "kafkaMsgConsumer" : 1,
+      "hbaseSecurityLogAlertExecutor*" : 1
+    }
+  },
+  "dataSourceConfig": {
+    "topic" : "sandbox_hbase_security_log",
+    "zkConnection" : "sandbox.hortonworks.com:2181",
+    "zkConnectionTimeoutMS" : 15000,
+    "consumerGroupId" : "EagleConsumer",
+    "fetchSize" : 1048586,
+    "deserializerClass" : "org.apache.eagle.security.hbase.parse.HbaseAuditLogKafkaDeserializer",
+    "transactionZKServers" : "sandbox.hortonworks.com",
+    "transactionZKPort" : 2181,
+    "transactionZKRoot" : "/consumers",
+    "consumerGroupId" : "eagle.hbasesecurity.consumer",
+    "transactionStateUpdateMS" : 2000
+  },
+  "alertExecutorConfigs" : {
+    "hbaseSecurityLogAlertExecutor" : {
+      "parallelism" : 1,
+      "partitioner" : "org.apache.eagle.policy.DefaultPolicyPartitioner"
+      "needValidation" : "true"
+    }
+  },
+  "eagleProps" : {
+    "site" : "sandbox",
+    "application": "hbaseSecurityLog",
+    "dataJoinPollIntervalSec" : 30,
+    "mailHost" : "mailHost.com",
+    "mailSmtpPort":"25",
+    "mailDebug" : "true",
+    "eagleService": {
+      "host": "localhost",
+      "port": 9098
+      "username": "admin",
+      "password": "secret"
+    }
+  },
+  "dynamicConfigSource" : {
+    "enabled" : true,
+    "initDelayMillis" : 0,
+    "delayMillis" : 30000
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-security/eagle-security-hbase-securitylog/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hbase-securitylog/src/test/resources/log4j.properties b/eagle-security/eagle-security-hbase-securitylog/src/test/resources/log4j.properties
new file mode 100644
index 0000000..25331ab
--- /dev/null
+++ b/eagle-security/eagle-security-hbase-securitylog/src/test/resources/log4j.properties
@@ -0,0 +1,35 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+log4j.rootLogger=INFO, stdout
+
+ eagle.log.dir=../logs
+ eagle.log.file=eagle.log
+
+# standard output
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
+
+# Daily Rolling File Appender
+ log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
+ log4j.appender.DRFA.File=${eagle.log.dir}/${eagle.log.file}
+ log4j.appender.DRFA.DatePattern=.yyyy-MM-dd
+## 30-day backup
+# log4j.appender.DRFA.MaxBackupIndex=30
+ log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
+
+# Pattern format: Date LogLevel LoggerName LogMessage
+log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-security/eagle-security-hdfs-auditlog/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hdfs-auditlog/pom.xml b/eagle-security/eagle-security-hdfs-auditlog/pom.xml
index c8bc8e7..09bf007 100644
--- a/eagle-security/eagle-security-hdfs-auditlog/pom.xml
+++ b/eagle-security/eagle-security-hdfs-auditlog/pom.xml
@@ -35,6 +35,11 @@
         <version>${project.version}</version>
   	</dependency>
     <dependency>
+      <groupId>org.apache.eagle</groupId>
+      <artifactId>eagle-stream-application-manager</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
         	<groupId>org.apache.eagle</groupId>
     		<artifactId>eagle-embed-server</artifactId>
             <version>${project.version}</version>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/HdfsAuditLogMonitoringTopology.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/HdfsAuditLogMonitoringTopology.java b/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/HdfsAuditLogMonitoringTopology.java
new file mode 100644
index 0000000..a7f207e
--- /dev/null
+++ b/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/HdfsAuditLogMonitoringTopology.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.security.auditlog;
+
+
+import com.typesafe.config.Config;
+import org.apache.eagle.dataproc.impl.storm.kafka.KafkaSourcedSpoutProvider;
+import org.apache.eagle.datastream.ExecutionEnvironments;
+import org.apache.eagle.datastream.storm.StormExecutionEnvironment;
+import org.apache.eagle.stream.application.TopologyExecutable;
+
+public class HdfsAuditLogMonitoringTopology implements TopologyExecutable {
+    @Override
+    public void submit(String topology, Config config) {
+        StormExecutionEnvironment env = ExecutionEnvironments.getStorm(config);
+        KafkaSourcedSpoutProvider provider = HdfsAuditLogProcessorMain.createProvider(env.getConfig());
+        Boolean balancePartition = config.hasPath("eagleProps.balancePartitionEnabled") && config.getBoolean("eagleProps.balancePartitionEnabled");
+        if (balancePartition) {
+            HdfsAuditLogProcessorMain.execWithBalancedPartition(env, provider);
+        } else {
+            HdfsAuditLogProcessorMain.execWithDefaultPartition(env, provider);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/timer/FileSensitivityPollingJob.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/timer/FileSensitivityPollingJob.java b/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/timer/FileSensitivityPollingJob.java
index a28e532..a4fed79 100644
--- a/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/timer/FileSensitivityPollingJob.java
+++ b/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/timer/FileSensitivityPollingJob.java
@@ -63,7 +63,7 @@ public class FileSensitivityPollingJob implements Job{
 	private List<FileSensitivityAPIEntity> load(JobDataMap jobDataMap) throws Exception{
 		Map<String, Object> map = (Map<String,Object>)jobDataMap.get(EagleConfigConstants.EAGLE_SERVICE);
 		String eagleServiceHost = (String)map.get(EagleConfigConstants.HOST);
-		Integer eagleServicePort = (Integer)map.get(EagleConfigConstants.PORT);
+		Integer eagleServicePort = Integer.parseInt(map.get(EagleConfigConstants.PORT).toString());
 		String username = map.containsKey(EagleConfigConstants.USERNAME) ? (String)map.get(EagleConfigConstants.USERNAME) : null;
 		String password = map.containsKey(EagleConfigConstants.PASSWORD) ? (String)map.get(EagleConfigConstants.PASSWORD) : null;
 		// load from eagle database

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/timer/IPZonePollingJob.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/timer/IPZonePollingJob.java b/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/timer/IPZonePollingJob.java
index ca6dc16..2f7efc8 100644
--- a/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/timer/IPZonePollingJob.java
+++ b/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/timer/IPZonePollingJob.java
@@ -64,7 +64,7 @@ public class IPZonePollingJob implements Job{
 	private List<IPZoneEntity> load(JobDataMap jobDataMap) throws Exception{
 		Map<String, Object> map = (Map<String,Object>)jobDataMap.get(EagleConfigConstants.EAGLE_SERVICE);
 		String eagleServiceHost = (String)map.get(EagleConfigConstants.HOST);
-		Integer eagleServicePort = (Integer)map.get(EagleConfigConstants.PORT);
+		Integer eagleServicePort = Integer.parseInt(map.get(EagleConfigConstants.PORT).toString());
 		String username = map.containsKey(EagleConfigConstants.USERNAME) ? (String)map.get(EagleConfigConstants.USERNAME) : null;
 		String password = map.containsKey(EagleConfigConstants.PASSWORD) ? (String)map.get(EagleConfigConstants.PASSWORD) : null;
 		// load from eagle database

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-security/eagle-security-hive/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hive/pom.xml b/eagle-security/eagle-security-hive/pom.xml
index 413a782..efa534f 100644
--- a/eagle-security/eagle-security-hive/pom.xml
+++ b/eagle-security/eagle-security-hive/pom.xml
@@ -34,7 +34,12 @@
 	      <groupId>org.apache.eagle</groupId>
 	  	  <artifactId>eagle-storm-jobrunning-spout</artifactId>
           <version>${project.version}</version>
-	   </dependency>	   
+	   </dependency>
+      <dependency>
+          <groupId>org.apache.eagle</groupId>
+          <artifactId>eagle-stream-application-manager</artifactId>
+          <version>${project.version}</version>
+      </dependency>
 	   <dependency>
 	      <groupId>org.apache.curator</groupId>
 	  	  <artifactId>curator-framework</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/HiveJobRunningMonitoringTopology.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/HiveJobRunningMonitoringTopology.java b/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/HiveJobRunningMonitoringTopology.java
new file mode 100644
index 0000000..81f329d
--- /dev/null
+++ b/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/HiveJobRunningMonitoringTopology.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.security.hive;
+
+
+import com.typesafe.config.Config;
+import org.apache.eagle.datastream.ExecutionEnvironments;
+import org.apache.eagle.datastream.storm.StormExecutionEnvironment;
+import org.apache.eagle.security.hive.jobrunning.HiveJobRunningSourcedStormSpoutProvider;
+import org.apache.eagle.security.hive.jobrunning.HiveQueryParserExecutor;
+import org.apache.eagle.security.hive.jobrunning.JobConfigurationAdaptorExecutor;
+import org.apache.eagle.security.hive.sensitivity.HiveResourceSensitivityDataJoinExecutor;
+import org.apache.eagle.stream.application.TopologyExecutable;
+
+import java.util.Arrays;
+
+public class HiveJobRunningMonitoringTopology implements TopologyExecutable {
+    @Override
+    public void submit(String topology, Config config) {
+        StormExecutionEnvironment env = ExecutionEnvironments.getStorm(config);
+        String spoutName = "msgConsumer";
+        int parallelism = env.getConfig().getInt("envContextConfig.parallelismConfig." + spoutName);
+        env.fromSpout(new HiveJobRunningSourcedStormSpoutProvider().getSpout(env.getConfig(), parallelism))
+                .withOutputFields(4).nameAs(spoutName).groupBy(Arrays.asList(0))
+                .flatMap(new JobConfigurationAdaptorExecutor()).groupBy(Arrays.asList(0))
+                .flatMap(new HiveQueryParserExecutor()).groupBy(Arrays.asList(0))
+                .flatMap(new HiveResourceSensitivityDataJoinExecutor())
+                .alertWithConsumer("hiveAccessLogStream", "hiveAccessAlertByRunningJob");
+        env.execute();
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/jobrunning/HiveJobRunningSourcedStormSpoutProvider.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/jobrunning/HiveJobRunningSourcedStormSpoutProvider.java b/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/jobrunning/HiveJobRunningSourcedStormSpoutProvider.java
index 9ddf0b2..729f519 100644
--- a/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/jobrunning/HiveJobRunningSourcedStormSpoutProvider.java
+++ b/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/jobrunning/HiveJobRunningSourcedStormSpoutProvider.java
@@ -17,6 +17,7 @@
 package org.apache.eagle.security.hive.jobrunning;
 
 import backtype.storm.topology.base.BaseRichSpout;
+import org.apache.eagle.job.DefaultJobPartitionerImpl;
 import org.apache.eagle.job.JobPartitioner;
 import org.apache.eagle.jobrunning.config.RunningJobCrawlConfig;
 import org.apache.eagle.jobrunning.config.RunningJobCrawlConfig.ControlConfig;
@@ -69,9 +70,11 @@ public class HiveJobRunningSourcedStormSpoutProvider {
 			controlConfig.partitionerCls = (Class<? extends JobPartitioner>)Class.forName(config.getString("dataSourceConfig.partitionerCls"));
 		}
 		catch(Exception ex){
-			LOG.error("failing find job id partitioner class " + config.getString("dataSourceConfig.partitionerCls"));
-			throw new IllegalStateException("jobId partitioner class does not exist " + config.getString("dataSourceConfig.partitionerCls"));
-		}
+			LOG.warn("failing find job id partitioner class " + config.getString("dataSourceConfig.partitionerCls"));
+			//throw new IllegalStateException("jobId partitioner class does not exist " + config.getString("dataSourceConfig.partitionerCls"));
+            controlConfig.partitionerCls = DefaultJobPartitionerImpl.class;
+
+        }
 		
 		JobRunningSpout spout = new JobRunningSpout(crawlConfig);
 		return spout;

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/sensitivity/HiveResourceSensitivityPollingJob.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/sensitivity/HiveResourceSensitivityPollingJob.java b/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/sensitivity/HiveResourceSensitivityPollingJob.java
index ff7462c..b7d9e9c 100644
--- a/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/sensitivity/HiveResourceSensitivityPollingJob.java
+++ b/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/sensitivity/HiveResourceSensitivityPollingJob.java
@@ -66,7 +66,7 @@ public class HiveResourceSensitivityPollingJob implements Job {
     private List<HiveResourceSensitivityAPIEntity> load(JobDataMap jobDataMap) throws Exception {
         Map<String, Object> map = (Map<String,Object>)jobDataMap.get(EagleConfigConstants.EAGLE_SERVICE);
         String eagleServiceHost = (String)map.get(EagleConfigConstants.HOST);
-        Integer eagleServicePort = (Integer)map.get(EagleConfigConstants.PORT);
+        Integer eagleServicePort = Integer.parseInt(map.get(EagleConfigConstants.PORT).toString());
         String username = map.containsKey(EagleConfigConstants.USERNAME) ? (String)map.get(EagleConfigConstants.USERNAME) : null;
         String password = map.containsKey(EagleConfigConstants.PASSWORD) ? (String)map.get(EagleConfigConstants.PASSWORD) : null;
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-topology-assembly/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-topology-assembly/pom.xml b/eagle-topology-assembly/pom.xml
index 7fc9875..bbf0a91 100644
--- a/eagle-topology-assembly/pom.xml
+++ b/eagle-topology-assembly/pom.xml
@@ -87,12 +87,12 @@
             <artifactId>eagle-hadoop-metric</artifactId>
             <version>${project.version}</version>
         </dependency>
-	<dependency>
+	    <dependency>
             <groupId>org.apache.eagle</groupId>
             <artifactId>eagle-gc</artifactId>
             <version>${project.version}</version>
         </dependency>
-<dependency>
+        <dependency>
             <groupId>org.apache.eagle</groupId>
             <artifactId>eagle-alert-notification-plugin</artifactId>
             <version>${project.version}</version>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-topology-assembly/src/assembly/eagle-topology-assembly.xml
----------------------------------------------------------------------
diff --git a/eagle-topology-assembly/src/assembly/eagle-topology-assembly.xml b/eagle-topology-assembly/src/assembly/eagle-topology-assembly.xml
index 2a0d211..97e36b8 100644
--- a/eagle-topology-assembly/src/assembly/eagle-topology-assembly.xml
+++ b/eagle-topology-assembly/src/assembly/eagle-topology-assembly.xml
@@ -56,8 +56,8 @@
             <directory>${project.build.outputDirectory}</directory>
             <outputDirectory>/</outputDirectory>
             <excludes>
-                <exclude>application.conf</exclude>
-                <exclude>log4j.properties</exclude>
+                <exclude>**/application.conf</exclude>
+                <exclude>**/log4j.properties</exclude>
                 <exclude>**/storm.yaml.1</exclude>
             </excludes>
             <includes>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-webservice/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-webservice/pom.xml b/eagle-webservice/pom.xml
index abddd91..2d16f2f 100644
--- a/eagle-webservice/pom.xml
+++ b/eagle-webservice/pom.xml
@@ -140,12 +140,28 @@
 				</exclusion>
 			</exclusions>
 		</dependency>
-
 		<dependency>
 			<groupId>org.apache.eagle</groupId>
 			<artifactId>eagle-security-hdfs-web</artifactId>
 			<version>${project.version}</version>
 		</dependency>
+		<!--
+		<dependency>
+			<groupId>org.apache.eagle</groupId>
+			<artifactId>eagle-stream-application-manager</artifactId>
+			<version>${project.version}</version>
+		</dependency> -->
+        <dependency>
+            <groupId>org.apache.eagle</groupId>
+            <artifactId>eagle-topology-assembly</artifactId>
+            <version>${project.version}</version>
+			<exclusions>
+				<exclusion>
+					<groupId>org.quartz-scheduler</groupId>
+					<artifactId>quartz</artifactId>
+				</exclusion>
+			</exclusions>
+        </dependency>
 
 		<!-- eagle user profile common dependency -->
 		<dependency>
@@ -163,7 +179,6 @@
 			<artifactId>eagle-machinelearning-base</artifactId>
 			<version>${project.version}</version>
 		</dependency>
-
 		<dependency>
 			<groupId>org.apache.eagle</groupId>
 			<artifactId>eagle-alert-base</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-webservice/src/main/java/org/apache/eagle/service/security/profile/ApplicationSchedulerListener.java
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/java/org/apache/eagle/service/security/profile/ApplicationSchedulerListener.java b/eagle-webservice/src/main/java/org/apache/eagle/service/security/profile/ApplicationSchedulerListener.java
new file mode 100644
index 0000000..a225192
--- /dev/null
+++ b/eagle-webservice/src/main/java/org/apache/eagle/service/security/profile/ApplicationSchedulerListener.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.service.security.profile;
+
+
+import akka.actor.ActorSystem;
+import com.typesafe.config.Config;
+import com.typesafe.config.ConfigFactory;
+import org.apache.eagle.stream.application.scheduler.ApplicationScheduler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import scala.concurrent.duration.Duration;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import java.util.concurrent.TimeUnit;
+
+public class ApplicationSchedulerListener implements ServletContextListener {
+    private static final Logger LOG = LoggerFactory.getLogger(ApplicationSchedulerListener.class);
+
+    //@Autowired
+    private ActorSystem system;
+
+    @Override
+    public void contextInitialized(ServletContextEvent servletContextEvent) {
+        //Get the actor system from the spring context
+        //SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
+        Config config = ConfigFactory.load("eagle-scheduler.conf");
+        system = new ApplicationScheduler().start(config);
+    }
+
+    @Override
+    public void contextDestroyed(ServletContextEvent servletContextEvent) {
+        if (system != null) {
+            LOG.info("Killing ActorSystem as a part of web application ctx destruction.");
+            system.shutdown();
+            system.awaitTermination(Duration.create(15, TimeUnit.SECONDS));
+        } else {
+            LOG.warn("No actor system loaded, yet trying to shut down. Check AppContext config and consider if you need this listener.");
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-webservice/src/main/java/org/apache/eagle/service/security/profile/EagleServiceProfileInitializer.java
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/java/org/apache/eagle/service/security/profile/EagleServiceProfileInitializer.java b/eagle-webservice/src/main/java/org/apache/eagle/service/security/profile/EagleServiceProfileInitializer.java
index fd28453..600e17a 100644
--- a/eagle-webservice/src/main/java/org/apache/eagle/service/security/profile/EagleServiceProfileInitializer.java
+++ b/eagle-webservice/src/main/java/org/apache/eagle/service/security/profile/EagleServiceProfileInitializer.java
@@ -17,6 +17,7 @@
 package org.apache.eagle.service.security.profile;
 import com.typesafe.config.Config;
 import com.typesafe.config.ConfigFactory;
+import org.apache.eagle.stream.application.scheduler.ApplicationScheduler;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.context.ApplicationContextInitializer;
@@ -37,5 +38,7 @@ public class EagleServiceProfileInitializer implements ApplicationContextInitial
         logger.info("Eagle service use env: " + profile);
         applicationContext.getEnvironment().setActiveProfiles(profile);
         applicationContext.refresh();
+
+        //new ApplicationScheduler().startDeamon();
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-webservice/src/main/resources/application-derby.conf
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/resources/application-derby.conf b/eagle-webservice/src/main/resources/application-derby.conf
new file mode 100644
index 0000000..c922a7e
--- /dev/null
+++ b/eagle-webservice/src/main/resources/application-derby.conf
@@ -0,0 +1,30 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+eagle {
+	service {
+		storage-type="jdbc"
+		storage-adapter="derby"
+		storage-username="eagle"
+		storage-password=eagle
+		storage-database=eagle
+		storage-connection-url="jdbc:derby:/tmp/eagle-db-dev;create=true"
+		storage-connection-props="encoding=UTF-8"
+		storage-driver-class="org.apache.derby.jdbc.EmbeddedDriver"
+		storage-connection-max=8
+	}
+}
+
+

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-webservice/src/main/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/resources/application.conf b/eagle-webservice/src/main/resources/application.conf
index ca936ed..cfa6a0b 100644
--- a/eagle-webservice/src/main/resources/application.conf
+++ b/eagle-webservice/src/main/resources/application.conf
@@ -13,16 +13,16 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-eagle {
-	service {
-		storage-type="jdbc"
-		storage-adapter="derby"
-		storage-username="eagle"
-		storage-password=eagle
-		storage-database=eagle
-		storage-connection-url="jdbc:derby:/tmp/eagle-db-dev;create=true"
-		storage-connection-props="encoding=UTF-8"
-		storage-driver-class="org.apache.derby.jdbc.EmbeddedDriver"
-		storage-connection-max=8
+
+eagle{
+	service{
+		storage-type="hbase"
+		hbase-zookeeper-quorum="sandbox.hortonworks.com"
+		hbase-zookeeper-property-clientPort=2181
+		zookeeper-znode-parent="/hbase-unsecure",
+		springActiveProfile="sandbox"
+		audit-enabled=true
 	}
-}
\ No newline at end of file
+}
+
+

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-webservice/src/main/resources/eagle-scheduler.conf
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/resources/eagle-scheduler.conf b/eagle-webservice/src/main/resources/eagle-scheduler.conf
new file mode 100644
index 0000000..aaab131
--- /dev/null
+++ b/eagle-webservice/src/main/resources/eagle-scheduler.conf
@@ -0,0 +1,41 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+### scheduler propertise
+appCommandLoaderIntervalSecs = 1
+appHealthCheckIntervalSecs = 5
+
+### execution platform properties
+envContextConfig.env = "storm"
+envContextConfig.url = "http://sandbox.hortonworks.com:8744"
+envContextConfig.nimbusHost = "sandbox.hortonworks.com"
+envContextConfig.nimbusThriftPort = 6627
+envContextConfig.jarFile = "/dir-to-jar/eagle-topology-0.3.0-incubating-assembly.jar"
+
+### default topology properties
+eagleProps.mailHost = "mailHost.com"
+eagleProps.mailSmtpPort = "25"
+eagleProps.mailDebug = "true"
+eagleProps.eagleService.host = "localhost"
+eagleProps.eagleService.port = 9099
+eagleProps.eagleService.username = "admin"
+eagleProps.eagleService.password = "secret"
+eagleProps.dataJoinPollIntervalSec = 30
+
+dynamicConfigSource.enabled = true
+dynamicConfigSource.initDelayMillis = 0
+dynamicConfigSource.delayMillis = 30000
+

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-webservice/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/WEB-INF/web.xml b/eagle-webservice/src/main/webapp/WEB-INF/web.xml
index ed56a73..1907767 100644
--- a/eagle-webservice/src/main/webapp/WEB-INF/web.xml
+++ b/eagle-webservice/src/main/webapp/WEB-INF/web.xml
@@ -102,6 +102,12 @@
     <listener>
         <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
     </listener>
+
+    <!-- AKKA System Setup -->
+    <listener>
+        <listener-class>org.apache.eagle.service.security.profile.ApplicationSchedulerListener</listener-class>
+    </listener>
+
     <session-config>
         <!-- in minutes -->
         <session-timeout>60</session-timeout>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-webservice/src/main/webapp/app/public/css/main.css
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/app/public/css/main.css b/eagle-webservice/src/main/webapp/app/public/css/main.css
index f07c3fb..a7eba4b 100644
--- a/eagle-webservice/src/main/webapp/app/public/css/main.css
+++ b/eagle-webservice/src/main/webapp/app/public/css/main.css
@@ -779,6 +779,14 @@ td.text-ellipsis {
 	line-height: 100%;
 }
 
+pre.noWrap {
+	border: none;
+	border-radius: 0;
+	background: transparent;
+	margin: 0;
+	padding: 0;
+}
+
 .noSelect {
 	-khtml-user-select: none;
 	-moz-user-select: none;

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-webservice/src/main/webapp/app/public/feature/metrics/controller.js
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/app/public/feature/metrics/controller.js b/eagle-webservice/src/main/webapp/app/public/feature/metrics/controller.js
index a2ac640..d717ad1 100644
--- a/eagle-webservice/src/main/webapp/app/public/feature/metrics/controller.js
+++ b/eagle-webservice/src/main/webapp/app/public/feature/metrics/controller.js
@@ -69,7 +69,7 @@
 
 	feature.controller('dashboard', function(PageConfig, $scope, $http, $q, UI, Site, Authorization, Application, Entities, DashboardFormatter) {
 		var _siteApp = Site.currentSiteApplication();
-		var _druidConfig = _siteApp.configObj.druid;
+		var _druidConfig = _siteApp.configObj.getValueByPath("web.druid");
 		var _refreshInterval;
 
 		var _menu_newChart;


[30/47] incubator-eagle git commit: EAGLE-301 fix the bug of breaking mysql row size when creating tables fix the bug of breaking mysql row size when creating tables

Posted by mw...@apache.org.
EAGLE-301 fix the bug of breaking mysql row size when creating tables
fix the bug of breaking mysql row size when creating tables

Author: @anyway1021 <mc...@gmail.com>
Reviewer: @yonzhang <yo...@gmail.com>

Closes: #238


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/8f12f826
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/8f12f826
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/8f12f826

Branch: refs/heads/master
Commit: 8f12f82620b13d69f89ddc8057cd72337920ea31
Parents: cbf3c76
Author: yonzhang <yo...@gmail.com>
Authored: Wed Jun 15 17:29:11 2016 -0700
Committer: yonzhang <yo...@gmail.com>
Committed: Wed Jun 15 17:29:11 2016 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/eagle/storage/jdbc/JdbcConstants.java   | 4 +++-
 .../eagle/storage/jdbc/schema/JdbcEntitySchemaManager.java       | 4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/8f12f826/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcConstants.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcConstants.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcConstants.java
index a6d0c93..f7f261c 100644
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcConstants.java
+++ b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcConstants.java
@@ -28,7 +28,9 @@ public class JdbcConstants {
     public static final String ROW_KEY_COLUMN_NAME = "uuid";
 
     public static final int DEFAULT_TYPE_FOR_COMPLEX_TYPE = Types.BLOB;
-    public static final int DEFAULT_VARCHAR_SIZE =30000;
+    public static final int DEFAULT_TAG_VARCHAR_SIZE =1024;
+//    public static final int DEFAULT_VARCHAR_SIZE =30000;
+    public static final int DEFAULT_VARCHAR_SIZE =7168;
 
     // Eagle JDBC Storage Configuration
     public final static String EAGLE_DB_USERNAME = "eagle.service.storage-username";

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/8f12f826/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntitySchemaManager.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntitySchemaManager.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntitySchemaManager.java
index 4cd1967..808c1d0 100644
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntitySchemaManager.java
+++ b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntitySchemaManager.java
@@ -155,7 +155,7 @@ public class JdbcEntitySchemaManager implements IJdbcEntityDDLManager {
         tagColumn.setTypeCode(Types.VARCHAR);
         tagColumn.setJavaName(tagName);
 //        tagColumn.setScale(1024);
-        tagColumn.setSize(String.valueOf(JdbcConstants.DEFAULT_VARCHAR_SIZE));
+        tagColumn.setSize(String.valueOf(JdbcConstants.DEFAULT_TAG_VARCHAR_SIZE));
         tagColumn.setDefaultValue(null);
         tagColumn.setDescription("eagle entity tag column for "+tagName);
         return tagColumn;
@@ -196,7 +196,7 @@ public class JdbcEntitySchemaManager implements IJdbcEntityDDLManager {
 //            Index index = new UniqueIndex();
             for (String tag : entityDefinition.getInternal().getTags()) {
                 Column tagColumn = createTagColumn(tag);
-                tagColumn.setSize(String.valueOf(JdbcConstants.DEFAULT_VARCHAR_SIZE));
+//                tagColumn.setSize(String.valueOf(JdbcConstants.DEFAULT_TAG_VARCHAR_SIZE));
                 table.addColumn(tagColumn);
 //                IndexColumn indexColumn = new IndexColumn();
 //                indexColumn.setName(tag);


[21/47] incubator-eagle git commit: [EAGLE-315] Add tutorial for mapr audit log monitoring

Posted by mw...@apache.org.
[EAGLE-315] Add tutorial for mapr audit log monitoring

- Added docs for users to enable auditing in MapR to get FSaudit logs

Author: Daniel <Da...@dataguise.com>
Author: Alice Yu <zy...@syr.edu>

Closes #202 from DadanielZ/mapr-integration.


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/4ad4b5cc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/4ad4b5cc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/4ad4b5cc

Branch: refs/heads/master
Commit: 4ad4b5ccfcd3d3df16d03080ac9a73a1465c2d3d
Parents: 253f99b
Author: Daniel <Da...@dataguise.com>
Authored: Fri May 27 12:15:08 2016 +0800
Committer: Hao Chen <ha...@apache.org>
Committed: Fri May 27 12:15:08 2016 +0800

----------------------------------------------------------------------
 ...erequisites_for_maprFSAuditLog_monitoring.md | 122 +++++++++++++++++++
 1 file changed, 122 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/4ad4b5cc/eagle-docs/tutorial/Prerequisites_for_maprFSAuditLog_monitoring.md
----------------------------------------------------------------------
diff --git a/eagle-docs/tutorial/Prerequisites_for_maprFSAuditLog_monitoring.md b/eagle-docs/tutorial/Prerequisites_for_maprFSAuditLog_monitoring.md
new file mode 100644
index 0000000..f0087e9
--- /dev/null
+++ b/eagle-docs/tutorial/Prerequisites_for_maprFSAuditLog_monitoring.md
@@ -0,0 +1,122 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+### Prerequisites
+
+To get maprFSAuditLog monitoring started, we need to:
+
+* Enable audit logs on MapR from MapR's terminal
+* Created logstash conf file to send audit logs to kafka
+* Initialize metadata for mapFSAuditLog and enabled the application
+
+Here are the steps to follow:   
+
+#### Step1: Enable audit logs for FileSystem Operations and Table Operations in MapR
+First we need to enable data auditing at all three levels: cluster level, volume level and directory,file or table level. 
+##### Cluster level: 
+
+```      
+       $ maprcli audit data -cluster <cluster name> -enabled true 
+                           [ -maxsize <GB, defaut value is 32. When size of audit logs exceed this number, an alarm will be sent to the dashboard in the MapR Control Service > ]
+                           [ -retention <number of Days> ]
+```
+Example:
+
+```
+        $ maprcli audit data -cluster mapr.cluster.com -enabled true -maxsize 30 -retention 30
+```
+
+
+
+##### Volume level:
+
+```      
+       $ maprcli volume audit -cluster <cluster name> -enabled true 
+                            -name <volume name>
+                            [ -coalesce <interval in minutes, the interval of time during which READ, WRITE, or GETATTR operations on one file from one client IP address are logged only once, if auditing is enabled> ]
+```
+Example:
+
+```
+        $ maprcli volume audit -cluster mapr.cluster.com -name mapr.tmp -enabled true
+```
+
+To verify that auditing is enabled for a particular volume, use this command:
+
+```
+        $ maprcli volume info -name <volume name> -json | grep -i 'audited\|coalesce'
+```
+and you should see something like this:
+
+```
+                        "audited":1,
+                        "coalesceInterval":60
+```
+If "audited" is '1' then auditing is enabled for this volume.
+
+
+
+##### Directory, file, or MapR-DB table level:
+
+```
+        $ hadoop mfs -setaudit on <directory|file|table>
+```
+
+To check whether Auditing is Enabled for a Directory, File, or MapR-DB Table, use ``$ hadoop mfs -ls``
+Example:
+Before enable the audit log on file ``/tmp/dir``, try ``$ hadoop mfs -ls /tmp/dir``, you should see something like this:
+```
+drwxr-xr-x Z U U   - root root          0 2016-03-02 15:02  268435456 /tmp/dir
+               p 2050.32.131328  mapr2.da.dg:5660 mapr1.da.dg:5660
+```
+The second ``U`` means auditing on this file is not enabled. 
+Enable auditing with this command: 
+```
+$ hadoop mfs -setaudit on /tmp/dir
+```
+Then check the auditing bit with : 
+```
+$ hadoop mfs -ls /tmp/dir
+```
+you should see something like this:
+```
+drwxr-xr-x Z U A   - root root          0 2016-03-02 15:02  268435456 /tmp/dir
+               p 2050.32.131328  mapr2.da.dg:5660 mapr1.da.dg:5660
+```
+We can see the previous ``U`` has been changed to ``A`` which indicates auditing on this file is enabled.
+  
+###### Important:
+When a directory has been enabled auditing,  directories/files located in this dir won't inherit auditing, but a newly created file/dir (after enabling the auditing on this dir) in this directory will.
+
+
+
+#### Step2: Stream log data into Kafka by using Logstash
+As MapR do not have name node, instead it use CLDB service, we have to use logstash to stream log data into kafka.
+- First find out the nodes that have CLDB service
+- Then find out the location of audit log files, eg: ``/mapr/mapr.cluster.com/var/mapr/local/mapr1.da.dg/audit/``, file names should be in this format: ``FSAudit.log-2016-05-04-001.json`` 
+- Created a logstash conf file and run it, following this doc[Logstash-kafka](https://github.com/apache/incubator-eagle/blob/dev/eagle-assembly/src/main/docs/logstash-kafka-conf.md)
+
+
+#### Step3: Set up maprFSAuditLog applicaiton in Eagle Service
+After Eagle Service gets started, create mapFSAuditLog application using:  ``$ ./maprFSAuditLog-init.sh``. By default it will create maprFSAuditLog in site "sandbox", you may need to change it to your own site.
+After these steps you are good to go.
+
+Have fun!!! :)
+
+### Reference Links
+1. [Enable Auditing in MapR](http://doc.mapr.com/display/MapR/Enabling+Auditing)
+2. [MapR audit logs](http://doc.mapr.com/display/MapR/Audit+Logs+for+Filesystem+Operations+and+Table+Operations)
\ No newline at end of file


[47/47] incubator-eagle git commit: add files back to make build pass

Posted by mw...@apache.org.
add files back to make build pass


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/9d9c30cc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/9d9c30cc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/9d9c30cc

Branch: refs/heads/master
Commit: 9d9c30cc8198f46d4e96167cb13f0fdb1a1ef27e
Parents: a044356
Author: anyway1021 <mw...@apache.org>
Authored: Mon Jul 25 17:34:55 2016 +0800
Committer: anyway1021 <mw...@apache.org>
Committed: Mon Jul 25 17:34:55 2016 +0800

----------------------------------------------------------------------
 .../src/main/lib/tomcat/bin/bootstrap.jar          | Bin 0 -> 28052 bytes
 .../src/main/lib/tomcat/bin/commons-daemon.jar     | Bin 0 -> 24283 bytes
 .../src/main/lib/tomcat/bin/tomcat-juli.jar        | Bin 0 -> 38222 bytes
 3 files changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9d9c30cc/eagle-assembly/src/main/lib/tomcat/bin/bootstrap.jar
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/bin/bootstrap.jar b/eagle-assembly/src/main/lib/tomcat/bin/bootstrap.jar
new file mode 100644
index 0000000..8f43864
Binary files /dev/null and b/eagle-assembly/src/main/lib/tomcat/bin/bootstrap.jar differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9d9c30cc/eagle-assembly/src/main/lib/tomcat/bin/commons-daemon.jar
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/bin/commons-daemon.jar b/eagle-assembly/src/main/lib/tomcat/bin/commons-daemon.jar
new file mode 100644
index 0000000..2b6b9c6
Binary files /dev/null and b/eagle-assembly/src/main/lib/tomcat/bin/commons-daemon.jar differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9d9c30cc/eagle-assembly/src/main/lib/tomcat/bin/tomcat-juli.jar
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/bin/tomcat-juli.jar b/eagle-assembly/src/main/lib/tomcat/bin/tomcat-juli.jar
new file mode 100644
index 0000000..e1b80ad
Binary files /dev/null and b/eagle-assembly/src/main/lib/tomcat/bin/tomcat-juli.jar differ


[09/47] incubator-eagle git commit: disable testLengthSlideWindowWithGroupby

Posted by mw...@apache.org.
disable testLengthSlideWindowWithGroupby


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/cf4b277a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/cf4b277a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/cf4b277a

Branch: refs/heads/master
Commit: cf4b277a1645087df306e3b2f2c133c58a8826e2
Parents: 02fcb79
Author: Zhao, Qingwen <qi...@ebay.com>
Authored: Fri May 6 18:07:42 2016 +0800
Committer: Zhao, Qingwen <qi...@ebay.com>
Committed: Fri May 6 18:07:42 2016 +0800

----------------------------------------------------------------------
 .../eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java      | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/cf4b277a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java
index 6d8065f..d05dd30 100644
--- a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java
+++ b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java
@@ -22,6 +22,7 @@ package org.apache.eagle.alert.state;
 import org.apache.eagle.common.DateTimeUtil;
 import org.junit.Assert;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.wso2.siddhi.core.ExecutionPlanRuntime;
 import org.wso2.siddhi.core.SiddhiManager;
@@ -158,7 +159,7 @@ public class TestSiddhiStateSnapshotAndRestore {
         return executionPlanRuntime;
     }
 
-    @Test
+    @Ignore
     public void testLengthSlideWindowWithGroupby() throws Exception{
         String tmpdir = System.getProperty("java.io.tmpdir");
         System.out.println("temporary directory: " + tmpdir);


[32/47] incubator-eagle git commit: EAGLE-307 Update "logstash-kafka-conf.md" Update "logstash-kafka-conf.md"

Posted by mw...@apache.org.
EAGLE-307 Update "logstash-kafka-conf.md"
Update "logstash-kafka-conf.md"

Author: @DadanielZ <DadanielZ>
Reviewer: @yonzhang <yo...@gmail.com>

Closes: #234


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/4627eb0b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/4627eb0b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/4627eb0b

Branch: refs/heads/master
Commit: 4627eb0b576dec25c8c97d57410a044dcbd6af05
Parents: 36422ea
Author: yonzhang <yo...@gmail.com>
Authored: Thu Jun 16 15:06:36 2016 -0700
Committer: yonzhang <yo...@gmail.com>
Committed: Thu Jun 16 15:06:36 2016 -0700

----------------------------------------------------------------------
 .../src/main/docs/logstash-kafka-conf.md        | 19 ++++-
 .../src/main/resources/maprFSAuditLog-init.sh   |  2 +-
 .../security/hdfs/MAPRFSResourceConstants.java  | 24 +++++++
 .../hdfs/rest/MAPRFSResourceWebResource.java    | 73 ++++++++++++++++++++
 4 files changed, 115 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/4627eb0b/eagle-assembly/src/main/docs/logstash-kafka-conf.md
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/docs/logstash-kafka-conf.md b/eagle-assembly/src/main/docs/logstash-kafka-conf.md
index 9003fb4..342302b 100644
--- a/eagle-assembly/src/main/docs/logstash-kafka-conf.md
+++ b/eagle-assembly/src/main/docs/logstash-kafka-conf.md
@@ -120,7 +120,7 @@ The 2.0 release of Logstash includes a new version of the Kafka output plugin wi
                 type => "hdp-nn-audit"
                 path => "/path/to/audit.log"
                 start_position => end
-                sincedb_path => "/var/log/logstash/"
+                sincedb_path => "/opt/logstash/sincedb.txt"
              }
         }
 
@@ -163,7 +163,7 @@ The 2.0 release of Logstash includes a new version of the Kafka output plugin wi
 				type => "hdp-nn-audit"
 				path => "/path/to/audit.log"
 				start_position => end
-				sincedb_path => "/var/log/logstash/"
+				sincedb_path => "/opt/logstash/sincedb.txt"
 			}
 		}
 
@@ -196,6 +196,21 @@ The 2.0 release of Logstash includes a new version of the Kafka output plugin wi
 			  }
 		}
 
+
+Notice:
+ `path => "/path/to/audit.log"` : 
+ Here `path` can be configured to be a single string or an array. For example:
+    `path => [ "var/msg/example.out", /var/message/*.out", "/var/log/*.log"]`
+    `path => "/var/log/hadoop/hdfs/hdfs-audit.log.*"`
+As you can see, we can apply regex pattern to match mutiple files.
+
+
+`sincedb_path => "/opt/logstash/sincedb.txt"`: 
+`sincedb_path` must be a file writable by logstash. This file will be used by Logstash to keep track of the current position in each file.
+
+
+
+
 #### grok pattern testing
 We have 3 typical patterns for ugi field as follows
 2015-02-11 15:00:00,000 INFO FSNamesystem.audit: allowed=true	ugi=user1@xyz.com (auth:TOKEN)	ip=/10.115.44.55	cmd=open	src=/apps/hdmi-technology/b_pulsar_coe/schema/avroschema/Session.avsc	dst=null	perm=null

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/4627eb0b/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/maprFSAuditLog-init.sh
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/maprFSAuditLog-init.sh b/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/maprFSAuditLog-init.sh
index 5f99190..19eed8d 100644
--- a/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/maprFSAuditLog-init.sh
+++ b/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/maprFSAuditLog-init.sh
@@ -48,7 +48,7 @@ curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:a
         "alias":"MapRFSAuditLogMonitor",
         "groupName":"MapR",
         "features":["common","metadata", "classification"],
-	"config":"{\n\t\"view\": {\n\t\t\"prefix\": \"fileSensitivity\",\n\t\t\"service\": \"FileSensitivityService\",\n\t\t\"keys\": [\n\t\t\t\"filedir\",\n\t\t\t\"sensitivityType\"\n\t\t],\n\t\t\"type\": \"folder\",\n\t\t\"api\": \"hdfsResource\"\n\t}\n}"
+	"config":"{\n\t\"view\": {\n\t\t\"prefix\": \"fileSensitivity\",\n\t\t\"service\": \"FileSensitivityService\",\n\t\t\"keys\": [\n\t\t\t\"filedir\",\n\t\t\t\"sensitivityType\"\n\t\t],\n\t\t\"type\": \"folder\",\n\t\t\"api\": \"maprfsResource\"\n\t}\n}"
      }
   ]
   '

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/4627eb0b/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/MAPRFSResourceConstants.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/MAPRFSResourceConstants.java b/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/MAPRFSResourceConstants.java
new file mode 100644
index 0000000..726ea8b
--- /dev/null
+++ b/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/MAPRFSResourceConstants.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.service.security.hdfs;
+
+public class MAPRFSResourceConstants {
+
+    public static final String MAPRFS_RESOURCE="/maprfsResource";
+    public static final String MAPRFS_APPLICATION="MAPRFSAuditLog";
+    public static final String MAPRFS_RESOURCE_RESOLVE_FORMAT_HINT ="MAPRFS Resource must be start with /";
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/4627eb0b/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/rest/MAPRFSResourceWebResource.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/rest/MAPRFSResourceWebResource.java b/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/rest/MAPRFSResourceWebResource.java
new file mode 100644
index 0000000..11206bb
--- /dev/null
+++ b/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/rest/MAPRFSResourceWebResource.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.service.security.hdfs.rest;
+
+
+import com.typesafe.config.Config;
+import org.apache.eagle.security.entity.FileStatusEntity;
+import org.apache.eagle.security.resolver.MetadataAccessConfigRepo;
+import org.apache.eagle.service.common.EagleExceptionWrapper;
+import org.apache.eagle.service.security.hdfs.HDFSFileSystem;
+import org.apache.eagle.service.security.hdfs.HDFSResourceSensitivityDataJoiner;
+import org.apache.eagle.service.security.hdfs.MAPRFSResourceConstants;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.ws.rs.*;
+import javax.ws.rs.core.MediaType;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * REST Web Service to browse files and Paths in MAPRFS
+ */
+@Path(MAPRFSResourceConstants.MAPRFS_RESOURCE)
+public class MAPRFSResourceWebResource
+{
+    private static Logger LOG = LoggerFactory.getLogger(MAPRFSResourceWebResource.class);
+
+    @GET
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    public HDFSResourceWebResponse getHDFSResource(@QueryParam("site") String site , @QueryParam("path") String filePath )
+    {
+        LOG.info("Starting MAPRFS Resource Browsing.  Query Parameters ==> Site :"+site+"  Path : "+filePath );
+        HDFSResourceWebResponse response = new HDFSResourceWebResponse();
+        HDFSResourceWebRequestValidator validator = new HDFSResourceWebRequestValidator();
+        MetadataAccessConfigRepo repo = new MetadataAccessConfigRepo();
+        List<FileStatusEntity> result = new ArrayList<>();
+        List<FileStatus> fileStatuses = null;
+        try {
+            validator.validate(site, filePath); // First Step would be validating Request
+            Config config = repo.getConfig(MAPRFSResourceConstants.MAPRFS_APPLICATION, site);
+            Configuration conf = repo.convert(config);
+            HDFSFileSystem fileSystem = new HDFSFileSystem(conf);
+            fileStatuses = fileSystem.browse(filePath);
+            // Join with File Sensitivity Info
+            HDFSResourceSensitivityDataJoiner joiner = new HDFSResourceSensitivityDataJoiner();
+            result = joiner.joinFileSensitivity(site, fileStatuses);
+            LOG.info("Successfully browsed files in MAPRFS .");
+        } catch( Exception ex ) {
+            response.setException(EagleExceptionWrapper.wrap(ex));
+            LOG.error(" Exception When browsing Files for the MAPRFS Path  :"+filePath+"  " , ex);
+        }
+        response.setObj(result);
+        return response;
+    }
+}


[26/47] incubator-eagle git commit: EAGLE 304: Enable Advanced dedup configuration in policy definition

Posted by mw...@apache.org.
EAGLE 304: Enable Advanced dedup configuration in policy definition

Author: Zhao, Qingwen & Jiang, jilin
Reviewer: Chen, Hao
Date:   Thu May 26 20:12:12 2016 +0800
Closes #209


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/750b4c9a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/750b4c9a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/750b4c9a

Branch: refs/heads/master
Commit: 750b4c9a87732b9f69a83e908a819d174554745d
Parents: ffd5fdd
Author: Zhao, Qingwen <qi...@ebay.com>
Authored: Mon May 30 15:49:48 2016 +0800
Committer: Zhao, Qingwen <qi...@ebay.com>
Committed: Mon May 30 15:49:48 2016 +0800

----------------------------------------------------------------------
 .../eagle/alert/config/DeduplicatorConfig.java  | 17 ++++--
 .../dedup/AlertDeduplicationExecutorBase.java   | 22 +++----
 .../eagle/alert/dedup/DefaultDeduplicator.java  | 50 ++++++++++------
 .../eagle/alert/dedup/EntityDedupKey.java       | 62 ++++++++++++++++++++
 .../eagle/alert/dedup/EntityDeduplicator.java   |  9 ++-
 .../eagle/alert/config/TestAlertDedup.java      |  6 +-
 .../TestSiddhiStateSnapshotAndRestore.java      |  2 +-
 .../src/main/resources/application.conf         |  1 -
 .../app/public/feature/common/controller.js     | 12 +++-
 9 files changed, 132 insertions(+), 49 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/750b4c9a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/config/DeduplicatorConfig.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/config/DeduplicatorConfig.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/config/DeduplicatorConfig.java
index 584abc7..1e65408 100644
--- a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/config/DeduplicatorConfig.java
+++ b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/config/DeduplicatorConfig.java
@@ -17,21 +17,26 @@
 package org.apache.eagle.alert.config;
 
 import java.io.Serializable;
+import java.util.List;
 
 public class DeduplicatorConfig implements Serializable{
 	private static final long serialVersionUID = 1L;
+
+	private int alertDedupIntervalMin;
+	private List<String> fields;
+
 	public int getAlertDedupIntervalMin() {
 		return alertDedupIntervalMin;
 	}
+
 	public void setAlertDedupIntervalMin(int alertDedupIntervalMin) {
 		this.alertDedupIntervalMin = alertDedupIntervalMin;
 	}
-	public int getEmailDedupIntervalMin() {
-		return emailDedupIntervalMin;
+	public List<String> getFields() {
+		return fields;
 	}
-	public void setEmailDedupIntervalMin(int emailDedupIntervalMin) {
-		this.emailDedupIntervalMin = emailDedupIntervalMin;
+
+	public void setFields(List<String> fields) {
+		this.fields = fields;
 	}
-	private int alertDedupIntervalMin;
-	private int emailDedupIntervalMin;
 }

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/750b4c9a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/AlertDeduplicationExecutorBase.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/AlertDeduplicationExecutorBase.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/AlertDeduplicationExecutorBase.java
index 051df33..25e5cff 100644
--- a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/AlertDeduplicationExecutorBase.java
+++ b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/AlertDeduplicationExecutorBase.java
@@ -46,7 +46,7 @@ public abstract class AlertDeduplicationExecutorBase extends JavaStormStreamExec
 	protected DEDUP_TYPE dedupType;
 
 	private List<String> alertExecutorIdList;
-	private volatile CopyOnWriteHashMap<String, DefaultDeduplicator<AlertAPIEntity>> alertDedups;
+	private volatile CopyOnWriteHashMap<String, DefaultDeduplicator> alertDedups;
 	private PolicyDefinitionDAO<AlertDefinitionAPIEntity> dao;
 
 	public enum DEDUP_TYPE {
@@ -65,21 +65,17 @@ public abstract class AlertDeduplicationExecutorBase extends JavaStormStreamExec
 		this.config = config;
 	}
 	
-	public DefaultDeduplicator<AlertAPIEntity> createAlertDedup(AlertDefinitionAPIEntity alertDef) {
+	public DefaultDeduplicator createAlertDedup(AlertDefinitionAPIEntity alertDef) {
 		DeduplicatorConfig dedupConfig = null;
 		try {
 			dedupConfig = JsonSerDeserUtils.deserialize(alertDef.getDedupeDef(), DeduplicatorConfig.class);
 		}
 		catch (Exception ex) {
-			LOG.warn("Initial dedupConfig error, " + ex.getMessage());
+			LOG.warn("Initial dedup Config error, " + ex.getMessage());
 		}
 
         if (dedupConfig != null) {
-			if (dedupType.equals(DEDUP_TYPE.ENTITY)) {
-				return new DefaultDeduplicator<>(dedupConfig.getAlertDedupIntervalMin());
-			} else if (dedupType.equals(DEDUP_TYPE.EMAIL)) {
-				return new DefaultDeduplicator<>(dedupConfig.getEmailDedupIntervalMin());
-			}
+			return new DefaultDeduplicator(dedupConfig.getAlertDedupIntervalMin(), dedupConfig.getFields());
 		}
 
 		return null;
@@ -97,7 +93,7 @@ public abstract class AlertDeduplicationExecutorBase extends JavaStormStreamExec
  			LOG.error("fail to initialize initialAlertDefs: ", ex);
 	        throw new IllegalStateException("fail to initialize initialAlertDefs: ", ex);
         }
-	    Map<String, DefaultDeduplicator<AlertAPIEntity>> tmpDeduplicators = new HashMap<String, DefaultDeduplicator<AlertAPIEntity>>();
+	    Map<String, DefaultDeduplicator> tmpDeduplicators = new HashMap<>();
         if(initialAlertDefs == null || initialAlertDefs.isEmpty()){
             LOG.warn("No alert definitions was found for site: "+site+", dataSource: "+dataSource);
         } else {
@@ -105,7 +101,7 @@ public abstract class AlertDeduplicationExecutorBase extends JavaStormStreamExec
 			    if(initialAlertDefs.containsKey(alertExecutorId)){
                     for(AlertDefinitionAPIEntity alertDef : initialAlertDefs.get(alertExecutorId).values()){
                        try {
-                          DefaultDeduplicator<AlertAPIEntity> deduplicator = createAlertDedup(alertDef);
+                          DefaultDeduplicator deduplicator = createAlertDedup(alertDef);
                           if (deduplicator != null)
                               tmpDeduplicators.put(alertDef.getTags().get(Constants.POLICY_ID), deduplicator);
                           else LOG.warn("The dedup interval is not set, alertDef: " + alertDef);
@@ -133,7 +129,7 @@ public abstract class AlertDeduplicationExecutorBase extends JavaStormStreamExec
     public void flatMap(java.util.List<Object> input, Collector<Tuple2<String, AlertAPIEntity>> outputCollector){
         String policyId = (String) input.get(0);
         AlertAPIEntity alertEntity = (AlertAPIEntity) input.get(1);
-        DefaultDeduplicator<AlertAPIEntity> dedup;
+        DefaultDeduplicator dedup;
         synchronized(alertDedups) {
             dedup = alertDedups.get(policyId);
         }
@@ -157,7 +153,7 @@ public abstract class AlertDeduplicationExecutorBase extends JavaStormStreamExec
 		if(LOG.isDebugEnabled()) LOG.debug("Alert dedup config to be added : " + added);
 		for(AlertDefinitionAPIEntity alertDef : added.values()){
 			LOG.info("Alert dedup config really added " + alertDef);
-			DefaultDeduplicator<AlertAPIEntity> dedup = createAlertDedup(alertDef);
+			DefaultDeduplicator dedup = createAlertDedup(alertDef);
 			if (dedup != null) {
 				synchronized(alertDedups) {		
 					alertDedups.put(alertDef.getTags().get(Constants.POLICY_ID), dedup);
@@ -170,7 +166,7 @@ public abstract class AlertDeduplicationExecutorBase extends JavaStormStreamExec
 		LOG.info("Alert dedup config changed : " + changed);
 		for(AlertDefinitionAPIEntity alertDef : changed.values()){
 			LOG.info("Alert dedup config really changed " + alertDef);
-			DefaultDeduplicator<AlertAPIEntity> dedup = createAlertDedup(alertDef);
+			DefaultDeduplicator dedup = createAlertDedup(alertDef);
 			if (dedup != null) {
 				synchronized(alertDedups) {
 					alertDedups.put(alertDef.getTags().get(Constants.POLICY_ID), dedup);

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/750b4c9a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/DefaultDeduplicator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/DefaultDeduplicator.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/DefaultDeduplicator.java
index b968e38..1d79f9f 100644
--- a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/DefaultDeduplicator.java
+++ b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/DefaultDeduplicator.java
@@ -23,14 +23,15 @@ import java.util.Map;
 import java.util.Map.Entry;
 
 import org.apache.commons.lang.time.DateUtils;
+import org.apache.eagle.alert.entity.AlertAPIEntity;
+import org.apache.eagle.common.metric.AlertContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-
-public class DefaultDeduplicator<T extends TaggedLogAPIEntity> implements EntityDeduplicator<T>{
+public class DefaultDeduplicator implements EntityDeduplicator {
 	protected long dedupIntervalMin;
-	protected Map<EntityTagsUniq, Long> entites = new HashMap<EntityTagsUniq, Long>();
+	protected List<String> fields;
+	protected Map<EntityDedupKey, Long> entites = new HashMap<>();
 	public static Logger LOG = LoggerFactory.getLogger(DefaultDeduplicator.class);
 	
 	public static enum AlertDeduplicationStatus{
@@ -41,26 +42,28 @@ public class DefaultDeduplicator<T extends TaggedLogAPIEntity> implements Entity
 	
 	public DefaultDeduplicator() {
 		this.dedupIntervalMin = 0;
+		fields = null;
 	}
-	
-	public DefaultDeduplicator(long intervalMin) {
+
+	public DefaultDeduplicator(long intervalMin, List<String> fields) {
 		this.dedupIntervalMin = intervalMin;
+		this.fields = fields;
 	}
 	
 	public void clearOldCache() {
-		List<EntityTagsUniq> removedkeys = new ArrayList<EntityTagsUniq>();
-		for (Entry<EntityTagsUniq, Long> entry : entites.entrySet()) {
-			EntityTagsUniq entity = entry.getKey();
+		List<EntityDedupKey> removedkeys = new ArrayList<>();
+		for (Entry<EntityDedupKey, Long> entry : entites.entrySet()) {
+			EntityDedupKey entity = entry.getKey();
 			if (System.currentTimeMillis() - 7 * DateUtils.MILLIS_PER_DAY > entity.createdTime) {
 				removedkeys.add(entry.getKey());
 			}
 		}
-		for (EntityTagsUniq alertKey : removedkeys) {
+		for (EntityDedupKey alertKey : removedkeys) {
 			entites.remove(alertKey);
 		}
 	}
 	
-	public AlertDeduplicationStatus checkDedup(EntityTagsUniq key){
+	public AlertDeduplicationStatus checkDedup(EntityDedupKey key){
 		long current = key.timestamp;
 		if(!entites.containsKey(key)){
 			entites.put(key, current);
@@ -75,17 +78,28 @@ public class DefaultDeduplicator<T extends TaggedLogAPIEntity> implements Entity
 		
 		return AlertDeduplicationStatus.IGNORED;
 	}
-	
-	public List<T> dedup(List<T> list) {
+
+	private List<String> getKeyList(AlertAPIEntity entity) {
+		List<String> keys = new ArrayList<>(entity.getTags().values());
+		if(fields != null && !fields.isEmpty()) {
+			for (String field: fields) {
+				AlertContext context = entity.getWrappedAlertContext();
+				keys.add(context.getProperty(field));
+			}
+		}
+		return keys;
+	}
+
+	public List<AlertAPIEntity> dedup(List<AlertAPIEntity> list) {
 		clearOldCache();
-		List<T> dedupList = new ArrayList<T>();
+		List<AlertAPIEntity> dedupList = new ArrayList<>();
         int totalCount = list.size();
         int dedupedCount = 0;
-		for(T entity: list) {
+		for(AlertAPIEntity entity: list) {
 			if (entity.getTags() == null) {
 				if(LOG.isDebugEnabled()) LOG.debug("Tags is null, don't know how to deduplicate, do nothing");
 			} else {
-                AlertDeduplicationStatus status = checkDedup(new EntityTagsUniq(entity.getTags(), entity.getTimestamp()));
+                AlertDeduplicationStatus status = checkDedup(new EntityDedupKey(getKeyList(entity), entity.getTimestamp()));
                 if (!status.equals(AlertDeduplicationStatus.IGNORED)) {
                     dedupList.add(entity);
                 } else {
@@ -97,7 +111,7 @@ public class DefaultDeduplicator<T extends TaggedLogAPIEntity> implements Entity
 		}
 
         if(dedupedCount>0){
-            LOG.info(String.format("Skipped %s of %s alerts because they are duplicated",dedupedCount,totalCount));
+            LOG.info(String.format("Skipped %s of %s alerts because they are duplicated", dedupedCount, totalCount));
         }else if(LOG.isDebugEnabled()){
             LOG.debug(String.format("Skipped %s of %s duplicated alerts",dedupedCount,totalCount));
         }
@@ -105,7 +119,7 @@ public class DefaultDeduplicator<T extends TaggedLogAPIEntity> implements Entity
 		return dedupList;
 	}
 
-	public EntityDeduplicator<T> setDedupIntervalMin(long dedupIntervalMin) {
+	public EntityDeduplicator setDedupIntervalMin(long dedupIntervalMin) {
 		this.dedupIntervalMin = dedupIntervalMin;
 		return this;
 	}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/750b4c9a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/EntityDedupKey.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/EntityDedupKey.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/EntityDedupKey.java
new file mode 100644
index 0000000..36b83e1
--- /dev/null
+++ b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/EntityDedupKey.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.alert.dedup;
+
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+public class EntityDedupKey {
+    public List<String> values;
+    public Long timestamp;     // entity's timestamp
+    public long createdTime; // entityTagsUniq's created time, for cache removal;
+
+    private static final Logger LOG = LoggerFactory.getLogger(EntityDedupKey.class);
+
+    public EntityDedupKey(List<String> values, long timestamp) {
+        this.values = new ArrayList<>(values);
+        this.timestamp = timestamp;
+        this.createdTime = System.currentTimeMillis();
+    }
+
+    public boolean equals(Object obj) {
+        if (obj instanceof EntityDedupKey) {
+            EntityDedupKey key = (EntityDedupKey) obj;
+            if (key == null || key.values.size() != values.size()) {
+                return false;
+            }
+            return values.equals(key.values);
+        }
+        return false;
+    }
+
+    public int hashCode() {
+        HashCodeBuilder builder = new HashCodeBuilder();
+        for (String value : values) {
+            builder.append(value);
+        }
+        return builder.build();
+    }
+}
+
+

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/750b4c9a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/EntityDeduplicator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/EntityDeduplicator.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/EntityDeduplicator.java
index e108b94..85dd19a 100644
--- a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/EntityDeduplicator.java
+++ b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/EntityDeduplicator.java
@@ -18,19 +18,18 @@ package org.apache.eagle.alert.dedup;
 
 import java.util.List;
 
+import org.apache.eagle.alert.entity.AlertAPIEntity;
 import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
 
 /**
  * Dedup Eagle entities.
- *
- * @param <T> Eagle entity
  */
-public interface EntityDeduplicator<T extends TaggedLogAPIEntity> {
+public interface EntityDeduplicator {
 	
-	EntityDeduplicator<T> setDedupIntervalMin(long intervalMin);
+	EntityDeduplicator setDedupIntervalMin(long intervalMin);
 	
 	long getDedupIntervalMin();
 	
-	List<T> dedup(List<T> list);
+	List dedup(List<AlertAPIEntity> list);
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/750b4c9a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/config/TestAlertDedup.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/config/TestAlertDedup.java b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/config/TestAlertDedup.java
index 4295bdc..f6d6a63 100644
--- a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/config/TestAlertDedup.java
+++ b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/config/TestAlertDedup.java
@@ -25,10 +25,10 @@ public class TestAlertDedup {
 
 	@Test
 	public void test() throws Exception{
-		String alertDef = "{\"alertDedupIntervalMin\":\"720\",\"emailDedupIntervalMin\":\"1440\"}";
+		String alertDef = "{\"alertDedupIntervalMin\":\"10\",\"fields\":[\"key1\",\"key2\",\"key3\"]}";
 		DeduplicatorConfig dedupConfig = JsonSerDeserUtils.deserialize(alertDef, DeduplicatorConfig.class);
-		Assert.assertEquals(dedupConfig.getAlertDedupIntervalMin(), 720);
-		Assert.assertEquals(dedupConfig.getEmailDedupIntervalMin(), 1440);
+		Assert.assertEquals(dedupConfig.getAlertDedupIntervalMin(), 10);
+		Assert.assertEquals(dedupConfig.getFields().size(), 3);
 		
 		alertDef = "null";
 		dedupConfig = JsonSerDeserUtils.deserialize(alertDef, DeduplicatorConfig.class);

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/750b4c9a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java
index 131be28..ccc6c87 100644
--- a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java
+++ b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java
@@ -206,7 +206,7 @@ public class TestSiddhiStateSnapshotAndRestore {
         return executionPlanRuntime;
     }
 
-    @Test
+    @Ignore
     public void testTimeSlideWindow() throws Exception{
         String tmpdir = System.getProperty("java.io.tmpdir");
         System.out.println("temporary directory: " + tmpdir);

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/750b4c9a/eagle-webservice/src/main/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/resources/application.conf b/eagle-webservice/src/main/resources/application.conf
index cfa6a0b..fff7d3f 100644
--- a/eagle-webservice/src/main/resources/application.conf
+++ b/eagle-webservice/src/main/resources/application.conf
@@ -25,4 +25,3 @@ eagle{
 	}
 }
 
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/750b4c9a/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js b/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js
index 18df6f9..72af7eb 100644
--- a/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js
+++ b/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js
@@ -551,8 +551,10 @@
 							conditions: {},
 							notification: [],
 							dedupe: {
-								alertDedupIntervalMin: 10
+								alertDedupIntervalMin: 10,
+								fields: []
 							},
+							_dedupTags: {},
 							policy: {},
 							window: "externalTime",
 							group: "",
@@ -627,7 +629,11 @@
 
 						// === Revert inner data ===
 						// >> De-dupe
+						$scope.policy.__._dedupTags = {};
 						$scope.policy.__.dedupe = common.parseJSON($scope.policy.dedupeDef, {});
+						$.each($scope.policy.__.dedupe.fields || [], function (i, field) {
+							$scope.policy.__._dedupTags[field] = true;
+						});
 
 						// >> Notification
 						$scope.policy.__.notification = common.parseJSON($scope.policy.notificationDef, []);
@@ -953,6 +959,9 @@
 				$scope.lock = true;
 
 				// dedupeDef
+				$scope.policy.__.dedupe.fields = $.map($scope.policy.__._dedupTags, function (value, key) {
+					if(value) return key;
+				});
 				$scope.policy.dedupeDef = JSON.stringify($scope.policy.__.dedupe);
 
 				// notificationDef
@@ -961,7 +970,6 @@
 				$scope.policy.notificationDef = JSON.stringify($scope.policy.__.notification);
 
 				// policyDef
-				$scope.policy.__._dedupTags = $scope.policy.__._dedupTags || {};
 				$scope.policy.__.policy = {
 					expression: $scope.toQuery(),
 					type: "siddhiCEPEngine"


[07/47] incubator-eagle git commit: EAGLE-254 HdfsAuditLog topology keeps alerting for one piece of log

Posted by mw...@apache.org.
EAGLE-254 HdfsAuditLog topology keeps alerting for one piece of log

https://issues.apache.org/jira/browse/EAGLE-254

Fixed two bugs:
  HdfsAuditLog topology keeps alerting for one piece of log
  update invalid links in email template

Author: Qingwen Zhao
Closes #167


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/d8be43f1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/d8be43f1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/d8be43f1

Branch: refs/heads/master
Commit: d8be43f1f7ea22fccf8478dc335bbde42ce856f4
Parents: a725ea5
Author: Zhao, Qingwen <qi...@ebay.com>
Authored: Tue May 3 10:35:26 2016 +0800
Committer: Zhao, Qingwen <qi...@ebay.com>
Committed: Tue May 3 10:35:26 2016 +0800

----------------------------------------------------------------------
 .../java/org/apache/eagle/policy/common/UrlBuilder.java |  4 ++--
 eagle-hadoop-metric/src/main/resources/log4j.properties |  5 -----
 .../security/auditlog/HdfsAuditLogProcessorMain.java    | 12 ++++++------
 3 files changed, 8 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d8be43f1/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/UrlBuilder.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/UrlBuilder.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/UrlBuilder.java
index b10c6c8..1267e93 100644
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/UrlBuilder.java
+++ b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/UrlBuilder.java
@@ -39,7 +39,7 @@ public class UrlBuilder {
     }
 
     public static String buildAlertDetailUrl(String host, int port, AlertAPIEntity entity) {
-        String baseUrl = "http://" + host + ":" + String.valueOf(port) + "/eagle-service/#/dam/alertDetail/";
+        String baseUrl = "http://" + host + ":" + String.valueOf(port) + "/eagle-service/ui/#/common/alertDetail/";
         try {
             return baseUrl + UrlEncoded.encodeString(getEncodedRowkey(entity));
         }
@@ -50,7 +50,7 @@ public class UrlBuilder {
     }
 
     public static String buiildPolicyDetailUrl(String host, int port, Map<String, String> tags) {
-        String baseUrl = "http://" + host + ":" + String.valueOf(port) + "/eagle-service/#/dam/policyDetail?";
+        String baseUrl = "http://" + host + ":" + String.valueOf(port) + "/eagle-service/ui/#/common/policyDetail/?";
         String format = "policy=%s&site=%s&executor=%s";
         String policy = tags.get(Constants.POLICY_ID);
         String site = tags.get(EagleConfigConstants.SITE);

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d8be43f1/eagle-hadoop-metric/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-hadoop-metric/src/main/resources/log4j.properties b/eagle-hadoop-metric/src/main/resources/log4j.properties
index 07f8402..149caa7 100644
--- a/eagle-hadoop-metric/src/main/resources/log4j.properties
+++ b/eagle-hadoop-metric/src/main/resources/log4j.properties
@@ -18,11 +18,6 @@ log4j.rootLogger=INFO, stdout, DRFA
 eagle.log.dir=./logs
 eagle.log.file=eagle.log
 
-
-#log4j.logger.org.apache.eagle.security.auditlog.IPZoneDataJoinExecutor=DEBUG
-#log4j.logger.org.apache.eagle.security.auditlog.FileSensitivityDataJoinExecutor=DEBUG
-log4j.logger.org.apache.eagle.security.auditlog.HdfsUserCommandReassembler=DEBUG
-#log4j.logger.org.apache.eagle.executor.AlertExecutor=DEBUG
 # standard output
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d8be43f1/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/HdfsAuditLogProcessorMain.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/HdfsAuditLogProcessorMain.java b/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/HdfsAuditLogProcessorMain.java
index f63a9be..60b0e36 100644
--- a/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/HdfsAuditLogProcessorMain.java
+++ b/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/HdfsAuditLogProcessorMain.java
@@ -80,9 +80,9 @@ public class HdfsAuditLogProcessorMain {
     @SuppressWarnings("unchecked")
     public static void execWithDefaultPartition(StormExecutionEnvironment env, KafkaSourcedSpoutProvider provider) {
         StreamProducer source = env.fromSpout(provider).withOutputFields(2).nameAs("kafkaMsgConsumer").groupBy(Arrays.asList(0));
-        StreamProducer reassembler = source.flatMap(new HdfsUserCommandReassembler()).groupBy(Arrays.asList(0));
-        source.streamUnion(reassembler)
-              .flatMap(new FileSensitivityDataJoinExecutor()).groupBy(Arrays.asList(0))
+        //StreamProducer reassembler = source.flatMap(new HdfsUserCommandReassembler()).groupBy(Arrays.asList(0));
+        //source.streamUnion(reassembler)
+        source.flatMap(new FileSensitivityDataJoinExecutor()).groupBy(Arrays.asList(0))
               .flatMap(new IPZoneDataJoinExecutor())
               .alertWithConsumer("hdfsAuditLogEventStream", "hdfsAuditLogAlertExecutor");
         env.execute();
@@ -92,9 +92,9 @@ public class HdfsAuditLogProcessorMain {
     public static void execWithBalancedPartition(StormExecutionEnvironment env, KafkaSourcedSpoutProvider provider) {
         PartitionStrategy strategy = createStrategy(env.getConfig());
         StreamProducer source = env.fromSpout(provider).withOutputFields(2).nameAs("kafkaMsgConsumer").groupBy(strategy);
-        StreamProducer reassembler = source.flatMap(new HdfsUserCommandReassembler()).groupBy(Arrays.asList(0));
-        source.streamUnion(reassembler)
-                .flatMap(new FileSensitivityDataJoinExecutor()).groupBy(Arrays.asList(0))
+        //StreamProducer reassembler = source.flatMap(new HdfsUserCommandReassembler()).groupBy(Arrays.asList(0));
+        //source.streamUnion(reassembler)
+        source.flatMap(new FileSensitivityDataJoinExecutor()).groupBy(Arrays.asList(0))
                 .flatMap(new IPZoneDataJoinExecutor())
                 .alertWithConsumer("hdfsAuditLogEventStream", "hdfsAuditLogAlertExecutor");
         env.execute();


[11/47] incubator-eagle git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-eagle

Posted by mw...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-eagle


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/6768fe49
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/6768fe49
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/6768fe49

Branch: refs/heads/master
Commit: 6768fe4924fe321c4c89736f8118e17f0c8ab8fb
Parents: 8087ec0 f90a0a4
Author: Zhao, Qingwen <qi...@ebay.com>
Authored: Thu May 19 15:41:03 2016 +0800
Committer: Zhao, Qingwen <qi...@ebay.com>
Committed: Thu May 19 15:41:03 2016 +0800

----------------------------------------------------------------------

----------------------------------------------------------------------



[03/47] incubator-eagle git commit: EAGLE-271 Topology management in remote/local mode including start/stop operations

Posted by mw...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/java/org/apache/eagle/stream/application/TopologyFactory.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/java/org/apache/eagle/stream/application/TopologyFactory.java b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/java/org/apache/eagle/stream/application/TopologyFactory.java
new file mode 100644
index 0000000..e32f48e
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/java/org/apache/eagle/stream/application/TopologyFactory.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.stream.application;
+
+
+import com.typesafe.config.Config;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+
+public final class TopologyFactory {
+    public static Logger LOG = LoggerFactory.getLogger(TopologyFactory.class);
+    private final static Map<String, TopologyExecutable> topologyCache = Collections.synchronizedMap(new HashMap<String, TopologyExecutable>());
+    public static TopologyExecutable getTopologyInstance(String topologyClass) throws TopologyException {
+        TopologyExecutable instance;
+        if(topologyCache.containsKey(topologyClass)){
+            instance = topologyCache.get(topologyClass);
+        } else {
+            try {
+                LOG.info("load class " + topologyClass + "with classLoader " + TopologyFactory.class.getClassLoader().toString());
+                instance = (TopologyExecutable) Class.forName(topologyClass).newInstance();
+                topologyCache.put(topologyClass, instance);
+            } catch (ClassNotFoundException e) {
+                throw new TopologyException("Topology in type of " + topologyClass + " is not found",e);
+            } catch (InstantiationException | IllegalAccessException e) {
+                throw new TopologyException(e);
+            }
+        }
+        return instance;
+    }
+
+    public static void submit(String topologyClass, Config config) throws TopologyException {
+        TopologyExecutable topology = getTopologyInstance(topologyClass);
+        topology.submit(topologyClass, config);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/AbstractDynamicApplication.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/AbstractDynamicApplication.scala b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/AbstractDynamicApplication.scala
new file mode 100644
index 0000000..3e918cc
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/AbstractDynamicApplication.scala
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.stream.application
+
+import com.typesafe.config.Config
+import org.apache.eagle.datastream.core.StreamContext
+import org.apache.eagle.stream.pipeline.Pipeline
+
+
+trait AbstractDynamicApplication extends TopologyExecutable {
+  def compileStream(application: String, config: Config): StreamContext = {
+    val pipeline = Pipeline.parseStringWithConfig(application, config)
+    Pipeline.compile(pipeline)
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/ApplicationManager.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/ApplicationManager.scala b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/ApplicationManager.scala
new file mode 100644
index 0000000..bbfaedd
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/ApplicationManager.scala
@@ -0,0 +1,126 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.stream.application
+
+import java.util
+
+import com.google.common.base.Preconditions
+import org.apache.eagle.service.application.entity.TopologyExecutionStatus
+import org.apache.eagle.stream.application.impl.StormExecutionPlatform
+import org.slf4j.{Logger, LoggerFactory}
+
+import scala.collection.JavaConversions
+
+
+object ApplicationManager {
+  private val LOG: Logger = LoggerFactory.getLogger(ApplicationManager.getClass)
+  private val workerMap: util.Map[AnyRef, TaskExecutor] = new util.TreeMap[AnyRef, TaskExecutor]
+
+  def getWorkerMap: util.Map[AnyRef, TaskExecutor] = {
+    return workerMap
+  }
+
+  def submit(id: AnyRef, runnable: Runnable): TaskExecutor = {
+    if (workerMap.containsKey(id)) {
+      val executor: Thread = workerMap.get(id)
+      if (!executor.isAlive || executor.getState.equals() ) {
+        LOG.info("Replacing dead executor: {}", executor)
+        workerMap.remove(id)
+      }
+      else {
+        throw new IllegalArgumentException("Duplicated id '" + id + "'")
+      }
+    }
+    val worker: TaskExecutor = new TaskExecutor(runnable)
+    LOG.info("Registering new executor %s: %s".format(id, worker))
+    workerMap.put(id, worker)
+    worker.setName(id.toString)
+    worker.setDaemon(true)
+    worker.start
+    return worker
+  }
+
+  def get(id: AnyRef): TaskExecutor = {
+    Preconditions.checkArgument(workerMap.containsKey(id))
+    return workerMap.get(id)
+  }
+
+  @throws(classOf[Exception])
+  def stop(id: AnyRef): TaskExecutor = {
+    val worker: TaskExecutor = get(id)
+    worker.interrupt
+    //this.workerMap.remove(id)
+    return worker
+  }
+
+  def getWorkerStatus(state: Thread.State): String = {
+    if (whereIn(state, java.lang.Thread.State.RUNNABLE, java.lang.Thread.State.TIMED_WAITING, java.lang.Thread.State.WAITING)) {
+      return TopologyExecutionStatus.STARTED
+    }
+    else if (whereIn(state, java.lang.Thread.State.NEW)) {
+      return TopologyExecutionStatus.STARTING
+    }
+    else if (whereIn(state, java.lang.Thread.State.TERMINATED)) {
+      return TopologyExecutionStatus.STOPPED
+    }
+    throw new IllegalStateException("Unknown state: " + state)
+  }
+
+  def getTopologyStatus(status: String): String = {
+    if(whereIn(status, StormExecutionPlatform.KILLED))
+      return TopologyExecutionStatus.STOPPING
+    return TopologyExecutionStatus.STARTED
+  }
+
+  private def whereIn(status: String, inStatuses: String*): Boolean = {
+    for (_status <- inStatuses) {
+      if (_status.equalsIgnoreCase(status)) {
+        return true
+      }
+    }
+    return false
+  }
+  private def whereIn(state: Thread.State, inStates: Thread.State*): Boolean = {
+    for (_state <- inStates) {
+      if (_state eq state) {
+        return true
+      }
+    }
+    return false
+  }
+
+  def remove(id: AnyRef) {
+    val executor: TaskExecutor = this.get(id)
+    if (executor.isAlive) {
+      throw new RuntimeException("Failed to remove alive executor '" + id + "'")
+    }
+    else {
+      this.workerMap.remove(id)
+    }
+  }
+
+  def stopAll(): Unit ={
+    JavaConversions.collectionAsScalaIterable(workerMap.values()) foreach { worker =>
+      if(!worker.isInterrupted) {
+        worker.interrupt()
+      }
+    }
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/ApplicationManagerUtils.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/ApplicationManagerUtils.scala b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/ApplicationManagerUtils.scala
new file mode 100644
index 0000000..4c2df77
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/ApplicationManagerUtils.scala
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.stream.application
+
+import com.typesafe.config.Config
+import org.apache.eagle.service.application.AppManagerConstants
+import org.apache.eagle.service.application.entity.TopologyExecutionEntity
+
+
+object ApplicationManagerUtils {
+
+  def generateTopologyFullName(topologyExecution: TopologyExecutionEntity) = {
+    val fullName = "eagle-%s-%s-%s".format(topologyExecution.getSite, topologyExecution.getApplication, topologyExecution.getTopology)
+    fullName
+  }
+
+  def buildStormTopologyURL(config: Config, topologyID: String): String = {
+    val clusterURL = if(config.hasPath(AppManagerConstants.CLUSTER_URL)) config.getString(AppManagerConstants.CLUSTER_URL) else AppManagerConstants.DEFAULT_CLUSTER_URL
+    val topologyURL = clusterURL + "/topology.html?id=" + topologyID
+    topologyURL
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/ApplicationSchedulerAsyncDAO.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/ApplicationSchedulerAsyncDAO.scala b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/ApplicationSchedulerAsyncDAO.scala
new file mode 100644
index 0000000..ae0f6e8
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/ApplicationSchedulerAsyncDAO.scala
@@ -0,0 +1,179 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.stream.application
+
+import java.util
+import java.util.concurrent.Callable
+
+import akka.dispatch.Futures
+import com.typesafe.config.Config
+import org.apache.eagle.alert.entity.SiteApplicationServiceEntity
+import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity
+import org.apache.eagle.policy.common.Constants
+import org.apache.eagle.service.application.entity.{TopologyDescriptionEntity, TopologyExecutionEntity, TopologyExecutionStatus, TopologyOperationEntity}
+import org.apache.eagle.service.client.EagleServiceConnector
+import org.apache.eagle.service.client.impl.EagleServiceClientImpl
+import org.slf4j.{Logger, LoggerFactory}
+
+import scala.collection.JavaConversions
+import scala.concurrent.ExecutionContext
+
+
+class ApplicationSchedulerAsyncDAO(config: Config, ex: ExecutionContext) {
+  private val LOG: Logger = LoggerFactory.getLogger(classOf[ApplicationSchedulerAsyncDAO])
+  private val connector: EagleServiceConnector = new EagleServiceConnector(config)
+
+  def getEagleServiceClient(): EagleServiceClientImpl = {
+    return new EagleServiceClientImpl(connector)
+  }
+
+  def readOperationsByStatus(status: String) = {
+    Futures.future(new Callable[util.List[TopologyOperationEntity]]{
+      override def call(): util.List[TopologyOperationEntity] = {
+        val client = getEagleServiceClient()
+        val query = "%s[@status=\"%s\"]{*}".format(Constants.TOPOLOGY_OPERATION_SERVICE_ENDPOINT_NAME, status)
+        val response: GenericServiceAPIResponseEntity[TopologyOperationEntity] = client.search(query).pageSize(Int.MaxValue).send()
+        if(client != null) client.close()
+        if(!response.isSuccess || response.getObj == null)
+          throw new Exception(s"Fail to load operations with status $status")
+        response.getObj
+      }
+    }, ex)
+  }
+
+  def loadAllTopologyExecutionEntities() = {
+    Futures.future(new Callable[util.List[TopologyExecutionEntity]]{
+      override def call(): util.List[TopologyExecutionEntity] = {
+        val client = getEagleServiceClient()
+        val query = "%s[@status != \"%s\"]{*}".format(Constants.TOPOLOGY_EXECUTION_SERVICE_ENDPOINT_NAME, TopologyExecutionStatus.NEW)
+        val response: GenericServiceAPIResponseEntity[TopologyExecutionEntity] = client.search(query).pageSize(Int.MaxValue).send()
+        if(client != null) client.close()
+        if(!response.isSuccess || response.getObj == null) throw new Exception(response.getException)
+        response.getObj
+      }
+    }, ex)
+  }
+
+  def loadTopologyExecutionByName(site: String, appName: String, topologyName: String) = {
+    Futures.future(new Callable[TopologyExecutionEntity]{
+      override def call(): TopologyExecutionEntity = {
+        val client = getEagleServiceClient()
+        val query = "%s[@site=\"%s\" AND @application=\"%s\" AND @topology=\"%s\"]{*}".format(Constants.TOPOLOGY_EXECUTION_SERVICE_ENDPOINT_NAME, site, appName, topologyName)
+        LOG.info(s"query=$query")
+        val response: GenericServiceAPIResponseEntity[TopologyExecutionEntity] = client.search(query).pageSize(Int.MaxValue).send()
+        if(client != null) client.close()
+        if(!response.isSuccess || response.getObj == null)
+          throw new Exception(s"Fail to load topologyExecutionEntity with application=$appName topology=$topologyName due to Exception: ${response.getException}")
+        if(response.getObj.size() == 0 || response.getObj.size() > 1) {
+          throw new Exception(s"Get 0 or more than 1 topologyExecutionEntity with application=$appName topology=$topologyName")
+        }
+        response.getObj.get(0)
+      }
+    }, ex)
+  }
+
+  def loadTopologyDescriptionByName(site: String, application: String, topologyName: String) = {
+    Futures.future(new Callable[TopologyDescriptionEntity]{
+      override def call(): TopologyDescriptionEntity = {
+        val client = getEagleServiceClient()
+        var query = "%s[@topology=\"%s\"]{*}".format(Constants.TOPOLOGY_DESCRIPTION_SERVICE_ENDPOINT_NAME, topologyName)
+        val response: GenericServiceAPIResponseEntity[TopologyDescriptionEntity] = client.search(query).pageSize(Int.MaxValue).send()
+        if(!response.isSuccess || response.getObj == null || response.getObj.size() == 0)
+          throw new Exception(s"Fail to load TopologyDescriptionEntity with site=$site application=$application topology=$topologyName due to Exception: ${response.getException}")
+        val topologyDescriptionEntity = response.getObj.get(0)
+
+        query = "%s[@site=\"%s\" AND @application=\"%s\"]{*}".format(Constants.SITE_APPLICATION_SERVICE_ENDPOINT_NAME, site, application)
+        val configResponse: GenericServiceAPIResponseEntity[SiteApplicationServiceEntity] = client.search(query).pageSize(Int.MaxValue).send()
+        if (client != null) client.close()
+        if(!configResponse.isSuccess || configResponse.getObj == null || configResponse.getObj.size() == 0)
+          throw new Exception(s"Fail to load topology configuration with query=$query due to Exception: ${configResponse.getException}")
+        val siteApplicationEntity = configResponse.getObj.get(0)
+        topologyDescriptionEntity.setContext(siteApplicationEntity.getConfig)
+        topologyDescriptionEntity
+      }
+    }, ex)
+  }
+
+  def updateOperationStatus(operation: TopologyOperationEntity) = {
+    Futures.future(new Callable[GenericServiceAPIResponseEntity[String]]{
+      override def call(): GenericServiceAPIResponseEntity[String] = {
+        if(LOG.isDebugEnabled()) LOG.debug(s"Updating status of command[$operation] as ${operation.getStatus}")
+        val client = getEagleServiceClient()
+        operation.setLastModifiedDate(System.currentTimeMillis())
+        val response= client.update(java.util.Arrays.asList(operation), classOf[TopologyOperationEntity])
+        if(client != null) client.close()
+        if(response.isSuccess) {
+          LOG.info(s"Updated operation status [$operation] as: ${operation.getStatus}")
+        } else {
+          LOG.error(s"Failed to update status as ${operation.getStatus} of command[$operation]")
+          throw new RuntimeException(s"Failed to update command due to exception: ${response.getException}")
+        }
+        response
+      }
+    }, ex)
+  }
+
+  def updateTopologyExecutionStatus(topology: TopologyExecutionEntity) = {
+    Futures.future(new Callable[GenericServiceAPIResponseEntity[String]]{
+      override def call(): GenericServiceAPIResponseEntity[String] = {
+        if(LOG.isDebugEnabled()) LOG.debug(s"Updating status of app[$topology] as ${topology.getStatus}")
+        val client = getEagleServiceClient()
+        topology.setLastModifiedDate(System.currentTimeMillis())
+        if(client != null) client.close()
+        val response= client.update(java.util.Arrays.asList(topology), classOf[TopologyExecutionEntity])
+        if(response.isSuccess) {
+          LOG.info(s"Updated status application[$topology] as: ${topology.getStatus}")
+        } else {
+          LOG.error(s"Failed to update status as ${topology.getStatus} of application[$topology] due to ${response.getException}")
+        }
+        response
+      }
+    }, ex)
+  }
+
+  def clearPendingOperations() = {
+    Futures.future(new Callable[GenericServiceAPIResponseEntity[String]]{
+      override def call(): GenericServiceAPIResponseEntity[String] = {
+        LOG.info("start to clear operation")
+        val query: String = "%s[@status=\"%s\"]{*}".format(Constants.TOPOLOGY_OPERATION_SERVICE_ENDPOINT_NAME, TopologyOperationEntity.OPERATION_STATUS.PENDING)
+        val client = getEagleServiceClient()
+        val response: GenericServiceAPIResponseEntity[TopologyOperationEntity] = client.search(query).pageSize(Int.MaxValue).send()
+        var ret: GenericServiceAPIResponseEntity[String] = new GenericServiceAPIResponseEntity[String]()
+        if (response.isSuccess && response.getObj.size != 0) {
+          val pendingOperations: util.List[TopologyOperationEntity] = response.getObj
+          val failedOperations: util.List[TopologyOperationEntity] = new util.ArrayList[TopologyOperationEntity]
+          JavaConversions.collectionAsScalaIterable(pendingOperations) foreach { operation =>
+            operation.setStatus(TopologyOperationEntity.OPERATION_STATUS.FAILED)
+            failedOperations.add(operation)
+          }
+          ret = client.update(failedOperations, Constants.TOPOLOGY_OPERATION_SERVICE_ENDPOINT_NAME)
+          if (client != null) client.close()
+          if (ret.isSuccess) {
+            LOG.info(s"Successfully clear ${failedOperations.size()} pending operations")
+          } else {
+            LOG.error(s"Failed to clear pending operations due to exception:" + ret.getException)
+          }
+        }
+        ret
+      }
+    }, ex)
+  }
+}
+
+

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/ExecutionPlatform.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/ExecutionPlatform.scala b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/ExecutionPlatform.scala
new file mode 100644
index 0000000..88271bb
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/ExecutionPlatform.scala
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.stream.application
+
+import com.typesafe.config.Config
+import org.apache.eagle.service.application.entity.{TopologyExecutionEntity, TopologyDescriptionEntity}
+
+
+trait ExecutionPlatform {
+  def start(topology: TopologyDescriptionEntity, topologyExecution: TopologyExecutionEntity, config: Config)
+  def stop(topologyExecution: TopologyExecutionEntity, config: Config)
+  def status(topologyExecutions: java.util.List[TopologyExecutionEntity], config: Config)
+  def status(topologyExecution: TopologyExecutionEntity, config: Config)
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/ExecutionPlatformFactory.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/ExecutionPlatformFactory.scala b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/ExecutionPlatformFactory.scala
new file mode 100644
index 0000000..6b9c033
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/ExecutionPlatformFactory.scala
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.stream.application
+
+import org.apache.eagle.service.application.AppManagerConstants
+import org.apache.eagle.stream.application.impl.StormExecutionPlatform
+import org.slf4j.{LoggerFactory, Logger}
+
+import scala.collection.mutable
+
+
+object ExecutionPlatformFactory {
+  private val LOG: Logger = LoggerFactory.getLogger(ExecutionPlatformFactory.getClass)
+
+  var managerCache = new mutable.HashMap[String, ExecutionPlatform] with
+    mutable.SynchronizedMap[String, ExecutionPlatform]
+
+  def getApplicationManager(managerType: String): ExecutionPlatform = {
+    if(managerCache.contains(managerType)) {
+      managerCache.get(managerType).get
+    } else {
+      managerType match {
+        case AppManagerConstants.EAGLE_CLUSTER_STORM =>
+          val instance = new StormExecutionPlatform
+          managerCache.put(managerType, instance)
+          instance
+        case _ =>
+          throw new Exception(s"Invalid managerType $managerType")
+      }
+    }
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/TaskExecutor.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/TaskExecutor.scala b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/TaskExecutor.scala
new file mode 100644
index 0000000..07737ac
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/TaskExecutor.scala
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.stream.application
+
+import org.codehaus.jackson.annotate.JsonIgnore
+
+class TaskExecutor(runnable: Runnable) extends Thread(runnable) {
+
+  @JsonIgnore override def getContextClassLoader: ClassLoader = {
+    return super.getContextClassLoader
+  }
+
+  @JsonIgnore override def getUncaughtExceptionHandler: Thread.UncaughtExceptionHandler = {
+    return super.getUncaughtExceptionHandler
+  }
+
+  def shutdown {
+    this.interrupt
+  }
+
+  def restart {
+    this.interrupt
+    this.start
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/impl/StormDynamicTopology.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/impl/StormDynamicTopology.scala b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/impl/StormDynamicTopology.scala
new file mode 100644
index 0000000..7d52649
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/impl/StormDynamicTopology.scala
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.stream.application.impl
+
+import com.typesafe.config.Config
+import org.apache.eagle.datastream.ExecutionEnvironments
+import org.apache.eagle.datastream.storm.StormExecutionEnvironment
+import org.apache.eagle.stream.application.AbstractDynamicApplication
+import org.slf4j.LoggerFactory
+
+
+object StormDynamicTopology extends AbstractDynamicApplication {
+  val LOG = LoggerFactory.getLogger(classOf[AbstractDynamicApplication])
+
+  override def submit(application: String, config: Config) {
+    val stream = compileStream(application, config)
+    var ret = true
+
+    try {
+      val stormEnv = ExecutionEnvironments.getWithConfig[StormExecutionEnvironment](stream.getConfig)
+      stream.submit(stormEnv)
+    } catch {
+      case e: Throwable =>
+        ret = false
+        LOG.error(e.toString)
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/impl/StormExecutionPlatform.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/impl/StormExecutionPlatform.scala b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/impl/StormExecutionPlatform.scala
new file mode 100644
index 0000000..5b1bb48
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/impl/StormExecutionPlatform.scala
@@ -0,0 +1,197 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.stream.application.impl
+
+import java.net.URLDecoder
+import java.nio.file.{Files, Paths}
+
+import backtype.storm.generated.InvalidTopologyException
+import backtype.storm.utils.{NimbusClient, Utils}
+import com.typesafe.config.{Config, ConfigFactory}
+import org.apache.eagle.common.config.EagleConfigConstants
+import org.apache.eagle.service.application.AppManagerConstants
+import org.apache.eagle.service.application.entity.{TopologyDescriptionEntity, TopologyExecutionEntity, TopologyExecutionStatus}
+import org.apache.eagle.stream.application.{ApplicationManager, ApplicationManagerUtils, ExecutionPlatform, TopologyFactory}
+import org.slf4j.LoggerFactory
+
+import scala.collection.JavaConversions
+
+object StormExecutionPlatform {
+  val ACTIVE: String = "ACTIVE"
+  val INACTIVE: String = "INACTIVE"
+  val KILLED: String = "KILLED"
+  val REBALANCING: String = "REBALANCING"
+}
+
+class StormExecutionPlatform extends ExecutionPlatform {
+  val LOG = LoggerFactory.getLogger(classOf[StormExecutionPlatform])
+
+  private def getNimbusClient(appConfig: com.typesafe.config.Config): NimbusClient = {
+    val conf = Utils.readStormConfig().asInstanceOf[java.util.HashMap[String, Object]]
+    conf.putAll(Utils.readCommandLineOpts().asInstanceOf[java.util.HashMap[String, Object]])
+
+    if(appConfig.hasPath("envContextConfig.nimbusHost")) {
+      LOG.info(s"Setting ${backtype.storm.Config.NIMBUS_HOST} as ${appConfig.getString("envContextConfig.nimbusHost")}")
+      conf.put(backtype.storm.Config.NIMBUS_HOST, appConfig.getString("envContextConfig.nimbusHost"))
+    }
+
+    if(appConfig.hasPath("envContextConfig.nimbusThriftPort")) {
+      LOG.info(s"Setting ${backtype.storm.Config.NIMBUS_THRIFT_PORT} as ${appConfig.getString("envContextConfig.nimbusThriftPort")}")
+      conf.put(backtype.storm.Config.NIMBUS_THRIFT_PORT, appConfig.getNumber("envContextConfig.nimbusThriftPort"))
+    }
+    NimbusClient.getConfiguredClient(conf)
+  }
+
+  def startLocal(topologyName: String, topology: TopologyDescriptionEntity, topologyExecution: TopologyExecutionEntity, config: Config): Unit = {
+    val worker: Thread = ApplicationManager.submit(topologyName, new Runnable {
+      override def run(): Unit = {
+        try {
+          val topologyType = topology.getType.toUpperCase()
+          topologyType match {
+            case TopologyDescriptionEntity.TYPE.CLASS =>
+              TopologyFactory.submit(topology.getExeClass, config)
+            case TopologyDescriptionEntity.TYPE.DYNAMIC =>
+              StormDynamicTopology.submit(topology.getExeClass, config)
+            case m@_ =>
+              LOG.error("Unsupported topology type: " + topology.getType)
+          }
+        } catch {
+          case ex: Throwable =>
+            LOG.error(s"topology $topologyName in local mode is interrupted with ${ex.toString}")
+        }
+      }
+    })
+    topologyExecution.setFullName(topologyName)
+    topologyExecution.setStatus(ApplicationManager.getWorkerStatus(worker.getState))
+    topologyExecution.setDescription("Running inside " + worker.toString + " in local mode")
+  }
+
+  override def start(topology: TopologyDescriptionEntity, topologyExecution: TopologyExecutionEntity, config: Config): Unit = {
+    val stormJarPath: String = URLDecoder.decode(classOf[ExecutionPlatform].getProtectionDomain.getCodeSource.getLocation.getPath, "UTF-8")
+    if (stormJarPath == null || !Files.exists(Paths.get(stormJarPath)) || !stormJarPath.endsWith(".jar")) {
+      val errMsg = s"storm jar file $stormJarPath does not exists, or is a invalid jar file"
+      LOG.error(errMsg)
+      throw new Exception(errMsg)
+    }
+    LOG.info(s"Detected a storm.jar location at: $stormJarPath")
+    System.setProperty("storm.jar", stormJarPath)
+
+    val fullName = ApplicationManagerUtils.generateTopologyFullName(topologyExecution)
+    val extConfigStr = "envContextConfig.topologyName=%s".format(fullName)
+    val extConfig = ConfigFactory.parseString(extConfigStr)
+    val newConfig = extConfig.withFallback(config)
+
+    val mode = if(config.hasPath(AppManagerConstants.RUNNING_MODE)) config.getString(AppManagerConstants.RUNNING_MODE) else EagleConfigConstants.LOCAL_MODE
+    topologyExecution.setMode(mode)
+    if (topologyExecution.getMode.equalsIgnoreCase(EagleConfigConstants.LOCAL_MODE)) {
+      startLocal(fullName, topology, topologyExecution, newConfig)
+      return
+    }
+
+    val topologyType = topology.getType.toUpperCase()
+    topologyType match {
+      case TopologyDescriptionEntity.TYPE.CLASS =>
+        TopologyFactory.submit(topology.getExeClass, newConfig)
+      case TopologyDescriptionEntity.TYPE.DYNAMIC =>
+        StormDynamicTopology.submit(topology.getExeClass, newConfig)
+      case m@_ =>
+        throw new InvalidTopologyException("Unsupported topology type: " + topology.getType)
+    }
+    topologyExecution.setFullName(fullName)
+    //topologyExecution.setStatus(TopologyExecutionStatus.STARTED)
+  }
+
+  override def stop(topologyExecution: TopologyExecutionEntity, config: Config): Unit = {
+    val name: String = ApplicationManagerUtils.generateTopologyFullName(topologyExecution)
+
+    if(topologyExecution.getMode.equalsIgnoreCase(EagleConfigConstants.LOCAL_MODE)) {
+      stopLocal(name, topologyExecution)
+    } else {
+      getNimbusClient(config).getClient.killTopology(name)
+      topologyExecution.setStatus(TopologyExecutionStatus.STOPPING)
+      //topologyExecution.setDescription("")
+    }
+  }
+
+  def stopLocal(name: String, topologyExecution: TopologyExecutionEntity): Unit = {
+      val taskWorker = ApplicationManager.stop(name)
+      topologyExecution.setStatus(ApplicationManager.getWorkerStatus(taskWorker.getState))
+      topologyExecution.setDescription(s"topology status is ${taskWorker.getState}")
+      /*try{
+        ApplicationManager.remove(name)
+      } catch {
+        case ex: IllegalArgumentException =>
+          LOG.warn(s"ApplicationManager.remove($name) failed as it has been removed")
+      }*/
+  }
+
+
+  def getTopology(topologyName: String, config: Config) = {
+    val topologySummery = getNimbusClient(config).getClient.getClusterInfo.get_topologies
+    JavaConversions.collectionAsScalaIterable(topologySummery).find { t => t.get_name.equals(topologyName) }
+    match {
+      case Some(t) => Some(t)
+      case None    => None
+    }
+  }
+
+  override def status(topologyExecution: TopologyExecutionEntity, config: Config): Unit = {
+    val name: String = ApplicationManagerUtils.generateTopologyFullName(topologyExecution)
+
+    if(topologyExecution.getMode.equalsIgnoreCase(EagleConfigConstants.LOCAL_MODE)) {
+      statusLocal(name, topologyExecution)
+    } else {
+      val topology = getTopology(name, config)
+      topology match {
+        case Some(topology) =>
+          topologyExecution.setStatus(ApplicationManager.getTopologyStatus(topology.get_status()))
+          topologyExecution.setUrl(ApplicationManagerUtils.buildStormTopologyURL(config, topology.get_id()))
+          topologyExecution.setDescription(topology.toString)
+        case None =>
+          topologyExecution.setStatus(TopologyExecutionStatus.STOPPED)
+          topologyExecution.setUrl("")
+          topologyExecution.setDescription(s"Fail to find topology: $name")
+      }
+    }
+  }
+
+  def statusLocal(name: String, topologyExecution: TopologyExecutionEntity): Unit = {
+    try {
+      val currentStatus = topologyExecution.getStatus()
+      val newStatus = ApplicationManager.getWorkerStatus(ApplicationManager.get(name).getState())
+      if (!currentStatus.equals(newStatus)) {
+        LOG.info("Status of topology: %s changed from %s to %s".format(topologyExecution.getFullName, currentStatus, newStatus))
+        topologyExecution.setStatus(newStatus)
+        topologyExecution.setDescription(String.format("Status of topology: %s changed from %s to %s", name, currentStatus, newStatus))
+      } else if(currentStatus.equalsIgnoreCase(TopologyExecutionStatus.STOPPED)) {
+        ApplicationManager.remove(name)
+      }
+    }catch {
+      case ex: Throwable =>
+        topologyExecution.setDescription("")
+        topologyExecution.setStatus(TopologyExecutionStatus.STOPPED)
+    }
+  }
+
+  override def status(topologyExecutions: java.util.List[TopologyExecutionEntity], config: Config): Unit = {
+    JavaConversions.collectionAsScalaIterable(topologyExecutions) foreach {
+      topologyExecution => status(topologyExecution, config)
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/scheduler/AppCommandExecutor.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/scheduler/AppCommandExecutor.scala b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/scheduler/AppCommandExecutor.scala
new file mode 100644
index 0000000..8fbf60d
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/scheduler/AppCommandExecutor.scala
@@ -0,0 +1,170 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.stream.application.scheduler
+
+import java.util.concurrent.Callable
+
+import akka.actor.{Actor, ActorLogging}
+import akka.dispatch.Futures
+import com.typesafe.config.{Config, ConfigFactory, ConfigParseOptions, ConfigSyntax}
+import org.apache.eagle.common.config.EagleConfigConstants
+import org.apache.eagle.service.application.AppManagerConstants
+import org.apache.eagle.service.application.entity.TopologyOperationEntity.OPERATION
+import org.apache.eagle.service.application.entity.{TopologyExecutionEntity, TopologyExecutionStatus, TopologyOperationEntity}
+import org.apache.eagle.stream.application.{ApplicationSchedulerAsyncDAO, ExecutionPlatformFactory}
+
+import scala.collection.JavaConversions
+import scala.util.{Failure, Success}
+
+
+private[scheduler] class AppCommandExecutor extends Actor with ActorLogging {
+  @volatile var _config: Config = _
+  @volatile var _dao: ApplicationSchedulerAsyncDAO = _
+
+  import context.dispatcher
+
+  def start(topologyExecution: TopologyExecutionEntity, topologyOperation: TopologyOperationEntity) = {
+    val options: ConfigParseOptions = ConfigParseOptions.defaults.setSyntax(ConfigSyntax.PROPERTIES).setAllowMissing(false)
+    _dao.loadTopologyDescriptionByName(topologyOperation.getSite, topologyOperation.getApplication, topologyOperation.getTopology) onComplete {
+      case Success(topology) =>
+        val topologyConfig: Config = ConfigFactory.parseString(topology.getContext, options)
+
+        if(!topologyConfig.hasPath(EagleConfigConstants.APP_CONFIG)) {
+          topologyOperation.setMessage("Fail to detect topology configuration")
+          topologyOperation.setStatus(TopologyOperationEntity.OPERATION_STATUS.FAILED)
+          _dao.updateOperationStatus(topologyOperation)
+        } else {
+          val config = topologyConfig.getConfig(EagleConfigConstants.APP_CONFIG).withFallback(_config)
+          val clusterType = if(config.hasPath(AppManagerConstants.CLUSTER_ENV)) config.getString(AppManagerConstants.CLUSTER_ENV) else AppManagerConstants.EAGLE_CLUSTER_STORM
+          topologyExecution.setEnvironment(clusterType)
+
+          Futures.future(new Callable[TopologyExecutionEntity]{
+            override def call(): TopologyExecutionEntity = {
+              topologyExecution.setStatus(TopologyExecutionStatus.STARTING)
+              _dao.updateTopologyExecutionStatus(topologyExecution)
+              ExecutionPlatformFactory.getApplicationManager(clusterType).start(topology, topologyExecution, config)
+              topologyOperation.setStatus(TopologyOperationEntity.OPERATION_STATUS.SUCCESS)
+              topologyExecution
+            }
+          }, context.dispatcher) onComplete {
+            case Success(topologyExecutionEntity) =>
+              topologyOperation.setStatus(TopologyOperationEntity.OPERATION_STATUS.SUCCESS)
+              updateStatus(topologyExecution, topologyOperation)
+            case Failure(ex) =>
+              topologyOperation.setMessage(ex.getMessage)
+              topologyOperation.setStatus(TopologyOperationEntity.OPERATION_STATUS.FAILED)
+              _dao.updateOperationStatus(topologyOperation)
+          }
+        }
+
+      case Failure(ex) =>
+        topologyOperation.setMessage(ex.getMessage)
+        topologyOperation.setStatus(TopologyOperationEntity.OPERATION_STATUS.FAILED)
+        _dao.updateOperationStatus(topologyOperation)
+    }
+  }
+
+  def stop(topologyExecution: TopologyExecutionEntity, topologyOperation: TopologyOperationEntity) = {
+    val clusterType = topologyExecution.getEnvironment
+
+    Futures.future(new Callable[TopologyExecutionEntity]{
+      override def call(): TopologyExecutionEntity = {
+        topologyExecution.setStatus(TopologyExecutionStatus.STOPPING)
+        _dao.updateTopologyExecutionStatus(topologyExecution)
+        ExecutionPlatformFactory.getApplicationManager(clusterType).stop(topologyExecution, _config)
+        topologyOperation.setStatus(TopologyOperationEntity.OPERATION_STATUS.SUCCESS)
+        topologyExecution
+      }
+    }, context.dispatcher) onComplete {
+      case Success(topologyExecutionEntity) =>
+        topologyOperation.setStatus(TopologyOperationEntity.OPERATION_STATUS.SUCCESS)
+        updateStatus(topologyExecution, topologyOperation)
+      case Failure(ex) =>
+        topologyOperation.setMessage(ex.toString)
+        topologyOperation.setStatus(TopologyOperationEntity.OPERATION_STATUS.FAILED)
+        _dao.updateOperationStatus(topologyOperation)
+    }
+  }
+
+  def status(topologyExecution: TopologyExecutionEntity) = {
+    val clusterType = topologyExecution.getEnvironment
+
+    Futures.future(new Callable[TopologyExecutionEntity]{
+      override def call(): TopologyExecutionEntity = {
+        ExecutionPlatformFactory.getApplicationManager(clusterType).status(topologyExecution, _config)
+        topologyExecution
+      }
+    }, context.dispatcher) onComplete {
+      case _ =>
+        _dao.updateTopologyExecutionStatus(topologyExecution)
+    }
+  }
+
+  def updateStatus(topologyExecution: TopologyExecutionEntity, topologyOperation: TopologyOperationEntity): Unit = {
+    _dao.updateOperationStatus(topologyOperation)
+    _dao.updateTopologyExecutionStatus(topologyExecution)
+  }
+
+  def execute(topologyExecution: TopologyExecutionEntity, topologyOperation: TopologyOperationEntity): Unit = {
+    try {
+      topologyOperation.getOperation match {
+        case OPERATION.START =>
+          start(topologyExecution, topologyOperation)
+        case OPERATION.STOP =>
+          stop(topologyExecution, topologyOperation)
+        case m@_ =>
+          log.warning("Unsupported operation: " + topologyOperation)
+          throw new Exception(s"Unsupported operation: ${topologyOperation.getOperation}, possible values are START/STOP")
+      }
+    } catch {
+      case e: Throwable =>
+        topologyOperation.setMessage(e.getMessage)
+        topologyOperation.setStatus(TopologyOperationEntity.OPERATION_STATUS.FAILED)
+        _dao.updateOperationStatus(topologyOperation)
+    }
+  }
+
+  override def receive = {
+    case InitializationEvent(config: Config) =>
+      _config = config
+      _dao = new ApplicationSchedulerAsyncDAO(config, context.dispatcher)
+    case SchedulerCommand(topologyExecution, topologyOperation) =>
+      execute(topologyExecution, topologyOperation)
+    case HealthCheckerEvent =>
+      _dao.loadAllTopologyExecutionEntities() onComplete {
+        case Success(topologyExecutions) =>
+          log.info(s"Load ${topologyExecutions.size()} topologies in execution")
+          JavaConversions.collectionAsScalaIterable(topologyExecutions) foreach { topologyExecution =>
+            try{
+              status(topologyExecution)
+            } catch {
+              case ex: Throwable =>
+                log.error(ex.getMessage)
+            }
+          }
+        case Failure(ex) =>
+          log.error(s"Fail to load any topologyExecutionEntity due to Exception: ${ex.getMessage}")
+      }
+    case TerminatedEvent =>
+      context.stop(self)
+    case m@_ =>
+      log.warning("Unsupported operation $m")
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/scheduler/AppCommandLoader.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/scheduler/AppCommandLoader.scala b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/scheduler/AppCommandLoader.scala
new file mode 100644
index 0000000..c731846
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/scheduler/AppCommandLoader.scala
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.stream.application.scheduler
+
+import akka.actor.{Actor, ActorLogging}
+import com.typesafe.config.Config
+import org.apache.eagle.service.application.entity.TopologyOperationEntity.OPERATION_STATUS
+import org.apache.eagle.stream.application.ApplicationSchedulerAsyncDAO
+
+import scala.collection.JavaConversions
+import scala.util.{Failure, Success}
+
+
+private[scheduler] class AppCommandLoader extends Actor with ActorLogging {
+  @volatile var _config: Config = null
+  @volatile var _dao: ApplicationSchedulerAsyncDAO = null
+
+  import context.dispatcher
+
+  override def receive = {
+    case InitializationEvent(config: Config) =>
+      _config = config
+      _dao = new ApplicationSchedulerAsyncDAO(config, context.dispatcher)
+    case ClearPendingOperation =>
+      if(_dao == null) _dao = new ApplicationSchedulerAsyncDAO(_config, context.dispatcher)
+      _dao.clearPendingOperations()
+    case CommandLoaderEvent => {
+      val _sender = sender()
+      _dao.readOperationsByStatus(OPERATION_STATUS.INITIALIZED) onComplete {
+        case Success(commands) => {
+          log.info(s"Load ${commands.size()} new commands")
+          JavaConversions.collectionAsScalaIterable(commands) foreach { command =>
+            command.setStatus(OPERATION_STATUS.PENDING)
+            _dao.updateOperationStatus(command) onComplete {
+              case Success(response) =>
+                _dao.loadTopologyExecutionByName(command.getSite, command.getApplication, command.getTopology) onComplete {
+                  case Success(topologyExecution) => {
+                    _sender ! SchedulerCommand(topologyExecution, command)
+                  }
+                  case Failure(ex) =>
+                    log.error(ex.getMessage)
+                    command.setMessage(ex.getMessage)
+                    command.setStatus(OPERATION_STATUS.FAILED)
+                    _dao.updateOperationStatus(command)
+                }
+              case Failure(ex) =>
+                log.error(s"Got an exception to update command status $command: ${ex.getMessage}")
+                command.setMessage(ex.getMessage)
+                command.setStatus(OPERATION_STATUS.FAILED)
+                _dao.updateOperationStatus(command)
+            }
+          }
+        }
+        case Failure(ex) =>
+          log.error(s"Failed to get commands due to exception ${ex.getMessage}")
+      }
+    }
+    case TerminatedEvent =>
+      context.stop(self)
+    case m@_ => throw new UnsupportedOperationException(s"Event is not supported $m")
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/scheduler/ApplicationScheduler.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/scheduler/ApplicationScheduler.scala b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/scheduler/ApplicationScheduler.scala
new file mode 100644
index 0000000..476a3fb
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/scheduler/ApplicationScheduler.scala
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.stream.application.scheduler
+
+import akka.actor.{ActorSystem, Props}
+import com.typesafe.config.Config
+import org.apache.eagle.service.application.AppManagerConstants
+import org.apache.eagle.service.application.entity.{TopologyExecutionEntity, TopologyOperationEntity}
+import org.apache.eagle.stream.application.ApplicationManager
+
+import scala.concurrent.duration._
+
+
+private[scheduler] class ScheduleEvent
+private[scheduler] case class InitializationEvent(config: Config) extends ScheduleEvent
+private[scheduler] case class TerminatedEvent() extends ScheduleEvent
+private[scheduler] case class CommandLoaderEvent() extends ScheduleEvent
+private[scheduler] case class HealthCheckerEvent() extends ScheduleEvent
+private[scheduler] case class ClearPendingOperation() extends ScheduleEvent
+private[scheduler] case class SchedulerCommand(topologyExecution: TopologyExecutionEntity, topologyOperation: TopologyOperationEntity) extends ScheduleEvent
+
+case class EagleServiceUnavailableException(message:String) extends Exception(message)
+case class DuplicatedDefinitionException(message:String) extends Exception(message)
+case class LoadTopologyFailureException(message:String) extends Exception(message)
+
+
+/**
+ * 1. Sync command from eagle service
+ * 2. Coordinate command to different actor
+ * 3. Actor execute command as requested
+ */
+class ApplicationScheduler {
+  //val config = ConfigFactory.load()
+  val DEFAULT_COMMAND_LOADER_INTERVAL_SECS = 2
+  val DEFAULT_HEALTH_CHECK_INTERVAL_SECS = 5
+
+  def start(config: Config) = {
+    val system = ActorSystem("application-manager-scheduler", config)
+    system.log.info(s"Started actor system: $system")
+
+    import system.dispatcher
+
+    val commandLoaderIntervalSecs: Long = if(config.hasPath(AppManagerConstants.APP_COMMAND_LOADER_INTERVAL_SECS)) config.getLong(AppManagerConstants.APP_COMMAND_LOADER_INTERVAL_SECS) else DEFAULT_COMMAND_LOADER_INTERVAL_SECS
+    val healthCheckIntervalSecs: Long = if(config.hasPath(AppManagerConstants.APP_HEALTH_CHECK_INTERVAL_SECS)) config.getLong(AppManagerConstants.APP_HEALTH_CHECK_INTERVAL_SECS) else DEFAULT_HEALTH_CHECK_INTERVAL_SECS
+
+    val coordinator = system.actorOf(Props[StreamAppCoordinator])
+    system.scheduler.scheduleOnce(0 seconds, coordinator, InitializationEvent(config))
+    system.scheduler.scheduleOnce(1 seconds, coordinator, ClearPendingOperation)
+    system.scheduler.schedule(2.seconds, commandLoaderIntervalSecs.seconds, coordinator, CommandLoaderEvent)
+    system.scheduler.schedule(10.seconds, healthCheckIntervalSecs.seconds, coordinator, HealthCheckerEvent)
+
+    /*
+     registerOnTermination is called when you have shut down the ActorSystem (system.shutdown),
+     and the callbacks will be executed after all actors have been stopped.
+     */
+    system.registerOnTermination(new Runnable {
+      override def run(): Unit = {
+        coordinator ! TerminatedEvent
+        ApplicationManager.stopAll()
+      }
+    })
+    system
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/scheduler/StreamAppCoordinator.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/scheduler/StreamAppCoordinator.scala b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/scheduler/StreamAppCoordinator.scala
new file mode 100644
index 0000000..17006ee
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/scheduler/StreamAppCoordinator.scala
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.stream.application.scheduler
+
+import akka.actor.{Actor, ActorLogging, ActorRef, Props}
+
+private[scheduler] class StreamAppCoordinator extends Actor with ActorLogging {
+  var commandLoader: ActorRef = null
+  var commandExecutor: ActorRef = null
+
+
+  override def preStart(): Unit = {
+    commandLoader = context.actorOf(Props[AppCommandLoader], "command-loader")
+    commandExecutor = context.actorOf(Props[AppCommandExecutor], "command-worker")
+  }
+
+  override def receive = {
+    case InitializationEvent(config) => {
+      log.info(s"Config updated: $config")
+      commandLoader ! InitializationEvent(config)
+      commandExecutor ! InitializationEvent(config)
+    }
+    case ClearPendingOperation =>
+      commandLoader ! ClearPendingOperation
+    case CommandLoaderEvent =>
+      commandLoader ! CommandLoaderEvent
+    case command: SchedulerCommand =>
+      log.info(s"Executing command: $SchedulerCommand")
+      commandExecutor ! command
+    case HealthCheckerEvent =>
+      commandExecutor ! HealthCheckerEvent
+    case TerminatedEvent =>
+      log.info("Coordinator exit ...")
+      context.stop(self)
+    case m@_ =>
+      log.warning(s"Coordinator Unsupported message: $m")
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-stream-application-manager/src/test/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-stream-application-manager/src/test/resources/application.conf b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/test/resources/application.conf
new file mode 100644
index 0000000..4c21a7c
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/test/resources/application.conf
@@ -0,0 +1,42 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+### scheduler propertise
+appCommandLoaderIntervalSecs = 1
+appHealthCheckIntervalSecs = 5
+
+### execution platform properties
+envContextConfig.env = "storm"
+envContextConfig.url = "http://sandbox.hortonworks.com:8744"
+envContextConfig.nimbusHost = "sandbox.hortonworks.com"
+envContextConfig.nimbusThriftPort = 6627
+envContextConfig.jarFile = "/dir-to-jar/eagle-topology-0.3.0-incubating-assembly.jar"
+
+### default topology properties
+eagleProps.mailHost = "mailHost.com"
+eagleProps.mailSmtpPort = "25"
+eagleProps.mailDebug = "true"
+eagleProps.eagleService.host = "localhost"
+eagleProps.eagleService.port = 9099
+eagleProps.eagleService.username = "admin"
+eagleProps.eagleService.password = "secret"
+eagleProps.dataJoinPollIntervalSec = 30
+
+dynamicConfigSource.enabled = true
+dynamicConfigSource.initDelayMillis = 0
+dynamicConfigSource.delayMillis = 30000
+
+

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-stream-application-manager/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-stream-application-manager/src/test/resources/log4j.properties b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/test/resources/log4j.properties
new file mode 100644
index 0000000..25331ab
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/test/resources/log4j.properties
@@ -0,0 +1,35 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+log4j.rootLogger=INFO, stdout
+
+ eagle.log.dir=../logs
+ eagle.log.file=eagle.log
+
+# standard output
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
+
+# Daily Rolling File Appender
+ log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
+ log4j.appender.DRFA.File=${eagle.log.dir}/${eagle.log.file}
+ log4j.appender.DRFA.DatePattern=.yyyy-MM-dd
+## 30-day backup
+# log4j.appender.DRFA.MaxBackupIndex=30
+ log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
+
+# Pattern format: Date LogLevel LoggerName LogMessage
+log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-stream-application-manager/src/test/scala/org/apache/eagle/stream/application/scheduler/MockTopology.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-stream-application-manager/src/test/scala/org/apache/eagle/stream/application/scheduler/MockTopology.scala b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/test/scala/org/apache/eagle/stream/application/scheduler/MockTopology.scala
new file mode 100644
index 0000000..e87ee92
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/test/scala/org/apache/eagle/stream/application/scheduler/MockTopology.scala
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.eagle.stream.application.scheduler
+
+import com.typesafe.config.Config
+import org.apache.eagle.stream.application.TopologyExecutable
+import org.slf4j.LoggerFactory
+
+class MockTopology extends TopologyExecutable {
+  private val LOG = LoggerFactory.getLogger(classOf[MockTopology])
+  override def submit(topology: String, config: Config): Unit = {
+    LOG.info(s"$topology is running")
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-stream-application-manager/src/test/scala/org/apache/eagle/stream/application/scheduler/StormApplicationManagerSpec.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-stream-application-manager/src/test/scala/org/apache/eagle/stream/application/scheduler/StormApplicationManagerSpec.scala b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/test/scala/org/apache/eagle/stream/application/scheduler/StormApplicationManagerSpec.scala
new file mode 100644
index 0000000..1cad3a7
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/test/scala/org/apache/eagle/stream/application/scheduler/StormApplicationManagerSpec.scala
@@ -0,0 +1,40 @@
+package org.apache.eagle.stream.application.scheduler
+
+import com.typesafe.config.ConfigFactory
+import org.apache.eagle.common.config.EagleConfigConstants
+import org.apache.eagle.stream.application.ExecutionPlatform
+import org.apache.eagle.stream.application.impl.StormExecutionPlatform
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+
+object StormApplicationManagerSpec extends App {
+  val manager: ExecutionPlatform = new StormExecutionPlatform
+  val baseConfig = ConfigFactory.load()
+  val topoConfigStr: String = "webConfig{\"hbase.zookeeper.property.clientPort\":\"2181\", \"hbase.zookeeper.quorum\":\"localhost\"}\nappConfig{\n  \"envContextConfig\" : {\n    \"env\" : \"storm\",\n    \"mode\" : \"cluster\",\n    \"topologyName\" : \"sandbox-hbaseSecurityLog-topology\",\n    \"stormConfigFile\" : \"security-auditlog-storm.yaml\",\n    \"parallelismConfig\" : {\n      \"kafkaMsgConsumer\" : 1,\n      \"hbaseSecurityLogAlertExecutor*\" : 1\n    }\n  },\n  \"dataSourceConfig\": {\n    \"topic\" : \"sandbox_hbase_security_log\",\n    \"zkConnection\" : \"127.0.0.1:2181\",\n    \"zkConnectionTimeoutMS\" : 15000,\n    \"brokerZkPath\" : \"/brokers\",\n    \"fetchSize\" : 1048586,\n    \"deserializerClass\" : \"org.apache.eagle.security.hbase.parse.HbaseAuditLogKafkaDeserializer\",\n    \"transactionZKServers\" : \"127.0.0.1\",\n    \"transactionZKPort\" : 2181,\n    \"transactionZKRoot\" : \"/consumers\",\n    \"consumerGroupId\" : \"eagle.hbasesecurity.consumer\",\n  
   \"transactionStateUpdateMS\" : 2000\n  },\n  \"alertExecutorConfigs\" : {\n     \"hbaseSecurityLogAlertExecutor\" : {\n       \"parallelism\" : 1,\n       \"partitioner\" : \"org.apache.eagle.policy.DefaultPolicyPartitioner\"\n       \"needValidation\" : \"true\"\n     }\n  },\n  \"eagleProps\" : {\n    \"site\" : \"sandbox\",\n    \"application\": \"hbaseSecurityLog\",\n    \"dataJoinPollIntervalSec\" : 30,\n    \"mailHost\" : \"mailHost.com\",\n    \"mailSmtpPort\":\"25\",\n    \"mailDebug\" : \"true\",\n    \"eagleService\": {\n      \"host\": \"localhost\",\n      \"port\": 9099\n      \"username\": \"admin\",\n      \"password\": \"secret\"\n    }\n  },\n  \"dynamicConfigSource\" : {\n    \"enabled\" : true,\n    \"initDelayMillis\" : 0,\n    \"delayMillis\" : 30000\n  }\n}"
+
+  val topoConfig = ConfigFactory.parseString(topoConfigStr)
+  val conf = topoConfig.getConfig(EagleConfigConstants.APP_CONFIG).withFallback(baseConfig)
+
+  //val (ret, nextState) = manager.execute("START", topologyDescModel, null, conf)
+  //println(s"Result: ret=$ret, nextState=$nextState")
+}
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-stream-application-manager/src/test/scala/org/apache/eagle/stream/application/scheduler/TestScheduler.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-stream-application-manager/src/test/scala/org/apache/eagle/stream/application/scheduler/TestScheduler.scala b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/test/scala/org/apache/eagle/stream/application/scheduler/TestScheduler.scala
new file mode 100644
index 0000000..3db2d67
--- /dev/null
+++ b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/test/scala/org/apache/eagle/stream/application/scheduler/TestScheduler.scala
@@ -0,0 +1,61 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eagle.stream.application.scheduler
+
+import akka.actor.{ActorSystem, Props}
+import akka.testkit.{TestActorRef, TestKit}
+import com.typesafe.config.ConfigFactory
+import org.scalatest.{Ignore, BeforeAndAfterAll, MustMatchers, WordSpecLike}
+
+@Ignore
+class TestSchedulerSpec extends TestKit(ActorSystem("stream-app-scheduler"))
+with WordSpecLike with MustMatchers with BeforeAndAfterAll {
+
+  "A Scheduler actor" must {
+    "Forward a message it receives" in {
+      val coordinator = TestActorRef[StreamAppCoordinator]
+      coordinator ! CommandLoaderEvent
+      expectNoMsg()
+    }
+  }
+
+  "A Integrated test" must {
+    "run end-to-end" in {
+      val coordinator = system.actorOf(Props[StreamAppCoordinator])
+      coordinator ! CommandLoaderEvent
+      expectNoMsg()
+    }
+  }
+
+  override def afterAll(): Unit = {
+    super.afterAll()
+    system.shutdown()
+  }
+}
+
+@Ignore
+object TestStreamAppScheduler extends App {
+  val conf: String = """
+                          akka.loglevel = "DEBUG"
+                          akka.actor.debug {
+                            receive = on
+                            lifecycle = on
+                          }
+                     """
+  new ApplicationScheduler().start(ConfigFactory.parseString(conf))
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/pom.xml b/eagle-core/eagle-application-management/pom.xml
new file mode 100644
index 0000000..0637d7e
--- /dev/null
+++ b/eagle-core/eagle-application-management/pom.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>eagle-core</artifactId>
+        <groupId>org.apache.eagle</groupId>
+        <version>0.3.0-incubating</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>eagle-application-management</artifactId>
+    <packaging>pom</packaging>
+    <description>Eagle Application Management</description>
+
+    <modules>
+        <module>eagle-stream-application-manager</module>
+        <module>eagle-application-service</module>
+    </modules>
+
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/parser/Pipeline.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/parser/Pipeline.scala b/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/parser/Pipeline.scala
index cc1e009..eb09156 100644
--- a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/parser/Pipeline.scala
+++ b/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/parser/Pipeline.scala
@@ -78,6 +78,12 @@ trait PipelineParser{
   }
 
   def parseString(config:String):Pipeline = parse(ConfigFactory.parseString(config))
+
+  def parseStringWithConfig(dataFlow:String, config: Config) = {
+    val pConfig = config.withFallback(ConfigFactory.parseString(dataFlow))
+    parse(pConfig)
+  }
+
   def parseResource(resource:String):Pipeline = {
     // TODO: Load environment, currently hard-code with storm
     if(resource.startsWith("/") || resource.startsWith("./")){

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormTopologyExecutorImpl.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormTopologyExecutorImpl.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormTopologyExecutorImpl.scala
index 5d64c4c..54d09e6 100644
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormTopologyExecutorImpl.scala
+++ b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormTopologyExecutorImpl.scala
@@ -22,6 +22,7 @@ import _root_.storm.trident.spout.RichSpoutBatchExecutor
 import backtype.storm.generated.StormTopology
 import backtype.storm.utils.Utils
 import backtype.storm.{Config, LocalCluster, StormSubmitter}
+import org.apache.eagle.common.config.EagleConfigConstants
 import org.apache.eagle.datastream.core.AbstractTopologyExecutor
 import org.apache.thrift7.transport.TTransportException
 import org.slf4j.LoggerFactory
@@ -31,7 +32,7 @@ case class StormTopologyExecutorImpl(topology: StormTopology, config: com.typesa
   val LOG = LoggerFactory.getLogger(classOf[StormTopologyExecutorImpl])
   @throws(classOf[Exception])
   def execute {
-    val localMode: Boolean = config.getString("envContextConfig.mode").equalsIgnoreCase("local")
+    val localMode: Boolean = config.getString("envContextConfig.mode").equalsIgnoreCase(EagleConfigConstants.LOCAL_MODE)
     val conf: Config = new Config
     conf.put(RichSpoutBatchExecutor.MAX_BATCH_SIZE_CONF, Int.box(64 * 1024))
     conf.put(Config.TOPOLOGY_RECEIVER_BUFFER_SIZE, Int.box(8))
@@ -91,12 +92,15 @@ case class StormTopologyExecutorImpl(topology: StormTopology, config: com.typesa
       LOG.info("Submitting as local mode")
       val cluster: LocalCluster = new LocalCluster
       cluster.submitTopology(topologyName, conf, topology)
-      while(true) {
-        try {
+      try {
+        while(true) {
           Utils.sleep(Integer.MAX_VALUE)
-        } catch {
-          case _: Throwable => () // Do nothing
         }
+      } catch {
+        case ex: Throwable =>
+          LOG.warn("Sleep is interrupted with " + ex.toString)
+          cluster.killTopology(topologyName)
+          cluster.shutdown
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/Constants.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/Constants.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/Constants.java
index ca65669..2a33460 100644
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/Constants.java
+++ b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/Constants.java
@@ -32,6 +32,10 @@ public class Constants {
 	public static final String APPLICATION_DESCRIPTION_SERVICE_ENDPOINT_NAME = "ApplicationDescService";
 	public static final String FEATURE_DESCRIPTION_SERVICE_ENDPOINT_NAME = "FeatureDescService";
 
+	public static final String TOPOLOGY_EXECUTION_SERVICE_ENDPOINT_NAME = "TopologyExecutionService";
+	public static final String TOPOLOGY_OPERATION_SERVICE_ENDPOINT_NAME = "TopologyOperationService";
+	public static final String TOPOLOGY_DESCRIPTION_SERVICE_ENDPOINT_NAME = "TopologyDescriptionService";
+
 	public static final String GENERIC_RESOURCE_SERVICE_ENDPOINT_NAME = "GenericResourceService";
 	
 	public final static String AGGREGATE_DEFINITION_SERVICE_ENDPOINT_NAME = "AggregateDefinitionService";

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigConstants.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigConstants.java b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigConstants.java
index 0a035b8..26d7b49 100644
--- a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigConstants.java
+++ b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigConstants.java
@@ -58,5 +58,8 @@ public final class EagleConfigConstants {
 
     public final static String WEB_CONFIG = "web";
     public final static String APP_CONFIG = "app";
+    public final static String CLASSIFICATION_CONFIG = "classification";
 
+    public final static String LOCAL_MODE = "local";
+    public final static String CLUSTER_MODE = "cluster";
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/CompiledQuery.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/CompiledQuery.java b/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/CompiledQuery.java
index 34761cb..e3368ab 100644
--- a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/CompiledQuery.java
+++ b/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/CompiledQuery.java
@@ -214,10 +214,23 @@ public class CompiledQuery {
         EntityDefinition ed = EntityDefinitionManager.getEntityByServiceName(serviceName);
         if(ed.isTimeSeries()){
             // TODO check Time exists for timeseries or topology data
-            this.searchCondition.setStartTime(this.rawQuery.getStartTime());
-            this.searchCondition.setEndTime(this.rawQuery.getEndTime());
-            this.setStartTime(DateTimeUtil.humanDateToSeconds(this.getRawQuery().getStartTime()) * 1000);
-            this.setEndTime(DateTimeUtil.humanDateToSeconds(this.getRawQuery().getEndTime()) * 1000);
+            long endTimeMillis = System.currentTimeMillis();
+            long startTimeMills = endTimeMillis - 30 * DateTimeUtil.ONEDAY;
+            String endTime = DateTimeUtil.millisecondsToHumanDateWithSeconds(endTimeMillis);
+            String startTime = DateTimeUtil.millisecondsToHumanDateWithSeconds(startTimeMills);
+
+            if(this.rawQuery.getStartTime() != null && this.rawQuery.getEndTime() != null) {
+                endTime = this.rawQuery.getEndTime();
+                startTime = this.rawQuery.getStartTime();
+                endTimeMillis = DateTimeUtil.humanDateToSeconds(endTime) * 1000;
+                startTimeMills = DateTimeUtil.humanDateToSeconds(startTime) * 1000;
+            } else {
+                LOG.warn("startTime or endTime is not given, use [currentSystemTime - 30 days, currentSystemTime]");
+            }
+            this.searchCondition.setStartTime(startTime);
+            this.searchCondition.setEndTime(endTime);
+            this.setStartTime(startTimeMills);
+            this.setEndTime(endTimeMillis);
         }else{
             this.searchCondition.setStartTime("0");
             this.searchCondition.setEndTime("1");



[14/47] incubator-eagle git commit: EAGLE-297 Email with authentication Email with authentication can not be validated and sent out

Posted by mw...@apache.org.
EAGLE-297 Email with authentication
Email with authentication can not be validated and sent out

https://issues.apache.org/jira/browse/EAGLE-297

Author: Huizhi Lu, ihuizhi.lu@gmail.com
Reviewer: Qingwen, Zhao

Closes #187


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/8dbbf710
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/8dbbf710
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/8dbbf710

Branch: refs/heads/master
Commit: 8dbbf7100f12ddd75215e1ae99384623dd5cf3f7
Parents: 50ff38d
Author: yonzhang <yo...@gmail.com>
Authored: Mon May 23 17:17:20 2016 -0700
Committer: yonzhang <yo...@gmail.com>
Committed: Mon May 23 17:17:20 2016 -0700

----------------------------------------------------------------------
 .../notification/email/AlertEmailSender.java    | 46 +++++++++++++++++---
 1 file changed, 40 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/8dbbf710/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailSender.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailSender.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailSender.java
index 2b18f1e..c2c4949 100644
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailSender.java
+++ b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailSender.java
@@ -30,6 +30,7 @@ import org.apache.eagle.common.DateTimeUtil;
 import org.apache.eagle.common.email.EagleMailClient;
 import com.netflix.config.ConcurrentMapConfiguration;
 import com.typesafe.config.ConfigObject;
+import com.typesafe.config.ConfigValue;
 
 public class AlertEmailSender implements Runnable {
 
@@ -45,12 +46,21 @@ public class AlertEmailSender implements Runnable {
     private final static Logger LOG = LoggerFactory.getLogger(AlertEmailSender.class);
     private final static int MAX_RETRY_COUNT = 3;
 
-    private static final String MAIL_HOST = "mail.host";
+    private static final String MAIL_AUTH = "mail.smtp.auth";
+    private static final String MAIL_HOST = "mail.smtp.host";
     private static final String MAIL_PORT = "mail.smtp.port";
+    private static final String MAIL_USER = "mail.user";
+    private static final String MAIL_PASSWORD = "mail.password";
+    private static final String MAIL_TLS_ENABLE = "mail.smtp.starttls.enable";
     private static final String MAIL_DEBUG = "mail.debug";
 
+    private static final String CONF_KEY_MAIL_AUTH = "mailSmtpAuth";
     private static final String CONF_KEY_MAIL_HOST = "mailHost";
     private static final String CONF_KEY_MAIL_PORT = "mailSmtpPort";
+    private static final String CONF_KEY_MAIL_USER = "mailSmtpUser";
+    private static final String CONF_KEY_MAIL_PASSWORD = "mailSmtpPassword";
+    private static final String CONF_KEY_MAIL_SSL_ENABLE = "mailSmtpSslEnable";
+    private static final String CONF_KEY_MAIL_TLS_ENABLE = "mailSmtpTlsEnable";
     private static final String CONF_KEY_MAIL_DEBUG = "mailDebug";
 
     private ConfigObject eagleProps;
@@ -91,25 +101,49 @@ public class AlertEmailSender implements Runnable {
         int count = 0;
         boolean success = false;
         while(count++ < MAX_RETRY_COUNT && !success){
-            LOG.info("Sending email, tried: " + count+", max: "+MAX_RETRY_COUNT);
+            LOG.info("Sending email, tried: " + count+", max: "+ MAX_RETRY_COUNT);
             try {
                 final EagleMailClient client;
                 if (eagleProps != null) {
                     ConcurrentMapConfiguration con = new ConcurrentMapConfiguration();
                     con.addProperty(MAIL_HOST, eagleProps.get(CONF_KEY_MAIL_HOST).unwrapped());
                     con.addProperty(MAIL_PORT, eagleProps.get(CONF_KEY_MAIL_PORT).unwrapped());
-                    if (eagleProps.get(CONF_KEY_MAIL_DEBUG) != null) {
-                        con.addProperty(MAIL_DEBUG, eagleProps.get(CONF_KEY_MAIL_DEBUG).unwrapped());
+
+                    // Add authentication for email.
+                    ConfigValue authValue = eagleProps.get(CONF_KEY_MAIL_AUTH);
+                    if (authValue != null && Boolean.parseBoolean(String.valueOf(authValue.unwrapped()))) {
+                        con.addProperty(MAIL_AUTH, authValue.unwrapped());
+                        con.addProperty(MAIL_USER, eagleProps.get(CONF_KEY_MAIL_USER).unwrapped());
+                        con.addProperty(MAIL_PASSWORD, eagleProps.get(CONF_KEY_MAIL_PASSWORD).unwrapped());
+
+                        // Via SSL.
+                        ConfigValue sslValue = eagleProps.get(CONF_KEY_MAIL_SSL_ENABLE);
+                        if (sslValue != null && Boolean.parseBoolean(String.valueOf(sslValue.unwrapped()))) {
+                            con.addProperty("mail.smtp.socketFactory.port", "465");
+                            con.addProperty("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
+                        }
+
+                        // Via TLS.
+                        ConfigValue tlsValue = eagleProps.get(CONF_KEY_MAIL_TLS_ENABLE);
+                        if (tlsValue != null && Boolean.parseBoolean(String.valueOf(tlsValue.unwrapped()))) {
+                            con.addProperty(MAIL_TLS_ENABLE, tlsValue.unwrapped());
+                        }
+                    }
+
+                    ConfigValue debugValue = eagleProps.get(CONF_KEY_MAIL_DEBUG);
+                    if (debugValue != null && Boolean.parseBoolean(String.valueOf(debugValue.unwrapped()))) {
+                        con.addProperty(MAIL_DEBUG, debugValue.unwrapped());
                     }
+
                     client = new EagleMailClient(con);
-                }
-                else {
+                } else {
                     client = new EagleMailClient();
                 }
                 String env = "prod";
                 if (eagleProps != null && eagleProps.get("env") != null) {
                     env = (String) eagleProps.get("env").unwrapped();
                 }
+
                 LOG.info("Env is: " + env);
                 final VelocityContext context = new VelocityContext();
                 generateCommonContext(context);


[27/47] incubator-eagle git commit: EAGLE-309: Add code formatter template

Posted by mw...@apache.org.
EAGLE-309: Add code formatter template

Author: ralphsu
Reviewer: ralphsu
Committer: ralphsu

Closes #199


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/5a5a17c3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/5a5a17c3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/5a5a17c3

Branch: refs/heads/master
Commit: 5a5a17c3dff1e15bf72df267f8b2fc0739b95114
Parents: 750b4c9
Author: Ralph, Su <su...@gmail.com>
Authored: Wed May 25 18:07:20 2016 +0800
Committer: Ralph, Su <su...@gmail.com>
Committed: Tue May 31 15:34:38 2016 +0800

----------------------------------------------------------------------
 eagle-dev/eclipse-java-formatter.xml | 311 ++++++++++++++++++++++++++++++
 1 file changed, 311 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/5a5a17c3/eagle-dev/eclipse-java-formatter.xml
----------------------------------------------------------------------
diff --git a/eagle-dev/eclipse-java-formatter.xml b/eagle-dev/eclipse-java-formatter.xml
new file mode 100755
index 0000000..2ca80f2
--- /dev/null
+++ b/eagle-dev/eclipse-java-formatter.xml
@@ -0,0 +1,311 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~    http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<profiles version="12">
+<profile kind="CodeFormatterProfile" name="Apache_Eagle_Formatter" version="12">
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
+<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="120"/>
+<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
+<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
+<setting id="org.eclipse.jdt.core.compiler.source" value="1.8"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.8"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.8"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="120"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
+</profile>
+</profiles>


[16/47] incubator-eagle git commit: EAGLE-236 Change project pom to use 0.4 version Change project version to "0.4.0-SNAPSHOT" since "v0.3.0" has been released.

Posted by mw...@apache.org.
EAGLE-236 Change project pom to use 0.4 version
Change project version to "0.4.0-SNAPSHOT" since "v0.3.0" has been released.

Author: Huizhi Lu, ihuizhi.lu@gmail.com
Reviewer: Hao Chen

Closes #181


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/e7433a3b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/e7433a3b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/e7433a3b

Branch: refs/heads/master
Commit: e7433a3b1647131433fd1473d9514d64fdac5643
Parents: 8df78b1
Author: yonzhang <yo...@gmail.com>
Authored: Mon May 23 17:21:12 2016 -0700
Committer: yonzhang <yo...@gmail.com>
Committed: Mon May 23 17:21:12 2016 -0700

----------------------------------------------------------------------
 eagle-assembly/pom.xml                                           | 2 +-
 eagle-core/eagle-alert/eagle-alert-base/pom.xml                  | 2 +-
 eagle-core/eagle-alert/eagle-alert-notification-plugin/pom.xml   | 4 ++--
 eagle-core/eagle-alert/eagle-alert-process/pom.xml               | 2 +-
 eagle-core/eagle-alert/eagle-alert-service/pom.xml               | 2 +-
 eagle-core/eagle-alert/pom.xml                                   | 2 +-
 .../eagle-application-service/pom.xml                            | 4 ++--
 .../eagle-stream-application-manager/pom.xml                     | 4 ++--
 eagle-core/eagle-application-management/pom.xml                  | 4 ++--
 eagle-core/eagle-data-process/eagle-job-common/pom.xml           | 2 +-
 .../eagle-data-process/eagle-storm-jobrunning-spout/pom.xml      | 2 +-
 eagle-core/eagle-data-process/eagle-stream-pipeline/pom.xml      | 2 +-
 eagle-core/eagle-data-process/eagle-stream-process-api/pom.xml   | 2 +-
 eagle-core/eagle-data-process/eagle-stream-process-base/pom.xml  | 4 ++--
 eagle-core/eagle-data-process/pom.xml                            | 4 ++--
 eagle-core/eagle-embed/eagle-embed-hbase/pom.xml                 | 2 +-
 eagle-core/eagle-embed/eagle-embed-server/pom.xml                | 2 +-
 eagle-core/eagle-embed/pom.xml                                   | 4 ++--
 .../eagle-machinelearning/eagle-machinelearning-base/pom.xml     | 4 ++--
 eagle-core/eagle-machinelearning/pom.xml                         | 4 ++--
 eagle-core/eagle-metric/pom.xml                                  | 4 ++--
 eagle-core/eagle-policy/eagle-policy-base/pom.xml                | 2 +-
 eagle-core/eagle-policy/pom.xml                                  | 4 ++--
 eagle-core/eagle-query/eagle-antlr/pom.xml                       | 4 ++--
 eagle-core/eagle-query/eagle-audit-base/pom.xml                  | 4 ++--
 eagle-core/eagle-query/eagle-client-base/pom.xml                 | 2 +-
 eagle-core/eagle-query/eagle-common/pom.xml                      | 2 +-
 eagle-core/eagle-query/eagle-entity-base/pom.xml                 | 2 +-
 eagle-core/eagle-query/eagle-query-base/pom.xml                  | 4 ++--
 eagle-core/eagle-query/eagle-service-base/pom.xml                | 4 ++--
 eagle-core/eagle-query/eagle-storage-base/pom.xml                | 4 ++--
 eagle-core/eagle-query/eagle-storage-hbase/pom.xml               | 4 ++--
 eagle-core/eagle-query/eagle-storage-jdbc/pom.xml                | 2 +-
 eagle-core/eagle-query/pom.xml                                   | 2 +-
 eagle-core/pom.xml                                               | 4 ++--
 eagle-examples/eagle-topology-example/pom.xml                    | 4 ++--
 eagle-examples/pom.xml                                           | 2 +-
 eagle-external/eagle-kafka/pom.xml                               | 4 ++--
 eagle-external/eagle-log4jkafka/pom.xml                          | 4 ++--
 eagle-external/pom.xml                                           | 4 ++--
 eagle-gc/pom.xml                                                 | 2 +-
 eagle-hadoop-metric/pom.xml                                      | 2 +-
 eagle-security/eagle-metric-collection/pom.xml                   | 2 +-
 eagle-security/eagle-security-common/pom.xml                     | 2 +-
 eagle-security/eagle-security-hbase-securitylog/pom.xml          | 4 ++--
 eagle-security/eagle-security-hbase-web/pom.xml                  | 4 ++--
 eagle-security/eagle-security-hdfs-auditlog/pom.xml              | 2 +-
 eagle-security/eagle-security-hdfs-securitylog/pom.xml           | 4 ++--
 eagle-security/eagle-security-hdfs-web/pom.xml                   | 2 +-
 eagle-security/eagle-security-hive-web/pom.xml                   | 2 +-
 eagle-security/eagle-security-hive/pom.xml                       | 2 +-
 eagle-security/eagle-security-userprofile/common/pom.xml         | 2 +-
 eagle-security/eagle-security-userprofile/detection/pom.xml      | 2 +-
 eagle-security/eagle-security-userprofile/pom.xml                | 4 ++--
 eagle-security/eagle-security-userprofile/training/pom.xml       | 4 ++--
 eagle-security/pom.xml                                           | 2 +-
 eagle-topology-assembly/pom.xml                                  | 2 +-
 eagle-webservice/pom.xml                                         | 2 +-
 pom.xml                                                          | 2 +-
 59 files changed, 86 insertions(+), 86 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-assembly/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-assembly/pom.xml b/eagle-assembly/pom.xml
index e62ca81..9b2949c 100644
--- a/eagle-assembly/pom.xml
+++ b/eagle-assembly/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <artifactId>eagle-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-alert/eagle-alert-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-base/pom.xml b/eagle-core/eagle-alert/eagle-alert-base/pom.xml
index d33acbc..b1d10fd 100644
--- a/eagle-core/eagle-alert/eagle-alert-base/pom.xml
+++ b/eagle-core/eagle-alert/eagle-alert-base/pom.xml
@@ -23,7 +23,7 @@
 	<parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-alert-parent</artifactId>
-		<version>0.3.0-incubating</version>
+		<version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
 	</parent>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-alert/eagle-alert-notification-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/pom.xml b/eagle-core/eagle-alert/eagle-alert-notification-plugin/pom.xml
index 8c58946..005af4e 100644
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/pom.xml
+++ b/eagle-core/eagle-alert/eagle-alert-notification-plugin/pom.xml
@@ -21,7 +21,7 @@
   <parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-alert-parent</artifactId>
-    <version>0.3.0-incubating</version>
+    <version>0.4.0-incubating-SNAPSHOT</version>
   </parent>
   <artifactId>eagle-alert-notification-plugin</artifactId>
   <name>eagle-alert-notification-plugin</name>
@@ -85,4 +85,4 @@
           <artifactId>hadoop-hdfs</artifactId>
       </dependency>
   </dependencies>
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-alert/eagle-alert-process/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/pom.xml b/eagle-core/eagle-alert/eagle-alert-process/pom.xml
index 6aed189..cdf321a 100644
--- a/eagle-core/eagle-alert/eagle-alert-process/pom.xml
+++ b/eagle-core/eagle-alert/eagle-alert-process/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.eagle</groupId>
         <artifactId>eagle-alert-parent</artifactId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 	<packaging>jar</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-alert/eagle-alert-service/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/pom.xml b/eagle-core/eagle-alert/eagle-alert-service/pom.xml
index c7f2847..54226aa 100644
--- a/eagle-core/eagle-alert/eagle-alert-service/pom.xml
+++ b/eagle-core/eagle-alert/eagle-alert-service/pom.xml
@@ -23,7 +23,7 @@
 	<parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-alert-parent</artifactId>
-		<version>0.3.0-incubating</version>
+		<version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
 	</parent>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-alert/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/pom.xml b/eagle-core/eagle-alert/pom.xml
index e3cb182..d8585bd 100644
--- a/eagle-core/eagle-alert/pom.xml
+++ b/eagle-core/eagle-alert/pom.xml
@@ -21,7 +21,7 @@
 	<parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-core</artifactId>
-		<version>0.3.0-incubating</version>
+		<version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
 	</parent>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-application-management/eagle-application-service/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-application-service/pom.xml b/eagle-core/eagle-application-management/eagle-application-service/pom.xml
index ade47d7..96fa7ee 100644
--- a/eagle-core/eagle-application-management/eagle-application-service/pom.xml
+++ b/eagle-core/eagle-application-management/eagle-application-service/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <artifactId>eagle-application-management</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
@@ -53,4 +53,4 @@
             </plugin>
         </plugins>
     </build>
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-application-management/eagle-stream-application-manager/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/eagle-stream-application-manager/pom.xml b/eagle-core/eagle-application-management/eagle-stream-application-manager/pom.xml
index 83598c1..e58f842 100644
--- a/eagle-core/eagle-application-management/eagle-stream-application-manager/pom.xml
+++ b/eagle-core/eagle-application-management/eagle-stream-application-manager/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <artifactId>eagle-application-management</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
@@ -141,4 +141,4 @@
             </plugin>
         </plugins>
     </build>
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-application-management/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-application-management/pom.xml b/eagle-core/eagle-application-management/pom.xml
index 0637d7e..d633717 100644
--- a/eagle-core/eagle-application-management/pom.xml
+++ b/eagle-core/eagle-application-management/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <artifactId>eagle-core</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
@@ -37,4 +37,4 @@
     </modules>
 
 
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-data-process/eagle-job-common/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-job-common/pom.xml b/eagle-core/eagle-data-process/eagle-job-common/pom.xml
index 39b47f7..9369004 100644
--- a/eagle-core/eagle-data-process/eagle-job-common/pom.xml
+++ b/eagle-core/eagle-data-process/eagle-job-common/pom.xml
@@ -21,7 +21,7 @@
   <parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-data-process-parent</artifactId>
-    <version>0.3.0-incubating</version>
+    <version>0.4.0-incubating-SNAPSHOT</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
   <artifactId>eagle-job-common</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/pom.xml b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/pom.xml
index 86ba2be..46cfb75 100644
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/pom.xml
+++ b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-data-process-parent</artifactId>
-    <version>0.3.0-incubating</version>
+    <version>0.4.0-incubating-SNAPSHOT</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
   <artifactId>eagle-storm-jobrunning-spout</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-data-process/eagle-stream-pipeline/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-pipeline/pom.xml b/eagle-core/eagle-data-process/eagle-stream-pipeline/pom.xml
index b8927a2..e6a5533 100644
--- a/eagle-core/eagle-data-process/eagle-stream-pipeline/pom.xml
+++ b/eagle-core/eagle-data-process/eagle-stream-pipeline/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>eagle-data-process-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <artifactId>eagle-stream-pipeline</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-data-process/eagle-stream-process-api/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/pom.xml b/eagle-core/eagle-data-process/eagle-stream-process-api/pom.xml
index 57864c1..9806fef 100644
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/pom.xml
+++ b/eagle-core/eagle-data-process/eagle-stream-process-api/pom.xml
@@ -21,7 +21,7 @@
   <parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-data-process-parent</artifactId>
-    <version>0.3.0-incubating</version>
+    <version>0.4.0-incubating-SNAPSHOT</version>
       <relativePath>../pom.xml</relativePath>
   </parent>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-data-process/eagle-stream-process-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-base/pom.xml b/eagle-core/eagle-data-process/eagle-stream-process-base/pom.xml
index f0a5840..d783398 100644
--- a/eagle-core/eagle-data-process/eagle-stream-process-base/pom.xml
+++ b/eagle-core/eagle-data-process/eagle-stream-process-base/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.eagle</groupId>
         <artifactId>eagle-data-process-parent</artifactId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
@@ -127,4 +127,4 @@
         </plugin>
     </plugins>
     </build>
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-data-process/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/pom.xml b/eagle-core/eagle-data-process/pom.xml
index e88d81b..89f2ba3 100644
--- a/eagle-core/eagle-data-process/pom.xml
+++ b/eagle-core/eagle-data-process/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.eagle</groupId>
         <artifactId>eagle-core</artifactId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
     </parent>
     <artifactId>eagle-data-process-parent</artifactId>
     <packaging>pom</packaging>
@@ -33,4 +33,4 @@
         <module>eagle-stream-process-api</module>
         <module>eagle-stream-pipeline</module>
     </modules>
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-embed/eagle-embed-hbase/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-embed/eagle-embed-hbase/pom.xml b/eagle-core/eagle-embed/eagle-embed-hbase/pom.xml
index 6069f6f..5016481 100644
--- a/eagle-core/eagle-embed/eagle-embed-hbase/pom.xml
+++ b/eagle-core/eagle-embed/eagle-embed-hbase/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <artifactId>eagle-embed-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-embed/eagle-embed-server/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-embed/eagle-embed-server/pom.xml b/eagle-core/eagle-embed/eagle-embed-server/pom.xml
index 6f0d912..317e857 100644
--- a/eagle-core/eagle-embed/eagle-embed-server/pom.xml
+++ b/eagle-core/eagle-embed/eagle-embed-server/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-embed-parent</artifactId>
-		<version>0.3.0-incubating</version>
+		<version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
 	</parent>
 	<artifactId>eagle-embed-server</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-embed/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-embed/pom.xml b/eagle-core/eagle-embed/pom.xml
index ec6e529..b05991a 100644
--- a/eagle-core/eagle-embed/pom.xml
+++ b/eagle-core/eagle-embed/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <artifactId>eagle-core</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
@@ -34,4 +34,4 @@
         <module>eagle-embed-hbase</module>
         <module>eagle-embed-server</module>
     </modules>
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-machinelearning/eagle-machinelearning-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/pom.xml b/eagle-core/eagle-machinelearning/eagle-machinelearning-base/pom.xml
index fe2006f..03641ea 100644
--- a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/pom.xml
+++ b/eagle-core/eagle-machinelearning/eagle-machinelearning-base/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-machinelearning-parent</artifactId>
-    <version>0.3.0-incubating</version>
+    <version>0.4.0-incubating-SNAPSHOT</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
   <artifactId>eagle-machinelearning-base</artifactId>
@@ -35,4 +35,4 @@
     	<version>${project.version}</version>
     </dependency>
   </dependencies>
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-machinelearning/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-machinelearning/pom.xml b/eagle-core/eagle-machinelearning/pom.xml
index bfc1f6b..1e945ab 100644
--- a/eagle-core/eagle-machinelearning/pom.xml
+++ b/eagle-core/eagle-machinelearning/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <artifactId>eagle-core</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
@@ -32,4 +32,4 @@
     <modules>
         <module>eagle-machinelearning-base</module>
     </modules>
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-metric/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-metric/pom.xml b/eagle-core/eagle-metric/pom.xml
index 210dad6..22b877f 100644
--- a/eagle-core/eagle-metric/pom.xml
+++ b/eagle-core/eagle-metric/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-core</artifactId>
-		<version>0.3.0-incubating</version>
+		<version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
 	</parent>
 
@@ -52,4 +52,4 @@
 			<scope>test</scope>
 		</dependency>
 	</dependencies>
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-policy/eagle-policy-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/pom.xml b/eagle-core/eagle-policy/eagle-policy-base/pom.xml
index 6e5dcfb..2120b72 100644
--- a/eagle-core/eagle-policy/eagle-policy-base/pom.xml
+++ b/eagle-core/eagle-policy/eagle-policy-base/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.eagle</groupId>
         <artifactId>eagle-policy-parent</artifactId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-policy/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/pom.xml b/eagle-core/eagle-policy/pom.xml
index 1dc9ce0..4a161a1 100644
--- a/eagle-core/eagle-policy/pom.xml
+++ b/eagle-core/eagle-policy/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.eagle</groupId>
         <artifactId>eagle-core</artifactId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
@@ -34,4 +34,4 @@
         <module>eagle-policy-base</module>
     </modules>
 
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-query/eagle-antlr/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-antlr/pom.xml b/eagle-core/eagle-query/eagle-antlr/pom.xml
index 2091c0e..e2c9d96 100644
--- a/eagle-core/eagle-query/eagle-antlr/pom.xml
+++ b/eagle-core/eagle-query/eagle-antlr/pom.xml
@@ -21,7 +21,7 @@
   <parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-query-parent</artifactId>
-		<version>0.3.0-incubating</version>
+		<version>0.4.0-incubating-SNAPSHOT</version>
       <relativePath>../pom.xml</relativePath>
   </parent>
 
@@ -39,4 +39,4 @@
 		  <artifactId>commons-lang</artifactId>
 	  </dependency>
   </dependencies>
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-query/eagle-audit-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-audit-base/pom.xml b/eagle-core/eagle-query/eagle-audit-base/pom.xml
index 21cd11d..f986953 100755
--- a/eagle-core/eagle-query/eagle-audit-base/pom.xml
+++ b/eagle-core/eagle-query/eagle-audit-base/pom.xml
@@ -24,7 +24,7 @@
 	<parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-query-parent</artifactId>
-		<version>0.3.0-incubating</version>
+		<version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
 	</parent>
 
@@ -48,4 +48,4 @@
 
 	</dependencies>
 
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-query/eagle-client-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/pom.xml b/eagle-core/eagle-query/eagle-client-base/pom.xml
index db37e62..bb645c8 100644
--- a/eagle-core/eagle-query/eagle-client-base/pom.xml
+++ b/eagle-core/eagle-query/eagle-client-base/pom.xml
@@ -23,7 +23,7 @@
 	<parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-query-parent</artifactId>
-		<version>0.3.0-incubating</version>
+		<version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
 	</parent>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-query/eagle-common/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/pom.xml b/eagle-core/eagle-query/eagle-common/pom.xml
index 9ba4fec..3fb98da 100644
--- a/eagle-core/eagle-query/eagle-common/pom.xml
+++ b/eagle-core/eagle-query/eagle-common/pom.xml
@@ -23,7 +23,7 @@
 	<parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-query-parent</artifactId>
-		<version>0.3.0-incubating</version>
+		<version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
 	</parent>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-query/eagle-entity-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/pom.xml b/eagle-core/eagle-query/eagle-entity-base/pom.xml
index 58cd52c..c553507 100755
--- a/eagle-core/eagle-query/eagle-entity-base/pom.xml
+++ b/eagle-core/eagle-query/eagle-entity-base/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-query-parent</artifactId>
-		<version>0.3.0-incubating</version>
+		<version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
 	</parent>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-query/eagle-query-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/pom.xml b/eagle-core/eagle-query/eagle-query-base/pom.xml
index 71978f3..151158f 100644
--- a/eagle-core/eagle-query/eagle-query-base/pom.xml
+++ b/eagle-core/eagle-query/eagle-query-base/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <artifactId>eagle-query-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
@@ -41,4 +41,4 @@
             <version>${project.version}</version>
         </dependency>
     </dependencies>
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-query/eagle-service-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-service-base/pom.xml b/eagle-core/eagle-query/eagle-service-base/pom.xml
index e464d08..21ca218 100755
--- a/eagle-core/eagle-query/eagle-service-base/pom.xml
+++ b/eagle-core/eagle-query/eagle-service-base/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-query-parent</artifactId>
-		<version>0.3.0-incubating</version>
+		<version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
 	</parent>
 
@@ -74,4 +74,4 @@
 			<artifactId>jackson-mapper-asl</artifactId>
 		</dependency>
 	</dependencies>
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-query/eagle-storage-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/pom.xml b/eagle-core/eagle-query/eagle-storage-base/pom.xml
index 99172f4..a659a3e 100644
--- a/eagle-core/eagle-query/eagle-storage-base/pom.xml
+++ b/eagle-core/eagle-query/eagle-storage-base/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>eagle-query-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
@@ -34,4 +34,4 @@
             <version>${project.version}</version>
         </dependency>
     </dependencies>
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-query/eagle-storage-hbase/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/pom.xml b/eagle-core/eagle-query/eagle-storage-hbase/pom.xml
index 3da3778..3a471a3 100644
--- a/eagle-core/eagle-query/eagle-storage-hbase/pom.xml
+++ b/eagle-core/eagle-query/eagle-storage-hbase/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <artifactId>eagle-query-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
@@ -100,4 +100,4 @@
             </plugin>
         </plugins>
     </build>
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-query/eagle-storage-jdbc/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/pom.xml b/eagle-core/eagle-query/eagle-storage-jdbc/pom.xml
index c37247e..7028589 100644
--- a/eagle-core/eagle-query/eagle-storage-jdbc/pom.xml
+++ b/eagle-core/eagle-query/eagle-storage-jdbc/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <artifactId>eagle-query-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/eagle-query/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/pom.xml b/eagle-core/eagle-query/pom.xml
index 7e3badb..25d940a 100644
--- a/eagle-core/eagle-query/pom.xml
+++ b/eagle-core/eagle-query/pom.xml
@@ -21,7 +21,7 @@
 	<parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-core</artifactId>
-		<version>0.3.0-incubating</version>
+		<version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
 	</parent>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-core/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/pom.xml b/eagle-core/pom.xml
index a236739..f80efb3 100644
--- a/eagle-core/pom.xml
+++ b/eagle-core/pom.xml
@@ -21,7 +21,7 @@
     <parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-parent</artifactId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
 	</parent>
 
@@ -44,4 +44,4 @@
         <module>eagle-metric</module>
         <module>eagle-application-management</module>
     </modules>
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-examples/eagle-topology-example/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/pom.xml b/eagle-examples/eagle-topology-example/pom.xml
index fc08647..806cfb0 100644
--- a/eagle-examples/eagle-topology-example/pom.xml
+++ b/eagle-examples/eagle-topology-example/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>eagle-examples</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
@@ -67,4 +67,4 @@
         </plugins>
     </build>
 
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-examples/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-examples/pom.xml b/eagle-examples/pom.xml
index 2869319..3912583 100644
--- a/eagle-examples/pom.xml
+++ b/eagle-examples/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>eagle-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-external/eagle-kafka/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-kafka/pom.xml b/eagle-external/eagle-kafka/pom.xml
index 1758b13..f69c77c 100644
--- a/eagle-external/eagle-kafka/pom.xml
+++ b/eagle-external/eagle-kafka/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>eagle-external-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
@@ -92,4 +92,4 @@
             </plugin>
         </plugins>
     </build>
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-external/eagle-log4jkafka/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-log4jkafka/pom.xml b/eagle-external/eagle-log4jkafka/pom.xml
index 5666d0f..afc8a8d 100644
--- a/eagle-external/eagle-log4jkafka/pom.xml
+++ b/eagle-external/eagle-log4jkafka/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <artifactId>eagle-external-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <packaging>jar</packaging>
@@ -113,4 +113,4 @@
             </plugin>
         </plugins>
     </build>
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-external/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-external/pom.xml b/eagle-external/pom.xml
index 2f9d30c..6cb0061 100644
--- a/eagle-external/pom.xml
+++ b/eagle-external/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <artifactId>eagle-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
@@ -34,4 +34,4 @@
         <module>eagle-log4jkafka</module>
         <module>eagle-kafka</module>
     </modules>
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-gc/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-gc/pom.xml b/eagle-gc/pom.xml
index dbbc0b9..c32ad3a 100644
--- a/eagle-gc/pom.xml
+++ b/eagle-gc/pom.xml
@@ -23,7 +23,7 @@
   <parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-parent</artifactId>
-		<version>0.3.0-incubating</version>
+		<version>0.4.0-incubating-SNAPSHOT</version>
       <relativePath>../pom.xml</relativePath>
   </parent>
   <artifactId>eagle-gc</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-hadoop-metric/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-hadoop-metric/pom.xml b/eagle-hadoop-metric/pom.xml
index 24f7a3b..2e2f94a 100644
--- a/eagle-hadoop-metric/pom.xml
+++ b/eagle-hadoop-metric/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>eagle-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-security/eagle-metric-collection/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-metric-collection/pom.xml b/eagle-security/eagle-metric-collection/pom.xml
index ae0c336..bbd834f 100644
--- a/eagle-security/eagle-metric-collection/pom.xml
+++ b/eagle-security/eagle-metric-collection/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-security-parent</artifactId>
-    <version>0.3.0-incubating</version>
+    <version>0.4.0-incubating-SNAPSHOT</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
   <artifactId>eagle-metric-collection</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-security/eagle-security-common/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-common/pom.xml b/eagle-security/eagle-security-common/pom.xml
index 17b6715..14605dc 100644
--- a/eagle-security/eagle-security-common/pom.xml
+++ b/eagle-security/eagle-security-common/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-security-parent</artifactId>
-    <version>0.3.0-incubating</version>
+    <version>0.4.0-incubating-SNAPSHOT</version>
   </parent>
   <artifactId>eagle-security-common</artifactId>
   <name>eagle-security-common</name>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-security/eagle-security-hbase-securitylog/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hbase-securitylog/pom.xml b/eagle-security/eagle-security-hbase-securitylog/pom.xml
index 9e8fd72..2be01ab 100644
--- a/eagle-security/eagle-security-hbase-securitylog/pom.xml
+++ b/eagle-security/eagle-security-hbase-securitylog/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <artifactId>eagle-security-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
@@ -42,4 +42,4 @@
             <version>${project.version}</version>
         </dependency>
     </dependencies>
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-security/eagle-security-hbase-web/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hbase-web/pom.xml b/eagle-security/eagle-security-hbase-web/pom.xml
index 99b2d68..ebca436 100644
--- a/eagle-security/eagle-security-hbase-web/pom.xml
+++ b/eagle-security/eagle-security-hbase-web/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <artifactId>eagle-security-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
@@ -38,4 +38,4 @@
         </dependency>
     </dependencies>
 
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-security/eagle-security-hdfs-auditlog/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hdfs-auditlog/pom.xml b/eagle-security/eagle-security-hdfs-auditlog/pom.xml
index 09bf007..d0e6f96 100644
--- a/eagle-security/eagle-security-hdfs-auditlog/pom.xml
+++ b/eagle-security/eagle-security-hdfs-auditlog/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-security-parent</artifactId>
-    <version>0.3.0-incubating</version>
+    <version>0.4.0-incubating-SNAPSHOT</version>
   </parent>
   <artifactId>eagle-security-hdfs-auditlog</artifactId>
   <packaging>jar</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-security/eagle-security-hdfs-securitylog/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hdfs-securitylog/pom.xml b/eagle-security/eagle-security-hdfs-securitylog/pom.xml
index 32f4381..4668942 100644
--- a/eagle-security/eagle-security-hdfs-securitylog/pom.xml
+++ b/eagle-security/eagle-security-hdfs-securitylog/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <artifactId>eagle-security-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
@@ -38,4 +38,4 @@
     </dependencies>
 
 
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-security/eagle-security-hdfs-web/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hdfs-web/pom.xml b/eagle-security/eagle-security-hdfs-web/pom.xml
index 0a187df..f0d54fe 100644
--- a/eagle-security/eagle-security-hdfs-web/pom.xml
+++ b/eagle-security/eagle-security-hdfs-web/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-security-parent</artifactId>
-    <version>0.3.0-incubating</version>
+    <version>0.4.0-incubating-SNAPSHOT</version>
   </parent>
 
   <artifactId>eagle-security-hdfs-web</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-security/eagle-security-hive-web/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hive-web/pom.xml b/eagle-security/eagle-security-hive-web/pom.xml
index 57b0186..60a99b1 100644
--- a/eagle-security/eagle-security-hive-web/pom.xml
+++ b/eagle-security/eagle-security-hive-web/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-security-parent</artifactId>
-    <version>0.3.0-incubating</version>
+    <version>0.4.0-incubating-SNAPSHOT</version>
   </parent>
   <artifactId>eagle-security-hive-web</artifactId>
   <name>eagle-security-hive-web</name>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-security/eagle-security-hive/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hive/pom.xml b/eagle-security/eagle-security-hive/pom.xml
index efa534f..1f110a5 100644
--- a/eagle-security/eagle-security-hive/pom.xml
+++ b/eagle-security/eagle-security-hive/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-security-parent</artifactId>
-    <version>0.3.0-incubating</version>
+    <version>0.4.0-incubating-SNAPSHOT</version>
   </parent>
   <artifactId>eagle-security-hive</artifactId>
   <name>eagle-security-hive</name>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-security/eagle-security-userprofile/common/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-userprofile/common/pom.xml b/eagle-security/eagle-security-userprofile/common/pom.xml
index 1f95dbb..3fcffb2 100644
--- a/eagle-security/eagle-security-userprofile/common/pom.xml
+++ b/eagle-security/eagle-security-userprofile/common/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-security-userprofile-parent</artifactId>
-    <version>0.3.0-incubating</version>
+    <version>0.4.0-incubating-SNAPSHOT</version>
       <relativePath>../pom.xml</relativePath>
   </parent>
   <packaging>jar</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-security/eagle-security-userprofile/detection/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-userprofile/detection/pom.xml b/eagle-security/eagle-security-userprofile/detection/pom.xml
index 01bdf10..1f4811e 100644
--- a/eagle-security/eagle-security-userprofile/detection/pom.xml
+++ b/eagle-security/eagle-security-userprofile/detection/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-security-userprofile-parent</artifactId>
-    <version>0.3.0-incubating</version>
+    <version>0.4.0-incubating-SNAPSHOT</version>
   <relativePath>../pom.xml</relativePath>
   </parent>
   <artifactId>eagle-security-userprofile-detection</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-security/eagle-security-userprofile/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-userprofile/pom.xml b/eagle-security/eagle-security-userprofile/pom.xml
index 65ff0fb..a295c3e 100644
--- a/eagle-security/eagle-security-userprofile/pom.xml
+++ b/eagle-security/eagle-security-userprofile/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <artifactId>eagle-security-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
@@ -36,4 +36,4 @@
         <module>detection</module>
         <module>training</module>
     </modules>
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-security/eagle-security-userprofile/training/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-userprofile/training/pom.xml b/eagle-security/eagle-security-userprofile/training/pom.xml
index fd9aa05..d6a23a5 100644
--- a/eagle-security/eagle-security-userprofile/training/pom.xml
+++ b/eagle-security/eagle-security-userprofile/training/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <artifactId>eagle-security-userprofile-parent</artifactId>
         <groupId>org.apache.eagle</groupId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
@@ -218,4 +218,4 @@
             </plugin>
         </plugins>
     </build>
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-security/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/pom.xml b/eagle-security/pom.xml
index df33425..ce1a178 100644
--- a/eagle-security/pom.xml
+++ b/eagle-security/pom.xml
@@ -23,7 +23,7 @@
   <parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-parent</artifactId>
-		<version>0.3.0-incubating</version>
+		<version>0.4.0-incubating-SNAPSHOT</version>
       <relativePath>../pom.xml</relativePath>
   </parent>
   <artifactId>eagle-security-parent</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-topology-assembly/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-topology-assembly/pom.xml b/eagle-topology-assembly/pom.xml
index bbf0a91..ced6d45 100644
--- a/eagle-topology-assembly/pom.xml
+++ b/eagle-topology-assembly/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.eagle</groupId>
         <artifactId>eagle-parent</artifactId>
-        <version>0.3.0-incubating</version>
+        <version>0.4.0-incubating-SNAPSHOT</version>
     </parent>
     <artifactId>eagle-topology-assembly</artifactId>
     <name>eagle-topology-assembly</name>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/eagle-webservice/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-webservice/pom.xml b/eagle-webservice/pom.xml
index 2d16f2f..44bd4da 100644
--- a/eagle-webservice/pom.xml
+++ b/eagle-webservice/pom.xml
@@ -17,7 +17,7 @@
 	<parent>
 		<groupId>org.apache.eagle</groupId>
 		<artifactId>eagle-parent</artifactId>
-		<version>0.3.0-incubating</version>
+		<version>0.4.0-incubating-SNAPSHOT</version>
 		<relativePath>../pom.xml</relativePath>
 	</parent>
 	<artifactId>eagle-webservice</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e7433a3b/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 6caa824..79d5e9d 100755
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
     </parent>
     <groupId>org.apache.eagle</groupId>
     <artifactId>eagle-parent</artifactId>
-    <version>0.3.0-incubating</version>
+    <version>0.4.0-incubating-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>Apache Eagle Parent</name>
     <url>https://eagle.incubator.apache.org</url>