eagle-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yonzhang2...@apache.org
Subject [1/3] incubator-eagle git commit: notification plugin framework
Date Wed, 17 Feb 2016 17:44:14 GMT
Repository: incubator-eagle
Updated Branches:
  refs/heads/master caa2dfef5 -> 88d0126cb


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/88d0126c/eagle-examples/eagle-topology-example/src/main/resources/application-plugintest.conf
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/src/main/resources/application-plugintest.conf b/eagle-examples/eagle-topology-example/src/main/resources/application-plugintest.conf
new file mode 100644
index 0000000..f73e7c0
--- /dev/null
+++ b/eagle-examples/eagle-topology-example/src/main/resources/application-plugintest.conf
@@ -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.
+
+{
+  "envContextConfig" : {
+    "env" : "storm",
+    "mode" : "local",
+    "topologyName" : "pluginTest",
+    "stormConfigFile" : "persist-test-storm.yaml",
+    "parallelismConfig" : {
+      "testSpout" : 1,
+      "testExecutor*" : 1
+    }
+  },
+  "dataSourceConfig": {
+  },
+  "alertExecutorConfigs" : {
+     "testExecutor" : {
+       "parallelism" : 1,
+       "partitioner" : "org.apache.eagle.policy.DefaultPolicyPartitioner"
+       "needValidation" : "true"
+     }
+  },
+  "eagleProps" : {
+    "site" : "sandbox",
+    "dataSource": "testSpout",
+  	"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
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/88d0126c/eagle-examples/eagle-topology-example/src/main/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/src/main/resources/application.conf b/eagle-examples/eagle-topology-example/src/main/resources/application.conf
new file mode 100644
index 0000000..aad74b3
--- /dev/null
+++ b/eagle-examples/eagle-topology-example/src/main/resources/application.conf
@@ -0,0 +1,86 @@
+# 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" : "persistTestTopology",
+    "stormConfigFile" : "persist-test-storm.yaml",
+    "parallelismConfig" : {
+      "kafkaMsgConsumer" : 1,
+      "hdfsAuditLogAlertExecutor*" : 1
+    }
+  },
+  "dataSourceConfig": {
+    "topic" : "persist_test_log",
+    "zkConnection" : "localhost:2181",
+    "zkConnectionTimeoutMS" : 15000,
+    "consumerGroupId" : "EagleConsumer",
+    "fetchSize" : 1048586,
+    "deserializerClass" : "org.apache.eagle.example.persist.MetricSerializer",
+    "transactionZKServers" : "localhost",
+    "transactionZKPort" : 2181,
+    "transactionZKRoot" : "/consumers",
+    "transactionStateUpdateMS" : 2000
+  },
+  "alertExecutorConfigs" : {
+     "hdfsAuditLogAlertExecutor" : {
+       "parallelism" : 1,
+       "partitioner" : "org.apache.eagle.policy.DefaultPolicyPartitioner"
+       "needValidation" : "true"
+     }
+  },
+  "persistExecutorConfigs" {
+    "persistExecutor1" : {
+      "kafka": {
+        "bootstrap_servers" : "www.xyz.com",
+        "topics" : {
+          "defaultOutput" : "downSampleOutput"
+        }
+      }
+    }
+  },
+  "aggregateExecutorConfigs" : {
+    "aggregateExecutor1" : {
+      "parallelism" : 1,
+      "partitioner" : "org.apache.eagle.policy.DefaultPolicyPartitioner"
+      "needValidation" : "true"
+    }
+  },
+  "eagleProps" : {
+    "site" : "sandbox",
+    "dataSource": "persistTest",
+  	"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
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/88d0126c/eagle-examples/eagle-topology-example/src/main/resources/create-policy-for-plugin-test.sh
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/src/main/resources/create-policy-for-plugin-test.sh b/eagle-examples/eagle-topology-example/src/main/resources/create-policy-for-plugin-test.sh
new file mode 100644
index 0000000..3fd2752
--- /dev/null
+++ b/eagle-examples/eagle-topology-example/src/main/resources/create-policy-for-plugin-test.sh
@@ -0,0 +1,99 @@
+#!/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.
+
+CUR_DIR=$(dirname $0)
+source $CUR_DIR/../../../../../eagle-assembly/src/main/bin/eagle-env.sh
+
+#####################################################################
+#            Import stream metadata
+#####################################################################
+
+## AlertDataSource: data sources bound to sites
+echo "Importing AlertDataSourceService for persist... "
+
+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=AlertDataSourceService" \
+  -d '[{"prefix":"alertDataSource","tags":{"site" : "sandbox", "dataSource":"testSpout"}, "enabled": "true", "config" : " just some description", "desc":"pluginTest"}]'
+
+
+## AlertStreamService: alert streams generated from data source
+echo ""
+echo "Importing AlertStreamService for HDFS... "
+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 '[{"prefix":"alertStream","tags":{"dataSource":"testSpout","streamName":"testStream"},"desc":"pluginTest"}]'
+
+## AlertExecutorService: what alert streams are consumed by alert executor
+echo ""
+echo "Importing AlertExecutorService for HDFS... "
+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 '[{"prefix":"alertExecutor","tags":{"dataSource":"testSpout","alertExecutorId":"testExecutor","streamName":"testStream"},"desc":"testStream->testExecutor"}]'
+
+## AlertStreamSchemaService: schema for event from alert stream
+echo ""
+echo "Importing AlertStreamSchemaService for HDFS... "
+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 '
+ [
+    {
+       "prefix": "alertStreamSchema",
+       "tags": {
+          "dataSource": "testSpout",
+          "streamName": "testStream",
+          "attrName": "testAttribute"
+       },
+       "attrDescription": "testAttribute",
+       "attrType": "string",
+       "category": "",
+       "attrValueResolver": ""
+    }
+ ]
+ '
+
+##### add policies ##########
+echo ""
+echo "Importing policy ... "
+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=AlertDefinitionService" \
+ -d '
+ [
+     {
+       "prefix": "alertdef",
+       "tags": {
+         "site": "sandbox",
+         "dataSource": "testSpout",
+         "policyId": "pluginTestPolicy",
+         "alertExecutorId": "testExecutor",
+         "policyType": "siddhiCEPEngine"
+       },
+       "description": "pluginTest",
+       "policyDef": "{\"expression\":\"from testStream[(testAttribute == \\\"testValue\\\")] select * insert into outputStream;\",\"type\":\"siddhiCEPEngine\"}",
+       "dedupeDef": "{\"alertDedupIntervalMin\":0,\"emailDedupIntervalMin\":1440}",
+       "notificationDef": "[{\"subject\":\"just for test\",\"sender\":\"nobody@test.com\",\"recipients\":\"nobody@test.com\",\"flavor\":\"email\",\"id\":\"email_1\",\"tplFileName\":\"\"}]",
+       "remediationDef":"",
+       "enabled":true
+     }
+ ]
+ '
+
+## Finished
+echo ""
+echo "Finished initialization for NotificationPluginTest"
+
+exit 0

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/88d0126c/eagle-examples/eagle-topology-example/src/main/resources/delete-email-for-plugin-test.sh
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/src/main/resources/delete-email-for-plugin-test.sh b/eagle-examples/eagle-topology-example/src/main/resources/delete-email-for-plugin-test.sh
new file mode 100644
index 0000000..30d277f
--- /dev/null
+++ b/eagle-examples/eagle-topology-example/src/main/resources/delete-email-for-plugin-test.sh
@@ -0,0 +1,50 @@
+#!/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.
+
+CUR_DIR=$(dirname $0)
+source $CUR_DIR/../../../../../eagle-assembly/src/main/bin/eagle-env.sh
+
+##### delete email notification ##########
+echo ""
+echo "Importing policy ... "
+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=AlertDefinitionService" \
+ -d '
+ [
+     {
+       "prefix": "alertdef",
+       "tags": {
+         "site": "sandbox",
+         "dataSource": "testSpout",
+         "policyId": "pluginTestPolicy",
+         "alertExecutorId": "testExecutor",
+         "policyType": "siddhiCEPEngine"
+       },
+       "description": "pluginTest",
+       "policyDef": "{\"expression\":\"from testStream[(testAttribute == \\\"testValue\\\")] select * insert into outputStream;\",\"type\":\"siddhiCEPEngine\"}",
+       "notificationDef": "[{\"subject\":\"just for test\",\"sender\":\"nobody@test.com\",\"recipients\":\"nobody@test.com\",\"flavor\":\"email\",\"id\":\"email_1\",\"tplFileName\":\"\"}]",
+       "remediationDef":"",
+       "enabled":true
+     }
+ ]
+ '
+
+## Finished
+echo ""
+echo "Finished initialization for NotificationPluginTest"
+
+exit 0

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/88d0126c/eagle-examples/eagle-topology-example/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/src/main/resources/log4j.properties b/eagle-examples/eagle-topology-example/src/main/resources/log4j.properties
new file mode 100644
index 0000000..07f8402
--- /dev/null
+++ b/eagle-examples/eagle-topology-example/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/88d0126c/eagle-examples/eagle-topology-example/src/main/resources/persist-test-topo-init.sh
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/src/main/resources/persist-test-topo-init.sh b/eagle-examples/eagle-topology-example/src/main/resources/persist-test-topo-init.sh
new file mode 100644
index 0000000..5805cf3
--- /dev/null
+++ b/eagle-examples/eagle-topology-example/src/main/resources/persist-test-topo-init.sh
@@ -0,0 +1,194 @@
+#!/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
+eagle_bin=$EAGLE_HOME/bin
+
+#####################################################################
+#            Import stream metadata for HDFS
+#####################################################################
+
+## AlertDataSource: data sources bound to sites
+echo "Importing AlertDataSourceService for persist... "
+
+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=AlertDataSourceService" \
+  -d '[{"prefix":"alertDataSource","tags":{"site" : "sandbox", "dataSource":"persistTest"}, "enabled": "true", "config" : " just some description", "desc":"persistTest"}]'
+
+
+## AlertStreamService: alert streams generated from data source
+echo ""
+echo "Importing AlertStreamService for HDFS... "
+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 '[{"prefix":"alertStream","tags":{"dataSource":"persistTest","streamName":"persistTestEventStream"},"desc":"persistTest metrics"}]'
+
+## AlertExecutorService: what alert streams are consumed by alert executor
+echo ""
+echo "Importing AlertExecutorService for HDFS... "
+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 '[{"prefix":"alertExecutor","tags":{"dataSource":"persistTest","alertExecutorId":"aggregateExecutor1","streamName":"persistTestEventStream"},"desc":"aggregate executor for persist test log event stream"}]'
+
+## AlertStreamSchemaService: schema for event from alert stream
+echo ""
+echo "Importing AlertStreamSchemaService for HDFS... "
+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 '
+ [
+    {
+       "prefix": "alertStreamSchema",
+       "tags": {
+          "dataSource": "persistTest",
+          "streamName": "persistTestEventStream",
+          "attrName": "src"
+       },
+       "attrDescription": "source directory or file, such as /tmp",
+       "attrType": "string",
+       "category": "",
+       "attrValueResolver": "org.apache.eagle.service.security.hdfs.resolver.HDFSResourceResolver"
+    },
+    {
+       "prefix": "alertStreamSchema",
+       "tags": {
+          "dataSource": "persistTest",
+          "streamName": "persistTestEventStream",
+          "attrName": "dst"
+       },
+       "attrDescription": "destination directory, such as /tmp",
+       "attrType": "string",
+       "category": "",
+       "attrValueResolver": "org.apache.eagle.service.security.hdfs.resolver.HDFSResourceResolver"
+    },
+    {
+       "prefix": "alertStreamSchema",
+       "tags": {
+          "dataSource": "persistTest",
+          "streamName": "persistTestEventStream",
+          "attrName": "host"
+       },
+       "attrDescription": "hostname, such as localhost",
+       "attrType": "string",
+       "category": "",
+       "attrValueResolver": ""
+    },
+    {
+       "prefix": "alertStreamSchema",
+       "tags": {
+          "dataSource": "persistTest",
+          "streamName": "persistTestEventStream",
+          "attrName": "timestamp"
+       },
+       "attrDescription": "milliseconds of the datetime",
+       "attrType": "long",
+       "category": "",
+       "attrValueResolver": ""
+    },
+    {
+       "prefix": "alertStreamSchema",
+       "tags": {
+          "dataSource": "persistTest",
+          "streamName": "persistTestEventStream",
+          "attrName": "allowed"
+       },
+       "attrDescription": "true, false or none",
+       "attrType": "bool",
+       "category": "",
+       "attrValueResolver": ""
+    },
+    {
+       "prefix": "alertStreamSchema",
+       "tags": {
+          "dataSource": "persistTest",
+          "streamName": "persistTestEventStream",
+          "attrName": "user"
+       },
+       "attrDescription": "process user",
+       "attrType": "string",
+       "category": "",
+       "attrValueResolver": ""
+    },
+    {
+       "prefix": "alertStreamSchema",
+       "tags": {
+          "dataSource": "persistTest",
+          "streamName": "persistTestEventStream",
+          "attrName": "cmd"
+       },
+       "attrDescription": "file/directory operation, such as getfileinfo, open, listStatus and so on",
+       "attrType": "string",
+       "category": "",
+       "attrValueResolver": "org.apache.eagle.service.security.hdfs.resolver.HDFSCommandResolver"
+    },
+    {
+       "prefix": "alertStreamSchema",
+       "tags": {
+          "dataSource": "persistTest",
+          "streamName": "persistTestEventStream",
+          "attrName": "sensitivityType"
+       },
+       "attrDescription": "mark such as AUDITLOG, SECURITYLOG",
+       "attrType": "string",
+       "category": "",
+       "attrValueResolver": "org.apache.eagle.service.security.hdfs.resolver.HDFSSensitivityTypeResolver"
+    },
+    {
+       "prefix": "alertStreamSchema",
+       "tags": {
+          "dataSource": "persistTest",
+          "streamName": "persistTestEventStream",
+          "attrName": "securityZone"
+       },
+       "attrDescription": "",
+       "attrType": "string",
+       "category": "",
+       "attrValueResolver": ""
+    }
+ ]
+ '
+
+##### add policies ##########
+echo ""
+echo "Importing AlertStreamSchemaService for HDFS... "
+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=AggregateDefinitionService" \
+ -d '
+ [
+     {
+       "prefix": "aggregatedef",
+       "tags": {
+         "site": "sandbox",
+         "dataSource": "persistTest",
+         "policyId": "persitTestPolicy1",
+         "executorId": "aggregateExecutor1",
+         "policyType": "siddhiCEPEngine"
+       },
+       "description": "persistetest",
+       "policyDef": "{\"expression\":\"from persistTestEventStream[(logLevel == 'ERROR')] select * insert into outputStream;\",\"type\":\"siddhiCEPEngine\"}",
+       "enabled": true
+     }
+ ]
+ '
+
+
+
+ ## Finished
+echo ""
+echo "Finished initialization for eagle topology"
+
+exit 0

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/88d0126c/eagle-examples/eagle-topology-example/src/main/resources/persit-test-storm.yaml
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/src/main/resources/persit-test-storm.yaml b/eagle-examples/eagle-topology-example/src/main/resources/persit-test-storm.yaml
new file mode 100644
index 0000000..a68a323
--- /dev/null
+++ b/eagle-examples/eagle-topology-example/src/main/resources/persit-test-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/88d0126c/eagle-examples/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-examples/pom.xml b/eagle-examples/pom.xml
new file mode 100644
index 0000000..486ab2d
--- /dev/null
+++ b/eagle-examples/pom.xml
@@ -0,0 +1,35 @@
+<?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-parent</artifactId>
+        <groupId>eagle</groupId>
+        <version>0.3.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>eagle-examples</artifactId>
+    <packaging>pom</packaging>
+    <modules>
+        <module>eagle-topology-example</module>
+    </modules>
+
+
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/88d0126c/eagle-samples/eagle-persist-sample/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-samples/eagle-persist-sample/pom.xml b/eagle-samples/eagle-persist-sample/pom.xml
deleted file mode 100644
index cbfe6d1..0000000
--- a/eagle-samples/eagle-persist-sample/pom.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?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-samples</artifactId>
-        <groupId>eagle</groupId>
-        <version>0.3.0</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>eagle-persist-sample</artifactId>
-    <dependencies>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-stream-process-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-query-base</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <resources>
-            <resource>
-                <directory>src/resources</directory>
-            </resource>
-        </resources>
-        <plugins>
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <configuration>
-                    <descriptor>src/assembly/eagle-persist-sample-assembly.xml</descriptor>
-                    <finalName>eagle-persist-sample-${project.version}</finalName>
-                </configuration>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                        <configuration>
-                            <tarLongFileMode>posix</tarLongFileMode>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/88d0126c/eagle-samples/eagle-persist-sample/src/assembly/eagle-persist-sample-assembly.xml
----------------------------------------------------------------------
diff --git a/eagle-samples/eagle-persist-sample/src/assembly/eagle-persist-sample-assembly.xml b/eagle-samples/eagle-persist-sample/src/assembly/eagle-persist-sample-assembly.xml
deleted file mode 100644
index 0acf619..0000000
--- a/eagle-samples/eagle-persist-sample/src/assembly/eagle-persist-sample-assembly.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.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.
-  -->
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-  <id>assembly</id>
-    <formats>
-        <format>jar</format>
-    </formats>
-    <includeBaseDirectory>false</includeBaseDirectory>
-    <dependencySets>
-        <dependencySet>
-            <outputDirectory>/</outputDirectory>
-            <useProjectArtifact>false</useProjectArtifact>
-            <unpack>true</unpack>
-            <scope>runtime</scope>
-            <unpackOptions>
-                <excludes>
-                    <exclude>**/application.conf</exclude>
-                    <exclude>**/defaults.yaml</exclude>
-                    <exclude>**/storm.yaml</exclude>
-                    <exclude>**/storm.yaml.1</exclude>
-                    <exclude>**/log4j.properties</exclude>
-                </excludes>
-            </unpackOptions>
-            <excludes>
-                <exclude>org.apache.storm:storm-core</exclude>
-                <exclude>org.slf4j:slf4j-api</exclude>
-                <exclude>org.slf4j:log4j-over-slf4j</exclude>
-                <exclude>org.slf4j:slf4j-log4j12</exclude>
-                <exclude>log4j:log4j</exclude>
-                <exclude>asm:asm</exclude>
-                <exclude>org.apache.log4j.wso2:log4j</exclude>
-            </excludes>
-        </dependencySet>
-    </dependencySets>
-    <fileSets>
-        <fileSet>
-            <directory>${project.build.outputDirectory}</directory>
-            <outputDirectory>/</outputDirectory>
-            <excludes>
-            	<exclude>application.conf</exclude>
-            	<exclude>log4j.properties</exclude>
-            	<exclude>**/storm.yaml.1</exclude>
-            </excludes>
-        </fileSet>
-    </fileSets>
-</assembly>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/88d0126c/eagle-samples/eagle-persist-sample/src/main/java/org/apache/eagle/persist/test/MetricSerializer.java
----------------------------------------------------------------------
diff --git a/eagle-samples/eagle-persist-sample/src/main/java/org/apache/eagle/persist/test/MetricSerializer.java b/eagle-samples/eagle-persist-sample/src/main/java/org/apache/eagle/persist/test/MetricSerializer.java
deleted file mode 100644
index d608104..0000000
--- a/eagle-samples/eagle-persist-sample/src/main/java/org/apache/eagle/persist/test/MetricSerializer.java
+++ /dev/null
@@ -1,31 +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.persist.test;
-
-import org.apache.eagle.dataproc.impl.storm.kafka.SpoutKafkaMessageDeserializer;
-
-/**
- * Created on 1/4/16.
- */
-public class MetricSerializer implements SpoutKafkaMessageDeserializer {
-    @Override
-    public Object deserialize(byte[] arg0) {
-        String logLine = new String(arg0);
-
-        return null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/88d0126c/eagle-samples/eagle-persist-sample/src/main/java/org/apache/eagle/persist/test/PersistTopoTestMain.java
----------------------------------------------------------------------
diff --git a/eagle-samples/eagle-persist-sample/src/main/java/org/apache/eagle/persist/test/PersistTopoTestMain.java b/eagle-samples/eagle-persist-sample/src/main/java/org/apache/eagle/persist/test/PersistTopoTestMain.java
deleted file mode 100644
index c552576..0000000
--- a/eagle-samples/eagle-persist-sample/src/main/java/org/apache/eagle/persist/test/PersistTopoTestMain.java
+++ /dev/null
@@ -1,115 +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.persist.test;
-
-import backtype.storm.spout.SpoutOutputCollector;
-import backtype.storm.task.TopologyContext;
-import backtype.storm.topology.OutputFieldsDeclarer;
-import backtype.storm.topology.base.BaseRichSpout;
-import backtype.storm.tuple.Fields;
-import backtype.storm.tuple.Values;
-import backtype.storm.utils.Utils;
-import com.typesafe.config.Config;
-import org.apache.eagle.dataproc.impl.storm.StormSpoutProvider;
-import org.apache.eagle.datastream.ExecutionEnvironments;
-import org.apache.eagle.datastream.core.StorageType;
-import org.apache.eagle.datastream.core.StreamProducer;
-import org.apache.eagle.datastream.storm.StormExecutionEnvironment;
-import org.apache.eagle.partition.PartitionStrategy;
-
-import java.util.Arrays;
-import java.util.Map;
-import java.util.Random;
-
-/**
- * Created on 1/4/16.
- *
- * This test demonstrates how user could use the new aggregate and persist feature for case like metrics processing&storage.
- *
- */
-public class PersistTopoTestMain {
-
-    public static void main(String[] args) {
-//        System.setProperty("config.resource", "application.conf");
-        StormExecutionEnvironment env = ExecutionEnvironments.getStorm();
-        StormSpoutProvider provider = createProvider(env.getConfig());
-        execWithDefaultPartition(env, provider);
-    }
-
-    @SuppressWarnings("unchecked")
-    public static void execWithDefaultPartition(StormExecutionEnvironment env, StormSpoutProvider provider) {
-        StreamProducer source = env.fromSpout(provider).withOutputFields(2).nameAs("kafkaMsgConsumer");
-        StreamProducer filter = source;
-
-        // required : persistTestEventStream schema be created in metadata manager
-        // required : policy for aggregateExecutor1 be created in metadata manager
-        StreamProducer aggregate = filter.aggregate(Arrays.asList("persistTestEventStream"), "aggregateExecutor1", new PartitionStrategy() {
-            @Override
-            public int balance(String key, int buckNum) {
-                return 0;
-            }
-        });
-
-        StreamProducer persist = aggregate.persist("persistExecutor1", StorageType.KAFKA());
-
-        env.execute();
-    }
-
-    public static StormSpoutProvider createProvider(Config config) {
-
-        return new StormSpoutProvider(){
-
-            @Override
-            public BaseRichSpout getSpout(Config context) {
-                return new StaticMetricSpout();
-            }
-        };
-    }
-
-    public static class StaticMetricSpout extends BaseRichSpout {
-
-        private long base;
-        private SpoutOutputCollector collector;
-
-        public StaticMetricSpout() {
-            base = System.currentTimeMillis();
-        }
-
-        private Random cpuRandom = new Random();
-        private Random memRandom = new Random();
-        private static final long FULL_MEM_SIZE_BYTES = 512  * 1024 * 1024 * 1024;// 16g memory upbound limit
-
-        @Override
-        public void declareOutputFields(OutputFieldsDeclarer declarer) {
-            declarer.declare(new Fields("timestamp", "host", "cpu", "mem"));
-        }
-
-        @Override
-        public void open(Map conf, TopologyContext context, SpoutOutputCollector collector) {
-            this.collector = collector;
-        }
-
-        @Override
-        public void nextTuple() {
-            Utils.sleep(100);
-            base = base + 100;// with fix steps..
-            long mem = Double.valueOf(memRandom.nextGaussian() * FULL_MEM_SIZE_BYTES).longValue();
-            collector.emit(new Values(base, "host", cpuRandom.nextInt(100), mem));
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/88d0126c/eagle-samples/eagle-persist-sample/src/main/java/org/apache/eagle/persist/test/PersistTopoTestMain2.java
----------------------------------------------------------------------
diff --git a/eagle-samples/eagle-persist-sample/src/main/java/org/apache/eagle/persist/test/PersistTopoTestMain2.java b/eagle-samples/eagle-persist-sample/src/main/java/org/apache/eagle/persist/test/PersistTopoTestMain2.java
deleted file mode 100644
index 7768385..0000000
--- a/eagle-samples/eagle-persist-sample/src/main/java/org/apache/eagle/persist/test/PersistTopoTestMain2.java
+++ /dev/null
@@ -1,60 +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.persist.test;
-
-import org.apache.eagle.dataproc.impl.storm.StormSpoutProvider;
-import org.apache.eagle.datastream.ExecutionEnvironments;
-import org.apache.eagle.datastream.core.StorageType;
-import org.apache.eagle.datastream.core.StreamProducer;
-import org.apache.eagle.datastream.storm.StormExecutionEnvironment;
-import org.apache.eagle.partition.PartitionStrategy;
-
-import java.util.Arrays;
-
-/**
- * Created on 1/10/16.
- */
-public class PersistTopoTestMain2 {
-
-    public static void main(String[] args) {
-        System.setProperty("config.resource", "application.conf");// customize the application.conf
-        StormExecutionEnvironment env = ExecutionEnvironments.getStorm();
-        StormSpoutProvider provider = PersistTopoTestMain.createProvider(env.getConfig());
-        exec(env, provider);
-    }
-
-    private static void exec(StormExecutionEnvironment env, StormSpoutProvider provider) {
-        StreamProducer source = env.fromSpout(provider).withOutputFields(4).nameAs("kafkaMsgConsumer");
-        StreamProducer filter = source;
-
-        // "timestamp", "host", "cpu", "mem"
-        String cql = " define stream eagleQuery(eagleAlertContext object, timestamp long, host string, cpu int, mem long);"
-                + " @info(name='query')"
-                + " from eagleQuery#window.externalTime(timestamp, 10 min) "
-                + " select eagleAlertContext, min(timestamp) as starttime, avg(cpu) as avgCpu, avg(mem) as avgMem insert into tmp;";
-        StreamProducer aggregate = filter.aggregate(Arrays.asList("ealgeQuery"), cql, new PartitionStrategy() {
-            @Override
-            public int balance(String key, int buckNum) {
-                return 0;
-            }
-        });
-
-        StreamProducer persist = aggregate.persist("persistExecutor1", StorageType.KAFKA());
-
-        env.execute();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/88d0126c/eagle-samples/eagle-persist-sample/src/main/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-samples/eagle-persist-sample/src/main/resources/application.conf b/eagle-samples/eagle-persist-sample/src/main/resources/application.conf
deleted file mode 100644
index 6c4d261..0000000
--- a/eagle-samples/eagle-persist-sample/src/main/resources/application.conf
+++ /dev/null
@@ -1,86 +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.
-
-{
-  "envContextConfig" : {
-    "env" : "storm",
-    "mode" : "local",
-    "topologyName" : "persistTestTopology",
-    "stormConfigFile" : "persist-test-storm.yaml",
-    "parallelismConfig" : {
-      "kafkaMsgConsumer" : 1,
-      "hdfsAuditLogAlertExecutor*" : 1
-    }
-  },
-  "dataSourceConfig": {
-    "topic" : "persist_test_log",
-    "zkConnection" : "localhost:2181",
-    "zkConnectionTimeoutMS" : 15000,
-    "consumerGroupId" : "EagleConsumer",
-    "fetchSize" : 1048586,
-    "deserializerClass" : "org.apache.eagle.persist.test.MetricSerializer",
-    "transactionZKServers" : "localhost",
-    "transactionZKPort" : 2181,
-    "transactionZKRoot" : "/consumers",
-    "transactionStateUpdateMS" : 2000
-  },
-  "alertExecutorConfigs" : {
-     "hdfsAuditLogAlertExecutor" : {
-       "parallelism" : 1,
-       "partitioner" : "org.apache.eagle.policy.DefaultPolicyPartitioner"
-       "needValidation" : "true"
-     }
-  },
-  "persistExecutorConfigs" {
-    "persistExecutor1" : {
-      "kafka": {
-        "bootstrap_servers" : "www.xyz.com",
-        "topics" : {
-          "defaultOutput" : "downSampleOutput"
-        }
-      }
-    }
-  },
-  "aggregateExecutorConfigs" : {
-    "aggregateExecutor1" : {
-      "parallelism" : 1,
-      "partitioner" : "org.apache.eagle.policy.DefaultPolicyPartitioner"
-      "needValidation" : "true"
-    }
-  },
-  "eagleProps" : {
-    "site" : "sandbox",
-    "dataSource": "persistTest",
-  	"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
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/88d0126c/eagle-samples/eagle-persist-sample/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-samples/eagle-persist-sample/src/main/resources/log4j.properties b/eagle-samples/eagle-persist-sample/src/main/resources/log4j.properties
deleted file mode 100644
index 4a22987..0000000
--- a/eagle-samples/eagle-persist-sample/src/main/resources/log4j.properties
+++ /dev/null
@@ -1,40 +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.
-
-log4j.rootLogger=DEBUG, 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/88d0126c/eagle-samples/eagle-persist-sample/src/main/resources/persist-test-topo-init.sh
----------------------------------------------------------------------
diff --git a/eagle-samples/eagle-persist-sample/src/main/resources/persist-test-topo-init.sh b/eagle-samples/eagle-persist-sample/src/main/resources/persist-test-topo-init.sh
deleted file mode 100644
index 5805cf3..0000000
--- a/eagle-samples/eagle-persist-sample/src/main/resources/persist-test-topo-init.sh
+++ /dev/null
@@ -1,194 +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
-eagle_bin=$EAGLE_HOME/bin
-
-#####################################################################
-#            Import stream metadata for HDFS
-#####################################################################
-
-## AlertDataSource: data sources bound to sites
-echo "Importing AlertDataSourceService for persist... "
-
-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=AlertDataSourceService" \
-  -d '[{"prefix":"alertDataSource","tags":{"site" : "sandbox", "dataSource":"persistTest"}, "enabled": "true", "config" : " just some description", "desc":"persistTest"}]'
-
-
-## AlertStreamService: alert streams generated from data source
-echo ""
-echo "Importing AlertStreamService for HDFS... "
-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 '[{"prefix":"alertStream","tags":{"dataSource":"persistTest","streamName":"persistTestEventStream"},"desc":"persistTest metrics"}]'
-
-## AlertExecutorService: what alert streams are consumed by alert executor
-echo ""
-echo "Importing AlertExecutorService for HDFS... "
-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 '[{"prefix":"alertExecutor","tags":{"dataSource":"persistTest","alertExecutorId":"aggregateExecutor1","streamName":"persistTestEventStream"},"desc":"aggregate executor for persist test log event stream"}]'
-
-## AlertStreamSchemaService: schema for event from alert stream
-echo ""
-echo "Importing AlertStreamSchemaService for HDFS... "
-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 '
- [
-    {
-       "prefix": "alertStreamSchema",
-       "tags": {
-          "dataSource": "persistTest",
-          "streamName": "persistTestEventStream",
-          "attrName": "src"
-       },
-       "attrDescription": "source directory or file, such as /tmp",
-       "attrType": "string",
-       "category": "",
-       "attrValueResolver": "org.apache.eagle.service.security.hdfs.resolver.HDFSResourceResolver"
-    },
-    {
-       "prefix": "alertStreamSchema",
-       "tags": {
-          "dataSource": "persistTest",
-          "streamName": "persistTestEventStream",
-          "attrName": "dst"
-       },
-       "attrDescription": "destination directory, such as /tmp",
-       "attrType": "string",
-       "category": "",
-       "attrValueResolver": "org.apache.eagle.service.security.hdfs.resolver.HDFSResourceResolver"
-    },
-    {
-       "prefix": "alertStreamSchema",
-       "tags": {
-          "dataSource": "persistTest",
-          "streamName": "persistTestEventStream",
-          "attrName": "host"
-       },
-       "attrDescription": "hostname, such as localhost",
-       "attrType": "string",
-       "category": "",
-       "attrValueResolver": ""
-    },
-    {
-       "prefix": "alertStreamSchema",
-       "tags": {
-          "dataSource": "persistTest",
-          "streamName": "persistTestEventStream",
-          "attrName": "timestamp"
-       },
-       "attrDescription": "milliseconds of the datetime",
-       "attrType": "long",
-       "category": "",
-       "attrValueResolver": ""
-    },
-    {
-       "prefix": "alertStreamSchema",
-       "tags": {
-          "dataSource": "persistTest",
-          "streamName": "persistTestEventStream",
-          "attrName": "allowed"
-       },
-       "attrDescription": "true, false or none",
-       "attrType": "bool",
-       "category": "",
-       "attrValueResolver": ""
-    },
-    {
-       "prefix": "alertStreamSchema",
-       "tags": {
-          "dataSource": "persistTest",
-          "streamName": "persistTestEventStream",
-          "attrName": "user"
-       },
-       "attrDescription": "process user",
-       "attrType": "string",
-       "category": "",
-       "attrValueResolver": ""
-    },
-    {
-       "prefix": "alertStreamSchema",
-       "tags": {
-          "dataSource": "persistTest",
-          "streamName": "persistTestEventStream",
-          "attrName": "cmd"
-       },
-       "attrDescription": "file/directory operation, such as getfileinfo, open, listStatus and so on",
-       "attrType": "string",
-       "category": "",
-       "attrValueResolver": "org.apache.eagle.service.security.hdfs.resolver.HDFSCommandResolver"
-    },
-    {
-       "prefix": "alertStreamSchema",
-       "tags": {
-          "dataSource": "persistTest",
-          "streamName": "persistTestEventStream",
-          "attrName": "sensitivityType"
-       },
-       "attrDescription": "mark such as AUDITLOG, SECURITYLOG",
-       "attrType": "string",
-       "category": "",
-       "attrValueResolver": "org.apache.eagle.service.security.hdfs.resolver.HDFSSensitivityTypeResolver"
-    },
-    {
-       "prefix": "alertStreamSchema",
-       "tags": {
-          "dataSource": "persistTest",
-          "streamName": "persistTestEventStream",
-          "attrName": "securityZone"
-       },
-       "attrDescription": "",
-       "attrType": "string",
-       "category": "",
-       "attrValueResolver": ""
-    }
- ]
- '
-
-##### add policies ##########
-echo ""
-echo "Importing AlertStreamSchemaService for HDFS... "
-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=AggregateDefinitionService" \
- -d '
- [
-     {
-       "prefix": "aggregatedef",
-       "tags": {
-         "site": "sandbox",
-         "dataSource": "persistTest",
-         "policyId": "persitTestPolicy1",
-         "executorId": "aggregateExecutor1",
-         "policyType": "siddhiCEPEngine"
-       },
-       "description": "persistetest",
-       "policyDef": "{\"expression\":\"from persistTestEventStream[(logLevel == 'ERROR')] select * insert into outputStream;\",\"type\":\"siddhiCEPEngine\"}",
-       "enabled": true
-     }
- ]
- '
-
-
-
- ## Finished
-echo ""
-echo "Finished initialization for eagle topology"
-
-exit 0

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/88d0126c/eagle-samples/eagle-persist-sample/src/main/resources/persit-test-storm.yaml
----------------------------------------------------------------------
diff --git a/eagle-samples/eagle-persist-sample/src/main/resources/persit-test-storm.yaml b/eagle-samples/eagle-persist-sample/src/main/resources/persit-test-storm.yaml
deleted file mode 100644
index a68a323..0000000
--- a/eagle-samples/eagle-persist-sample/src/main/resources/persit-test-storm.yaml
+++ /dev/null
@@ -1,18 +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.
-
-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/88d0126c/eagle-samples/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-samples/pom.xml b/eagle-samples/pom.xml
deleted file mode 100644
index f9fedc1..0000000
--- a/eagle-samples/pom.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-<<<<<<< HEAD
-  ~ 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-parent</artifactId>
-        <groupId>eagle</groupId>
-        <version>0.3.0</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>eagle-samples</artifactId>
-    <packaging>pom</packaging>
-    <modules>
-        <module>eagle-persist-sample</module>
-    </modules>
-
-
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/88d0126c/eagle-topology-assembly/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-topology-assembly/pom.xml b/eagle-topology-assembly/pom.xml
index 45adfb4..e1ecac3 100644
--- a/eagle-topology-assembly/pom.xml
+++ b/eagle-topology-assembly/pom.xml
@@ -69,6 +69,11 @@
             <artifactId>eagle-hadoop-metric</artifactId>
             <version>${project.version}</version>
         </dependency>
+<dependency>
+            <groupId>eagle</groupId>
+            <artifactId>eagle-alert-notification-plugin</artifactId>
+            <version>${project.version}</version>
+        </dependency>
     </dependencies>
 
     <build>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/88d0126c/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f2e0128..6bf7abc 100755
--- a/pom.xml
+++ b/pom.xml
@@ -131,7 +131,7 @@
         <module>eagle-external</module>
         <module>eagle-assembly</module>
         <module>eagle-topology-assembly</module>
-        <module>eagle-samples</module>
+        <module>eagle-examples</module>
         <module>eagle-gc</module>
         <module>eagle-hadoop-metric</module>
     </modules>
@@ -165,6 +165,12 @@
         <hive.version>1.2.1</hive.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>
+
         <!-- Common Versions -->
         <commons-cli.version>1.2</commons-cli.version>
         <commons-lang.version>2.6</commons-lang.version>
@@ -193,10 +199,9 @@
         <!-- Utility -->
         <joda-time.version>2.7</joda-time.version>
         <joda-convert.version>1.7</joda-convert.version>
-        <!--<log4j.version>1.2.17</log4j.version>-->
         <log4j.version>1.2.17</log4j.version>
-        <slf4j.version>1.6.5</slf4j.version>
-        <log4j-over-slf4j.version>1.6.6</log4j-over-slf4j.version>
+        <slf4j.version>1.7.5</slf4j.version>
+        <log4j-over-slf4j.version>1.7.2</log4j-over-slf4j.version>
         <quartz.version>2.2.1</quartz.version>
         <scopt.version>3.3.0</scopt.version>
         <akka.actor.version>2.3.14</akka.actor.version>
@@ -336,22 +341,17 @@
                 <version>${slf4j.version}</version>
                 <scope>compile</scope>
             </dependency>
-            <!--<dependency>-->
-                <!--<groupId>org.slf4j</groupId>-->
-                <!--<artifactId>slf4j-log4j12</artifactId>-->
-                <!--<version>${slf4j.version}</version>-->
-                <!--<scope>compile</scope>-->
-            <!--</dependency>-->
             <dependency>
                 <groupId>org.slf4j</groupId>
-                <artifactId>log4j-over-slf4j</artifactId>
-                <version>${log4j-over-slf4j.version}</version>
+                <artifactId>slf4j-log4j12</artifactId>
+                <version>${slf4j.version}</version>
+                <scope>compile</scope>
             </dependency>
             <dependency>
                 <groupId>org.slf4j</groupId>
-                <artifactId>slf4j-simple</artifactId>
+                <artifactId>log4j-over-slf4j</artifactId>
                 <version>${slf4j.version}</version>
-                <scope>test</scope>
+                <scope>compile</scope>
             </dependency>
             <dependency>
                 <groupId>log4j</groupId>
@@ -898,8 +898,6 @@
                                 <exclude>**/.metadata/</exclude>
                                 <!-- Maven working directory -->
                                 <exclude>**/target/**</exclude>
-                                <exclude>**/*.json</exclude>
-                                <exclude>**/*.json.*</exclude>
                                 <!-- Patch files which can be lying around -->
                                 <exclude>**/*.patch</exclude>
                                 <exclude>**/*.rej</exclude>
@@ -909,7 +907,9 @@
                                 <exclude>README*</exclude>
                                 <exclude>**/*.log</exclude>
                                 <exclude>**/eagle.log*</exclude>
-                                <exclude>**/resources/**/*.json</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>
@@ -918,7 +918,8 @@
                                 <exclude>**/dev-supports/**/*.json</exclude>
                                 <exclude>**/dev-supports/**/useractivity-agg-json.txt</exclude>
                                 <exclude>**/conf/sandbox-userprofile-topology.conf</exclude>
-                                <exclude>**/hadoop_jmx_collector/**</exclude>
+                                <exclude>**/kafka-python/**</exclude>
+                                <exclude>**/six/**</exclude>
                                 <!-- Fonts and Images -->
                                 <exclude>**/fonts/**</exclude>
                                 <exclude>**/images/**</exclude>


Mime
View raw message