eagle-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h..@apache.org
Subject [46/46] incubator-eagle git commit: [EAGLE-325] Initialize next-gen alert engine code on branch-0.5
Date Thu, 02 Jun 2016 07:08:25 GMT
[EAGLE-325] Initialize next-gen alert engine code on branch-0.5

Author: Hao Chen <hao@apache.org>

Closes #214 from haoch/EAGLE-325.


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

Branch: refs/heads/branch-0.5
Commit: 737e5a2d50c9d479d6810bfb7562e54a2d0dfb47
Parents: 656dd23
Author: Hao Chen <hao@apache.org>
Authored: Thu Jun 2 15:06:33 2016 +0800
Committer: Hao Chen <hao@apache.org>
Committed: Thu Jun 2 15:06:33 2016 +0800

----------------------------------------------------------------------
 .../eagle-alert-parent/eagle-alert-base/pom.xml |  52 ++
 .../eagle/alert/common/AlertEmailSender.java    | 160 +++++
 .../eagle/alert/email/AlertEmailComponent.java  |  33 +
 .../eagle/alert/email/AlertEmailContext.java    |  70 ++
 .../eagle-alert-notification-plugin/pom.xml     |  84 +++
 .../base/NotificationConstants.java             |  35 +
 .../notification/base/NotificationStatus.java   |  26 +
 .../notification/dao/AlertNotificationDAO.java  |  36 ++
 .../dao/AlertNotificationDAOImpl.java           |  70 ++
 .../notification/email/AlertEmailComponent.java |  32 +
 .../notification/email/AlertEmailContext.java   |  69 ++
 .../notification/email/AlertEmailGenerator.java | 138 ++++
 .../email/AlertEmailGeneratorBuilder.java       |  59 ++
 .../notification/email/AlertEmailSender.java    | 191 ++++++
 .../plugin/AlertEagleStorePersister.java        |  85 +++
 .../plugin/AlertEagleStorePlugin.java           | 101 +++
 .../notification/plugin/AlertEmailPlugin.java   | 149 +++++
 .../notification/plugin/AlertKafkaPlugin.java   | 140 ++++
 .../plugin/KafkaProducerSingleton.java          |  47 ++
 .../notification/plugin/NotificationPlugin.java |  59 ++
 .../plugin/NotificationPluginLoader.java        |  92 +++
 .../plugin/NotificationPluginManager.java       |  39 ++
 .../plugin/NotificationPluginManagerImpl.java   | 151 +++++
 .../utils/NotificationPluginUtils.java          |  67 ++
 .../src/main/resources/ALERT_DEFAULT.vm         | 266 ++++++++
 .../src/main/resources/application.conf         |  69 ++
 .../main/resources/notification-plugins-init.sh |  66 ++
 .../testcases/TestAlertEagleStorePlugin.java    |  50 ++
 .../testcases/TestAlertEmailPlugin.java         |  56 ++
 .../testcases/TestAlertKafkaPlugin.java         |  57 ++
 .../testcases/TestGetAllNotifications.java      |  41 ++
 .../testcases/TestNotificationPluginLoader.java |  41 ++
 .../TestNotificationPluginManager.java          |  93 +++
 .../testcases/TestNotificationPluginUtils.java  |  38 ++
 .../src/test/resources/application.conf         |  69 ++
 .../src/test/resources/log4j.properties         |  35 +
 .../eagle-alert-process/pom.xml                 | 139 ++++
 .../eagle/alert/config/DeduplicatorConfig.java  |  42 ++
 .../alert/config/EmailNotificationConfig.java   |  50 ++
 .../eagle/alert/config/NotificationConfig.java  |  45 ++
 .../apache/eagle/alert/config/Remediation.java  |  32 +
 .../dedup/AlertDeduplicationExecutorBase.java   | 188 ++++++
 .../dedup/AlertEmailDeduplicationExecutor.java  |  30 +
 .../dedup/AlertEntityDeduplicationExecutor.java |  31 +
 .../eagle/alert/dedup/DefaultDeduplicator.java  | 130 ++++
 .../eagle/alert/dedup/EntityDedupKey.java       |  62 ++
 .../eagle/alert/dedup/EntityDeduplicator.java   |  35 +
 .../eagle/alert/dedup/EntityTagsUniq.java       |  81 +++
 .../eagle/alert/executor/AlertExecutor.java     |  41 ++
 .../executor/AlertExecutorCreationUtils.java    | 111 ++++
 .../alert/notification/AlertEmailGenerator.java | 136 ++++
 .../notification/AlertNotificationExecutor.java | 128 ++++
 .../alert/persist/AlertPersistExecutor.java     |  56 ++
 .../eagle/alert/persist/EaglePersist.java       |  71 +++
 .../siddhi/SiddhiAlertAPIEntityRender.java      | 109 ++++
 ....eagle.policy.PolicyEvaluatorServiceProvider |  16 +
 .../src/main/resources/table-create.script      |  24 +
 .../src/test/java/META-INF/MANIFEST.MF          |  19 +
 .../eagle/alert/cep/TestSiddhiEvaluator.java    | 135 ++++
 .../eagle/alert/config/TestAlertDedup.java      |  38 ++
 .../alert/dao/TestAlertDefinitionDAOImpl.java   |  81 +++
 .../dao/TestSiddhiStreamMetadataUtils.java      |  60 ++
 .../alert/dao/TestStreamDefinitionDAOImpl.java  |  67 ++
 .../alert/executor/TestPolicyExecutor.java      |  85 +++
 .../alert/policy/TestDynamicPolicyLoader.java   | 114 ++++
 .../alert/policy/TestPolicyDistribution.java    |  30 +
 .../policy/TestPolicyDistributionUpdater.java   |  99 +++
 .../alert/policy/TestPolicyPartitioner.java     |  30 +
 .../alert/siddhi/TestExternalBatchWindow.java   | 307 +++++++++
 .../eagle/alert/siddhi/TestSiddhiEngine.java    | 243 +++++++
 .../alert/siddhi/TestSiddhiSlideWindow.java     | 129 ++++
 .../eagle/alert/siddhi/TestSiddhiStream.java    |  34 +
 .../eagle/alert/state/TestAggregation.java      |  98 +++
 .../alert/state/TestSiddhiExpiredEvents.java    | 129 ++++
 .../TestSiddhiStateSnapshotAndRestore.java      | 506 +++++++++++++++
 .../src/test/resources/application.conf         |  33 +
 .../src/test/resources/log4j.properties         |  34 +
 .../src/test/resources/str.siddhiext            |  39 ++
 .../src/test/resources/unittest.conf            |  65 ++
 .../eagle-alert-service/pom.xml                 |  60 ++
 .../alert/AlertPolicyValidateProvider.java      |  36 ++
 .../service/alert/PolicyValidateResource.java   |  64 ++
 .../SiddhiAlertPolicyValidateProvider.java      | 133 ++++
 .../service/alert/SiteApplicationObject.java    |  62 ++
 .../service/alert/SiteApplicationResource.java  | 189 ++++++
 .../alert/resolver/AttributeResolvable.java     |  44 ++
 .../resolver/AttributeResolveException.java     |  26 +
 .../resolver/AttributeResolveResource.java      |  81 +++
 .../resolver/AttributeResolveResponse.java      |  40 ++
 .../resolver/AttributeResolverFactory.java      |  50 ++
 .../BadAttributeResolveRequestException.java    |  31 +
 .../GenericAttributeResolveRequest.java         |  54 ++
 .../resolver/impl/BooleanAttributeResolver.java |  43 ++
 .../resolver/impl/EntityAttributeResolver.java  | 142 +++++
 ...le.service.alert.AlertPolicyValidateProvider |  16 +
 .../src/main/resources/core-site.xml            |  24 +
 ...le.service.alert.AlertPolicyValidateProvider |  16 +
 .../src/test/resources/log4j.properties         |  35 +
 .../eagle-alert-parent/eagle-alert/.gitignore   |  80 +++
 .../eagle-alert-parent/eagle-alert/README.md    | 169 +++++
 .../eagle-alert/alert-assembly/pom.xml          | 101 +++
 .../src/assembly/alert-assembly.xml             |  58 ++
 .../eagle-alert/alert-common/.gitignore         |   2 +
 .../eagle-alert/alert-common/pom.xml            | 130 ++++
 .../eagle/alert/config/ConfigBusBase.java       |  56 ++
 .../eagle/alert/config/ConfigBusConsumer.java   |  57 ++
 .../eagle/alert/config/ConfigBusProducer.java   |  54 ++
 .../alert/config/ConfigChangeCallback.java      |  21 +
 .../apache/eagle/alert/config/ConfigValue.java  |  50 ++
 .../org/apache/eagle/alert/config/ZKConfig.java |  34 +
 .../eagle/alert/config/ZKConfigBuilder.java     |  35 +
 .../alert/coordination/model/AlertBoltSpec.java | 114 ++++
 .../coordination/model/Kafka2TupleMetadata.java |  97 +++
 .../coordination/model/PolicyWorkerQueue.java   |  79 +++
 .../alert/coordination/model/PublishSpec.java   |  82 +++
 .../alert/coordination/model/RouterSpec.java    |  76 +++
 .../alert/coordination/model/ScheduleState.java | 215 +++++++
 .../alert/coordination/model/SpoutSpec.java     | 124 ++++
 .../coordination/model/StreamNameSelector.java  |  31 +
 .../model/StreamRepartitionMetadata.java        |  69 ++
 .../model/StreamRepartitionStrategy.java        |  82 +++
 .../coordination/model/StreamRouterSpec.java    |  75 +++
 .../model/Tuple2StreamConverter.java            |  81 +++
 .../model/Tuple2StreamMetadata.java             |  87 +++
 .../model/VersionedPolicyDefinition.java        |  53 ++
 .../model/VersionedStreamDefinition.java        |  53 ++
 .../alert/coordination/model/WorkSlot.java      |  55 ++
 .../model/internal/MonitoredStream.java         |  91 +++
 .../model/internal/PolicyAssignment.java        |  69 ++
 .../model/internal/StreamGroup.java             |  82 +++
 .../model/internal/StreamWorkSlotQueue.java     | 124 ++++
 .../coordination/model/internal/Topology.java   | 170 +++++
 .../eagle/alert/engine/codec/IStreamCodec.java  |  30 +
 .../alert/engine/codec/SherlockEventCodec.java  |  41 ++
 .../alert/engine/codec/SherlockMetricCodec.java |  39 ++
 .../engine/coordinator/PolicyDefinition.java    | 199 ++++++
 .../alert/engine/coordinator/Publishment.java   | 101 +++
 .../engine/coordinator/PublishmentType.java     |  83 +++
 .../alert/engine/coordinator/StreamColumn.java  | 128 ++++
 .../engine/coordinator/StreamDefinition.java    | 105 +++
 .../engine/coordinator/StreamPartition.java     | 143 +++++
 .../engine/coordinator/StreamSortSpec.java      |  98 +++
 .../engine/coordinator/StreamingCluster.java    |  89 +++
 .../alert/engine/model/AlertStreamEvent.java    |  89 +++
 .../alert/engine/model/PartitionedEvent.java    | 149 +++++
 .../eagle/alert/engine/model/StreamEvent.java   | 144 +++++
 .../alert/engine/model/StreamEventBuilder.java  |  88 +++
 .../eagle/alert/metric/IMetricSystem.java       |  64 ++
 .../apache/eagle/alert/metric/MetricSystem.java | 116 ++++
 .../eagle/alert/metric/entity/MetricEvent.java  | 111 ++++
 .../alert/metric/reporter/KafkaReporter.java    | 213 +++++++
 .../eagle/alert/metric/sink/ConsoleSink.java    |  47 ++
 .../alert/metric/sink/ElasticSearchSink.java    |  74 +++
 .../apache/eagle/alert/metric/sink/JmxSink.java |  48 ++
 .../eagle/alert/metric/sink/KafkaSink.java      |  65 ++
 .../eagle/alert/metric/sink/MetricSink.java     |  30 +
 .../alert/metric/sink/MetricSinkRepository.java |  47 ++
 .../eagle/alert/metric/sink/Slf4jSink.java      |  74 +++
 .../alert/metric/source/JVMMetricSource.java    |  41 ++
 .../eagle/alert/metric/source/MetricSource.java |  24 +
 .../metric/source/MetricSourceWrapper.java      |  39 ++
 .../eagle/alert/resource/SimpleCORSFiler.java   |  59 ++
 .../alert/service/IMetadataServiceClient.java   |  69 ++
 .../service/MetadataServiceClientImpl.java      | 235 +++++++
 .../eagle/alert/utils/AlertConstants.java       |  27 +
 .../org/apache/eagle/alert/utils/ByteUtils.java | 188 ++++++
 .../apache/eagle/alert/utils/ConfigUtils.java   |  47 ++
 .../apache/eagle/alert/utils/DateTimeUtil.java  | 141 ++++
 .../org/apache/eagle/alert/utils/HostUtils.java |  85 +++
 .../org/apache/eagle/alert/utils/JsonUtils.java |  41 ++
 .../eagle/alert/utils/StreamIdConversion.java   |  52 ++
 .../eagle/alert/utils/TimePeriodUtils.java      |  62 ++
 .../src/main/resources/log4j.properties         |  21 +
 .../eagle/alert/config/TestConfigBus.java       |  61 ++
 .../eagle/alert/metric/MetricSystemTest.java    |  78 +++
 .../service/TestMetadataServiceClientImpl.java  |  40 ++
 .../apache/eagle/correlation/meta/JsonTest.java |  30 +
 .../src/test/resources/application.conf         |  32 +
 .../src/test/resources/log4j.properties         |  21 +
 .../eagle-alert/alert-coordinator/.gitignore    |   1 +
 .../eagle-alert/alert-coordinator/pom.xml       | 108 ++++
 .../eagle/alert/coordinator/Coordinator.java    | 212 +++++++
 .../alert/coordinator/CoordinatorConstants.java |  31 +
 .../alert/coordinator/IPolicyScheduler.java     |  34 +
 .../alert/coordinator/IScheduleContext.java     |  54 ++
 .../coordinator/PolicySchedulerFactory.java     |  30 +
 .../eagle/alert/coordinator/ScheduleOption.java |  74 +++
 .../alert/coordinator/TopologyMgmtService.java  |  83 +++
 .../coordinator/impl/GreedyPolicyScheduler.java | 340 ++++++++++
 .../impl/MonitorMetadataGenerator.java          | 287 +++++++++
 .../alert/coordinator/impl/ScheduleResult.java  |  42 ++
 .../eagle/alert/coordinator/impl/WorkItem.java  |  33 +
 .../coordinator/impl/WorkQueueBuilder.java      |  93 +++
 .../impl/strategies/IWorkSlotStrategy.java      |  32 +
 .../strategies/SameTopologySlotStrategy.java    | 164 +++++
 .../alert/coordinator/model/AlertBoltUsage.java |  93 +++
 .../alert/coordinator/model/GroupBoltUsage.java |  67 ++
 .../alert/coordinator/model/TopologyUsage.java  | 102 +++
 .../provider/InMemScheduleConext.java           | 148 +++++
 .../provider/ScheduleContextBuilder.java        | 400 ++++++++++++
 .../resource/CoordinatorResource.java           |  69 ++
 .../trigger/DynamicPolicyLoader.java            |  97 +++
 .../trigger/PolicyChangeListener.java           |  26 +
 .../src/main/resources/application.conf         |  41 ++
 .../src/main/resources/log4j.properties         |  21 +
 .../src/main/webapp/WEB-INF/web.xml             |  87 +++
 .../src/main/webapp/index.html                  |  18 +
 .../alert/coordinator/CoordinatorTest.java      | 124 ++++
 .../coordinator/DynamicPolicyLoaderTest.java    |  26 +
 .../MetadataServiceClientImplTest.java          |  57 ++
 .../coordinator/ScheduleContextBuilderTest.java | 281 ++++++++
 .../apache/alert/coordinator/SchedulerTest.java | 635 +++++++++++++++++++
 .../alert/coordinator/WorkSlotStrategyTest.java | 162 +++++
 .../mock/InMemMetadataServiceClient.java        | 147 +++++
 .../mock/TestTopologyMgmtService.java           |  73 +++
 .../src/test/resources/test-application.conf    |  42 ++
 .../eagle-alert/alert-devtools/.gitignore       |   3 +
 .../alert-devtools/bin/kafka-producer.sh        |  21 +
 .../alert-devtools/bin/kafka-server-start.sh    |  51 ++
 .../alert-devtools/bin/kafka-server-status.sh   |  24 +
 .../alert-devtools/bin/kafka-server-stop.sh     |  23 +
 .../alert-devtools/bin/kafka-topics.sh          |  17 +
 .../eagle-alert/alert-devtools/bin/run-class.sh | 112 ++++
 .../alert-devtools/bin/start-coordinator.sh     |  20 +
 .../alert-devtools/bin/start-integration1.sh    |  30 +
 .../alert-devtools/bin/start-integration2.sh    |  33 +
 .../alert-devtools/bin/start-metadata.sh        |  20 +
 .../alert-devtools/bin/start-sampleclient1.sh   |  20 +
 .../alert-devtools/bin/start-sampleclient2.sh   |  20 +
 .../alert-devtools/bin/start-zk-kafka.sh        |  28 +
 .../alert-devtools/bin/stop-zk-kafka.sh         |  28 +
 .../bin/zookeeper-server-start.sh               |  50 ++
 .../bin/zookeeper-server-status.sh              |  24 +
 .../alert-devtools/bin/zookeeper-server-stop.sh |  24 +
 .../alert-devtools/conf/cli-log4j.properties    |  21 +
 .../alert-devtools/conf/kafka-server.properties | 115 ++++
 .../alert-devtools/conf/log4j.properties        |  21 +
 .../conf/zookeeper-server.properties            |  20 +
 .../eagle-alert/alert-devtools/pom.xml          | 108 ++++
 .../eagle/alert/tools/KafkaConsumerOffset.java  |  27 +
 .../alert/tools/KafkaConsumerOffsetFetcher.java |  66 ++
 .../alert/tools/KafkaLatestOffsetFetcher.java   |  97 +++
 .../eagle/contrib/kafka/ProducerTool.scala      | 230 +++++++
 .../eagle/alert/tools/TestKafkaOffset.java      |  69 ++
 .../kafka-offset-test.application.conf          |  25 +
 .../src/test/resources/log4j.properties         |  21 +
 .../eagle-alert/alert-engine/.gitignore         |   1 +
 .../eagle-alert/alert-engine/pom.xml            | 149 +++++
 .../alert/engine/AlertStreamCollector.java      |  27 +
 .../apache/eagle/alert/engine/Collector.java    |  27 +
 .../alert/engine/PartitionedEventCollector.java |  29 +
 .../eagle/alert/engine/StreamContext.java       |  27 +
 .../eagle/alert/engine/StreamContextImpl.java   |  44 ++
 .../eagle/alert/engine/UnitTopologyMain.java    |  59 ++
 .../IMetadataChangeNotifyService.java           |  57 ++
 .../alert/engine/coordinator/MetadataType.java  |  30 +
 .../StreamDefinitionNotFoundException.java      |  25 +
 .../AbstractMetadataChangeNotifyService.java    | 113 ++++
 .../impl/ZKMetadataChangeNotifyService.java     | 200 ++++++
 .../engine/evaluator/PolicyChangeListener.java  |  29 +
 .../engine/evaluator/PolicyGroupEvaluator.java  |  45 ++
 .../engine/evaluator/PolicyHandlerContext.java  |  60 ++
 .../engine/evaluator/PolicyStreamHandler.java   |  27 +
 .../engine/evaluator/PolicyStreamHandlers.java  |  33 +
 ...ertBoltOutputCollectorThreadSafeWrapper.java | 118 ++++
 .../impl/AlertBoltOutputCollectorWrapper.java   |  55 ++
 .../impl/PolicyGroupEvaluatorImpl.java          | 172 +++++
 .../evaluator/impl/SiddhiDefinitionAdapter.java | 142 +++++
 .../evaluator/impl/SiddhiPolicyHandler.java     | 148 +++++
 .../engine/publisher/AlertDeduplicator.java     |  31 +
 .../engine/publisher/AlertPublishListener.java  |  28 +
 .../engine/publisher/AlertPublishPlugin.java    |  50 ++
 .../publisher/AlertPublishSpecListener.java     |  26 +
 .../alert/engine/publisher/AlertPublisher.java  |  31 +
 .../eagle/alert/engine/publisher/AlertSink.java |  33 +
 .../engine/publisher/PublishConstants.java      |  48 ++
 .../publisher/email/AlertEmailConstants.java    |  39 ++
 .../publisher/email/AlertEmailContext.java      |  71 +++
 .../publisher/email/AlertEmailGenerator.java    | 143 +++++
 .../email/AlertEmailGeneratorBuilder.java       |  59 ++
 .../publisher/email/AlertEmailSender.java       | 164 +++++
 .../engine/publisher/email/EagleMailClient.java | 240 +++++++
 .../impl/AlertEagleStorePersister.java          |  60 ++
 .../impl/AlertEagleStorePublisher.java          | 113 ++++
 .../publisher/impl/AlertEmailPublisher.java     | 151 +++++
 .../publisher/impl/AlertKafkaPublisher.java     | 136 ++++
 .../impl/AlertPublishPluginsFactory.java        |  48 ++
 .../publisher/impl/AlertPublisherImpl.java      | 154 +++++
 .../publisher/impl/DefaultDeduplicator.java     | 113 ++++
 .../alert/engine/publisher/impl/EventUniq.java  |  57 ++
 .../publisher/impl/KafkaProducerManager.java    |  42 ++
 .../engine/publisher/impl/PublishStatus.java    |  27 +
 .../engine/router/AlertBoltSpecListener.java    |  32 +
 .../alert/engine/router/SpoutSpecListener.java  |  32 +
 .../eagle/alert/engine/router/StreamRoute.java  |  85 +++
 .../router/StreamRoutePartitionFactory.java     |  37 ++
 .../engine/router/StreamRoutePartitioner.java   |  29 +
 .../engine/router/StreamRouteSpecListener.java  |  30 +
 .../eagle/alert/engine/router/StreamRouter.java |  30 +
 .../router/StreamRouterBoltSpecListener.java    |  33 +
 .../alert/engine/router/StreamSortHandler.java  |  42 ++
 .../engine/router/StreamSortSpecListener.java   |  28 +
 .../impl/BasicStreamRoutePartitioner.java       |  77 +++
 .../router/impl/RoutePhysicalGrouping.java      |  76 +++
 .../engine/router/impl/ShuffleGrouping.java     |  74 +++
 .../impl/StreamRouterBoltOutputCollector.java   | 229 +++++++
 .../engine/router/impl/StreamRouterImpl.java    | 163 +++++
 .../alert/engine/runner/AbstractStreamBolt.java |  93 +++
 .../eagle/alert/engine/runner/AlertBolt.java    | 157 +++++
 .../alert/engine/runner/AlertPublisherBolt.java | 113 ++++
 .../alert/engine/runner/MapComparator.java      |  72 +++
 .../engine/runner/StormMetricConsumer.java      | 136 ++++
 .../runner/StormMetricTaggedConsumer.java       | 156 +++++
 .../alert/engine/runner/StreamRouterBolt.java   | 201 ++++++
 .../alert/engine/runner/UnitTopologyRunner.java | 215 +++++++
 .../eagle/alert/engine/scheme/JsonScheme.java   |  71 +++
 .../scheme/JsonStringStreamNameSelector.java    |  74 +++
 .../alert/engine/scheme/PlainStringScheme.java  |  67 ++
 .../scheme/PlainStringStreamNameSelector.java   |  49 ++
 .../PartitionedEventDigestSerializer.java       |  62 ++
 .../PartitionedEventSerializer.java             |  39 ++
 .../SerializationMetadataProvider.java          |  30 +
 .../alert/engine/serialization/Serializer.java  |  26 +
 .../alert/engine/serialization/Serializers.java |  56 ++
 .../serialization/impl/BooleanSerializer.java   |  35 +
 .../serialization/impl/DoubleSerializer.java    |  35 +
 .../serialization/impl/FloatSerializer.java     |  35 +
 .../serialization/impl/IntegerSerializer.java   |  35 +
 .../impl/JavaObjectSerializer.java              |  42 ++
 .../serialization/impl/LongSerializer.java      |  35 +
 .../impl/PartitionedEventSerializerImpl.java    |  98 +++
 .../impl/StreamEventSerializer.java             | 104 +++
 .../impl/StreamPartitionDigestSerializer.java   | 100 +++
 .../impl/StreamPartitionSerializer.java         |  81 +++
 .../serialization/impl/StringSerializer.java    |  35 +
 .../extension/AttributeCollectAggregator.java   | 122 ++++
 .../alert/engine/sorter/BaseStreamWindow.java   | 183 ++++++
 .../alert/engine/sorter/StreamTimeClock.java    |  45 ++
 .../engine/sorter/StreamTimeClockListener.java  |  27 +
 .../engine/sorter/StreamTimeClockManager.java   |  45 ++
 .../engine/sorter/StreamTimeClockTrigger.java   |  61 ++
 .../eagle/alert/engine/sorter/StreamWindow.java | 113 ++++
 .../engine/sorter/StreamWindowManager.java      |  64 ++
 .../engine/sorter/StreamWindowRepository.java   | 257 ++++++++
 .../sorter/impl/CachedEventGroupSerializer.java | 114 ++++
 .../impl/PartitionedEventGroupSerializer.java   | 112 ++++
 .../PartitionedEventTimeOrderingComparator.java |  50 ++
 .../impl/StreamSortWindowHandlerImpl.java       | 113 ++++
 .../sorter/impl/StreamSortedWindowInMapDB.java  | 145 +++++
 .../sorter/impl/StreamSortedWindowOnHeap.java   |  80 +++
 .../impl/StreamTimeClockInLocalMemory.java      |  64 ++
 .../sorter/impl/StreamTimeClockManagerImpl.java | 171 +++++
 .../sorter/impl/StreamWindowManagerImpl.java    | 173 +++++
 .../alert/engine/spout/CorrelationSpout.java    | 380 +++++++++++
 .../alert/engine/spout/CreateTopicUtils.java    |  43 ++
 .../eagle/alert/engine/spout/ISpoutSpecLCM.java |  41 ++
 .../engine/spout/KafkaMessageIdWrapper.java     |  42 ++
 .../eagle/alert/engine/spout/SchemeBuilder.java |  35 +
 .../spout/SpoutOutputCollectorWrapper.java      | 220 +++++++
 .../alert/engine/utils/CompressionUtils.java    |  62 ++
 .../alert/engine/utils/MetadataSerDeser.java    |  93 +++
 .../alert/engine/utils/SerializableUtils.java   | 128 ++++
 .../main/java/storm/kafka/KafkaSpoutMetric.java |  94 +++
 .../java/storm/kafka/KafkaSpoutWrapper.java     | 111 ++++
 .../src/main/resources/ALERT_DEFAULT.vm         | 267 ++++++++
 .../src/main/resources/application.conf         |  72 +++
 .../src/main/resources/eagle.siddhiext          |  19 +
 .../src/main/resources/log4j.properties         |  26 +
 .../alert/engine/e2e/CoordinatorClient.java     |  95 +++
 .../eagle/alert/engine/e2e/Integration1.java    | 236 +++++++
 .../eagle/alert/engine/e2e/Integration2.java    | 142 +++++
 .../eagle/alert/engine/e2e/SampleClient1.java   | 127 ++++
 .../eagle/alert/engine/e2e/SampleClient2.java   | 139 ++++
 ...oltOutputCollectorThreadSafeWrapperTest.java |  90 +++
 .../SiddhiCEPPolicyEventHandlerTest.java        | 161 +++++
 .../integration/MockMetadataServiceClient.java  | 124 ++++
 .../engine/metric/MemoryUsageGaugeSetTest.java  |  47 ++
 .../engine/mock/MockPartitionedCollector.java   |  55 ++
 .../engine/mock/MockSampleMetadataFactory.java  | 266 ++++++++
 .../alert/engine/mock/MockStreamCollector.java  |  51 ++
 .../engine/mock/MockStreamMetadataService.java  |  39 ++
 .../alert/engine/mock/MockStreamReceiver.java   |  79 +++
 .../alert/engine/perf/TestSerDeserPer.java      | 317 +++++++++
 .../alert/engine/router/TestAlertBolt.java      | 177 ++++++
 .../engine/router/TestAlertPublisherBolt.java   | 111 ++++
 .../engine/runner/TestStreamRouterBolt.java     | 259 ++++++++
 .../serialization/JavaSerializationTest.java    | 112 ++++
 .../PartitionedEventSerializerTest.java         | 220 +++++++
 .../AttributeCollectAggregatorTest.java         | 149 +++++
 .../alert/engine/sorter/MapDBTestSuite.java     |  45 ++
 .../engine/sorter/StreamSortHandlerTest.java    | 270 ++++++++
 .../sorter/StreamWindowBenchmarkTest.java       | 145 +++++
 .../engine/sorter/StreamWindowTestSuite.java    | 164 +++++
 .../sorter/TreeMultisetComparatorTest.java      | 110 ++++
 .../engine/topology/AlertTopologyTest.java      | 138 ++++
 .../CoordinatorSpoutIntegrationTest.java        | 101 +++
 .../engine/topology/CorrelationSpoutTest.java   | 184 ++++++
 .../engine/topology/FastWordCountTopology.java  | 215 +++++++
 .../MockMetadataChangeNotifyService.java        | 111 ++++
 .../engine/topology/SendData2KafkaTest.java     | 103 +++
 .../eagle/alert/engine/topology/TestBolt.java   |  61 ++
 .../alert/engine/topology/TestByteBuffer.java   |  53 ++
 .../topology/TestMetadataSpecSerDeser.java      | 266 ++++++++
 .../TestStormCustomGroupingRouting.java         | 144 +++++
 .../engine/topology/TestStormParallelism.java   | 161 +++++
 .../topology/TestStormStreamIdRouting.java      | 140 ++++
 .../topology/TestTuple2StreamConverter.java     |  62 ++
 .../engine/topology/TestUnitTopologyMain.java   |  57 ++
 .../engine/utils/CompressionUtilsTest.java      |  43 ++
 .../alert/engine/utils/TimePeriodUtilsTest.java |  91 +++
 .../test/resources/application-integration.conf |  57 ++
 .../test/resources/application-test-backup.conf |  71 +++
 .../src/test/resources/application-test.conf    |  68 ++
 .../correlation/application-integration-2.conf  |  57 ++
 .../test/resources/correlation/datasources.json |  37 ++
 .../test/resources/correlation/policies.json    |  39 ++
 .../resources/correlation/publishments.json     |  17 +
 .../correlation/streamdefinitions.json          |  93 +++
 .../test/resources/correlation/topologies.json  |  31 +
 .../src/test/resources/datasources.json         |  19 +
 .../src/test/resources/log4j.properties         |  23 +
 .../src/test/resources/policies.json            |  54 ++
 .../src/test/resources/publishments.json        |  29 +
 .../src/test/resources/publishments2.json       |  19 +
 .../src/test/resources/sample_perfmon_data.json |   3 +
 .../src/test/resources/streamdefinitions.json   |  44 ++
 .../src/test/resources/testAlertBoltSpec.json   |  92 +++
 .../src/test/resources/testPublishSpec.json     |  32 +
 .../src/test/resources/testPublishSpec2.json    |  32 +
 .../src/test/resources/testSpoutSpec.json       | 139 ++++
 .../resources/testStreamDefinitionsSpec.json    |  47 ++
 .../resources/testStreamRouterBoltSpec.json     | 123 ++++
 .../alert-engine/src/test/resources/topic.json  |   1 +
 .../src/test/resources/topologies.json          |  31 +
 .../alert-metadata-service/.gitignore           |   2 +
 .../alert-metadata-service/pom.xml              | 114 ++++
 .../metadata/resource/MetadataResource.java     | 225 +++++++
 .../topology/resource/TopologyMgmtResource.java |  69 ++
 .../impl/TopologyMgmtResourceHelper.java        |  48 ++
 .../resource/impl/TopologyMgmtResourceImpl.java | 158 +++++
 .../topology/resource/impl/TopologyStatus.java  |  82 +++
 .../src/main/resources/application.conf         |  21 +
 .../src/main/webapp/WEB-INF/web.xml             |  81 +++
 .../src/main/webapp/index.html                  |  18 +
 .../impl/TopologyMgmtResourceImplTest.java      |  55 ++
 .../alert-metadata/.gitignore                   |   2 +
 .../alert-metadata/pom.xml                      |  48 ++
 .../metadata/impl/InMemMetadataDaoImpl.java     | 333 ++++++++++
 .../alert/metadata/impl/MetadataDaoFactory.java |  70 ++
 .../metadata/impl/MongoMetadataDaoImpl.java     | 380 +++++++++++
 .../metadata/impl/jdbc/JdbcMetadataDaoImpl.java | 292 +++++++++
 .../alert/metadata/resource/IMetadataDao.java   |  86 +++
 .../eagle/alert/metadata/resource/Models.java   |  48 ++
 .../eagle/alert/metadata/resource/OpResult.java |  28 +
 .../src/main/resources/application.conf         |  23 +
 .../alert/resource/impl/InMemoryTest.java       |  43 ++
 .../alert/resource/impl/MongoImplTest.java      | 187 ++++++
 .../src/test/resources/application-mongo.conf   |  21 +
 .../src/test/resources/policy-sample.json       |  32 +
 .../eagle-alert/alert-metadata-parent/pom.xml   |  30 +
 .../eagle-alert-parent/eagle-alert/pom.xml      | 392 ++++++++++++
 eagle-core/eagle-alert-parent/pom.xml           |  39 ++
 eagle-core/eagle-alert/alert/.gitignore         |  80 ---
 eagle-core/eagle-alert/alert/README.md          | 169 -----
 .../eagle-alert/alert/alert-assembly/pom.xml    | 102 ---
 .../src/assembly/alert-assembly.xml             |  58 --
 .../eagle-alert/alert/alert-common/.gitignore   |   2 -
 .../eagle-alert/alert/alert-common/pom.xml      | 129 ----
 .../eagle/alert/config/ConfigBusBase.java       |  56 --
 .../eagle/alert/config/ConfigBusConsumer.java   |  57 --
 .../eagle/alert/config/ConfigBusProducer.java   |  54 --
 .../alert/config/ConfigChangeCallback.java      |  21 -
 .../apache/eagle/alert/config/ConfigValue.java  |  50 --
 .../org/apache/eagle/alert/config/ZKConfig.java |  34 -
 .../eagle/alert/config/ZKConfigBuilder.java     |  35 -
 .../alert/coordination/model/AlertBoltSpec.java | 114 ----
 .../coordination/model/Kafka2TupleMetadata.java |  97 ---
 .../coordination/model/PolicyWorkerQueue.java   |  79 ---
 .../alert/coordination/model/PublishSpec.java   |  82 ---
 .../alert/coordination/model/RouterSpec.java    |  76 ---
 .../alert/coordination/model/ScheduleState.java | 215 -------
 .../alert/coordination/model/SpoutSpec.java     | 124 ----
 .../coordination/model/StreamNameSelector.java  |  31 -
 .../model/StreamRepartitionMetadata.java        |  69 --
 .../model/StreamRepartitionStrategy.java        |  82 ---
 .../coordination/model/StreamRouterSpec.java    |  75 ---
 .../model/Tuple2StreamConverter.java            |  81 ---
 .../model/Tuple2StreamMetadata.java             |  87 ---
 .../model/VersionedPolicyDefinition.java        |  53 --
 .../model/VersionedStreamDefinition.java        |  53 --
 .../alert/coordination/model/WorkSlot.java      |  55 --
 .../model/internal/MonitoredStream.java         |  91 ---
 .../model/internal/PolicyAssignment.java        |  69 --
 .../model/internal/StreamGroup.java             |  82 ---
 .../model/internal/StreamWorkSlotQueue.java     | 124 ----
 .../coordination/model/internal/Topology.java   | 170 -----
 .../eagle/alert/engine/codec/IStreamCodec.java  |  30 -
 .../alert/engine/codec/SherlockEventCodec.java  |  41 --
 .../alert/engine/codec/SherlockMetricCodec.java |  39 --
 .../engine/coordinator/PolicyDefinition.java    | 199 ------
 .../alert/engine/coordinator/Publishment.java   | 101 ---
 .../engine/coordinator/PublishmentType.java     |  83 ---
 .../alert/engine/coordinator/StreamColumn.java  | 128 ----
 .../engine/coordinator/StreamDefinition.java    | 105 ---
 .../engine/coordinator/StreamPartition.java     | 143 -----
 .../engine/coordinator/StreamSortSpec.java      |  98 ---
 .../engine/coordinator/StreamingCluster.java    |  89 ---
 .../alert/engine/model/AlertStreamEvent.java    |  89 ---
 .../alert/engine/model/PartitionedEvent.java    | 149 -----
 .../eagle/alert/engine/model/StreamEvent.java   | 144 -----
 .../alert/engine/model/StreamEventBuilder.java  |  88 ---
 .../eagle/alert/metric/IMetricSystem.java       |  64 --
 .../apache/eagle/alert/metric/MetricSystem.java | 116 ----
 .../eagle/alert/metric/entity/MetricEvent.java  | 111 ----
 .../alert/metric/reporter/KafkaReporter.java    | 213 -------
 .../eagle/alert/metric/sink/ConsoleSink.java    |  47 --
 .../alert/metric/sink/ElasticSearchSink.java    |  74 ---
 .../apache/eagle/alert/metric/sink/JmxSink.java |  48 --
 .../eagle/alert/metric/sink/KafkaSink.java      |  65 --
 .../eagle/alert/metric/sink/MetricSink.java     |  30 -
 .../alert/metric/sink/MetricSinkRepository.java |  47 --
 .../eagle/alert/metric/sink/Slf4jSink.java      |  74 ---
 .../alert/metric/source/JVMMetricSource.java    |  41 --
 .../eagle/alert/metric/source/MetricSource.java |  24 -
 .../metric/source/MetricSourceWrapper.java      |  39 --
 .../eagle/alert/resource/SimpleCORSFiler.java   |  59 --
 .../alert/service/IMetadataServiceClient.java   |  69 --
 .../service/MetadataServiceClientImpl.java      | 235 -------
 .../eagle/alert/utils/AlertConstants.java       |  27 -
 .../org/apache/eagle/alert/utils/ByteUtils.java | 188 ------
 .../apache/eagle/alert/utils/ConfigUtils.java   |  47 --
 .../apache/eagle/alert/utils/DateTimeUtil.java  | 141 ----
 .../org/apache/eagle/alert/utils/HostUtils.java |  85 ---
 .../org/apache/eagle/alert/utils/JsonUtils.java |  41 --
 .../eagle/alert/utils/StreamIdConversion.java   |  52 --
 .../eagle/alert/utils/TimePeriodUtils.java      |  62 --
 .../src/main/resources/log4j.properties         |  21 -
 .../eagle/alert/config/TestConfigBus.java       |  61 --
 .../eagle/alert/metric/MetricSystemTest.java    |  78 ---
 .../service/TestMetadataServiceClientImpl.java  |  40 --
 .../apache/eagle/correlation/meta/JsonTest.java |  30 -
 .../src/test/resources/application.conf         |  32 -
 .../src/test/resources/log4j.properties         |  21 -
 .../alert/alert-coordinator/.gitignore          |   1 -
 .../eagle-alert/alert/alert-coordinator/pom.xml | 107 ----
 .../eagle/alert/coordinator/Coordinator.java    | 212 -------
 .../alert/coordinator/CoordinatorConstants.java |  31 -
 .../alert/coordinator/IPolicyScheduler.java     |  34 -
 .../alert/coordinator/IScheduleContext.java     |  54 --
 .../coordinator/PolicySchedulerFactory.java     |  30 -
 .../eagle/alert/coordinator/ScheduleOption.java |  74 ---
 .../alert/coordinator/TopologyMgmtService.java  |  83 ---
 .../coordinator/impl/GreedyPolicyScheduler.java | 340 ----------
 .../impl/MonitorMetadataGenerator.java          | 287 ---------
 .../alert/coordinator/impl/ScheduleResult.java  |  42 --
 .../eagle/alert/coordinator/impl/WorkItem.java  |  33 -
 .../coordinator/impl/WorkQueueBuilder.java      |  93 ---
 .../impl/strategies/IWorkSlotStrategy.java      |  32 -
 .../strategies/SameTopologySlotStrategy.java    | 164 -----
 .../alert/coordinator/model/AlertBoltUsage.java |  93 ---
 .../alert/coordinator/model/GroupBoltUsage.java |  67 --
 .../alert/coordinator/model/TopologyUsage.java  | 102 ---
 .../provider/InMemScheduleConext.java           | 148 -----
 .../provider/ScheduleContextBuilder.java        | 400 ------------
 .../resource/CoordinatorResource.java           |  69 --
 .../trigger/DynamicPolicyLoader.java            |  97 ---
 .../trigger/PolicyChangeListener.java           |  26 -
 .../src/main/resources/application.conf         |  41 --
 .../src/main/resources/log4j.properties         |  21 -
 .../src/main/webapp/WEB-INF/web.xml             |  87 ---
 .../src/main/webapp/index.html                  |  18 -
 .../alert/coordinator/CoordinatorTest.java      | 124 ----
 .../coordinator/DynamicPolicyLoaderTest.java    |  26 -
 .../MetadataServiceClientImplTest.java          |  57 --
 .../coordinator/ScheduleContextBuilderTest.java | 281 --------
 .../apache/alert/coordinator/SchedulerTest.java | 635 -------------------
 .../alert/coordinator/WorkSlotStrategyTest.java | 162 -----
 .../mock/InMemMetadataServiceClient.java        | 147 -----
 .../mock/TestTopologyMgmtService.java           |  73 ---
 .../src/test/resources/test-application.conf    |  42 --
 .../eagle-alert/alert/alert-devtools/.gitignore |   3 -
 .../alert/alert-devtools/bin/kafka-producer.sh  |  21 -
 .../alert-devtools/bin/kafka-server-start.sh    |  51 --
 .../alert-devtools/bin/kafka-server-status.sh   |  24 -
 .../alert-devtools/bin/kafka-server-stop.sh     |  23 -
 .../alert/alert-devtools/bin/kafka-topics.sh    |  17 -
 .../alert/alert-devtools/bin/run-class.sh       | 112 ----
 .../alert-devtools/bin/start-coordinator.sh     |  20 -
 .../alert-devtools/bin/start-integration1.sh    |  30 -
 .../alert-devtools/bin/start-integration2.sh    |  33 -
 .../alert/alert-devtools/bin/start-metadata.sh  |  20 -
 .../alert-devtools/bin/start-sampleclient1.sh   |  20 -
 .../alert-devtools/bin/start-sampleclient2.sh   |  20 -
 .../alert/alert-devtools/bin/start-zk-kafka.sh  |  28 -
 .../alert/alert-devtools/bin/stop-zk-kafka.sh   |  28 -
 .../bin/zookeeper-server-start.sh               |  50 --
 .../bin/zookeeper-server-status.sh              |  24 -
 .../alert-devtools/bin/zookeeper-server-stop.sh |  24 -
 .../alert-devtools/conf/cli-log4j.properties    |  21 -
 .../alert-devtools/conf/kafka-server.properties | 115 ----
 .../alert/alert-devtools/conf/log4j.properties  |  21 -
 .../conf/zookeeper-server.properties            |  20 -
 .../eagle-alert/alert/alert-devtools/pom.xml    | 107 ----
 .../eagle/alert/tools/KafkaConsumerOffset.java  |  27 -
 .../alert/tools/KafkaConsumerOffsetFetcher.java |  66 --
 .../alert/tools/KafkaLatestOffsetFetcher.java   |  97 ---
 .../eagle/contrib/kafka/ProducerTool.scala      | 230 -------
 .../eagle/alert/tools/TestKafkaOffset.java      |  69 --
 .../kafka-offset-test.application.conf          |  25 -
 .../src/test/resources/log4j.properties         |  21 -
 .../eagle-alert/alert/alert-engine/.gitignore   |   1 -
 .../alert-engine/alert-engine-base/pom.xml      |  76 ---
 .../alert/engine/AlertStreamCollector.java      |  27 -
 .../apache/eagle/alert/engine/Collector.java    |  27 -
 .../alert/engine/PartitionedEventCollector.java |  29 -
 .../eagle/alert/engine/StreamContext.java       |  27 -
 .../eagle/alert/engine/StreamContextImpl.java   |  44 --
 .../eagle/alert/engine/UnitTopologyMain.java    |  59 --
 .../IMetadataChangeNotifyService.java           |  57 --
 .../alert/engine/coordinator/MetadataType.java  |  30 -
 .../StreamDefinitionNotFoundException.java      |  25 -
 .../AbstractMetadataChangeNotifyService.java    | 113 ----
 .../impl/ZKMetadataChangeNotifyService.java     | 200 ------
 .../engine/evaluator/PolicyChangeListener.java  |  29 -
 .../engine/evaluator/PolicyGroupEvaluator.java  |  45 --
 .../engine/evaluator/PolicyHandlerContext.java  |  60 --
 .../engine/evaluator/PolicyStreamHandler.java   |  27 -
 .../engine/evaluator/PolicyStreamHandlers.java  |  33 -
 ...ertBoltOutputCollectorThreadSafeWrapper.java | 118 ----
 .../impl/AlertBoltOutputCollectorWrapper.java   |  55 --
 .../impl/PolicyGroupEvaluatorImpl.java          | 172 -----
 .../evaluator/impl/SiddhiDefinitionAdapter.java | 142 -----
 .../evaluator/impl/SiddhiPolicyHandler.java     | 148 -----
 .../engine/publisher/AlertDeduplicator.java     |  31 -
 .../engine/publisher/AlertPublishListener.java  |  28 -
 .../engine/publisher/AlertPublishPlugin.java    |  50 --
 .../publisher/AlertPublishSpecListener.java     |  26 -
 .../alert/engine/publisher/AlertPublisher.java  |  31 -
 .../eagle/alert/engine/publisher/AlertSink.java |  33 -
 .../engine/publisher/PublishConstants.java      |  48 --
 .../publisher/email/AlertEmailConstants.java    |  39 --
 .../publisher/email/AlertEmailContext.java      |  71 ---
 .../publisher/email/AlertEmailGenerator.java    | 143 -----
 .../email/AlertEmailGeneratorBuilder.java       |  59 --
 .../publisher/email/AlertEmailSender.java       | 164 -----
 .../engine/publisher/email/EagleMailClient.java | 240 -------
 .../impl/AlertEagleStorePersister.java          |  60 --
 .../impl/AlertEagleStorePublisher.java          | 113 ----
 .../publisher/impl/AlertEmailPublisher.java     | 151 -----
 .../publisher/impl/AlertKafkaPublisher.java     | 136 ----
 .../impl/AlertPublishPluginsFactory.java        |  48 --
 .../publisher/impl/AlertPublisherImpl.java      | 154 -----
 .../publisher/impl/DefaultDeduplicator.java     | 113 ----
 .../alert/engine/publisher/impl/EventUniq.java  |  57 --
 .../publisher/impl/KafkaProducerManager.java    |  42 --
 .../engine/publisher/impl/PublishStatus.java    |  27 -
 .../engine/router/AlertBoltSpecListener.java    |  32 -
 .../alert/engine/router/SpoutSpecListener.java  |  32 -
 .../eagle/alert/engine/router/StreamRoute.java  |  85 ---
 .../router/StreamRoutePartitionFactory.java     |  37 --
 .../engine/router/StreamRoutePartitioner.java   |  29 -
 .../engine/router/StreamRouteSpecListener.java  |  30 -
 .../eagle/alert/engine/router/StreamRouter.java |  30 -
 .../router/StreamRouterBoltSpecListener.java    |  33 -
 .../alert/engine/router/StreamSortHandler.java  |  42 --
 .../engine/router/StreamSortSpecListener.java   |  28 -
 .../impl/BasicStreamRoutePartitioner.java       |  77 ---
 .../router/impl/RoutePhysicalGrouping.java      |  76 ---
 .../engine/router/impl/ShuffleGrouping.java     |  74 ---
 .../impl/StreamRouterBoltOutputCollector.java   | 229 -------
 .../engine/router/impl/StreamRouterImpl.java    | 163 -----
 .../alert/engine/runner/AbstractStreamBolt.java |  93 ---
 .../eagle/alert/engine/runner/AlertBolt.java    | 157 -----
 .../alert/engine/runner/AlertPublisherBolt.java | 113 ----
 .../alert/engine/runner/MapComparator.java      |  72 ---
 .../engine/runner/StormMetricConsumer.java      | 136 ----
 .../runner/StormMetricTaggedConsumer.java       | 156 -----
 .../alert/engine/runner/StreamRouterBolt.java   | 201 ------
 .../alert/engine/runner/UnitTopologyRunner.java | 215 -------
 .../eagle/alert/engine/scheme/JsonScheme.java   |  71 ---
 .../scheme/JsonStringStreamNameSelector.java    |  74 ---
 .../alert/engine/scheme/PlainStringScheme.java  |  67 --
 .../scheme/PlainStringStreamNameSelector.java   |  49 --
 .../PartitionedEventDigestSerializer.java       |  62 --
 .../PartitionedEventSerializer.java             |  39 --
 .../SerializationMetadataProvider.java          |  30 -
 .../alert/engine/serialization/Serializer.java  |  26 -
 .../alert/engine/serialization/Serializers.java |  56 --
 .../serialization/impl/BooleanSerializer.java   |  35 -
 .../serialization/impl/DoubleSerializer.java    |  35 -
 .../serialization/impl/FloatSerializer.java     |  35 -
 .../serialization/impl/IntegerSerializer.java   |  35 -
 .../impl/JavaObjectSerializer.java              |  42 --
 .../serialization/impl/LongSerializer.java      |  35 -
 .../impl/PartitionedEventSerializerImpl.java    |  98 ---
 .../impl/StreamEventSerializer.java             | 104 ---
 .../impl/StreamPartitionDigestSerializer.java   | 100 ---
 .../impl/StreamPartitionSerializer.java         |  81 ---
 .../serialization/impl/StringSerializer.java    |  35 -
 .../extension/AttributeCollectAggregator.java   | 122 ----
 .../alert/engine/sorter/BaseStreamWindow.java   | 183 ------
 .../alert/engine/sorter/StreamTimeClock.java    |  45 --
 .../engine/sorter/StreamTimeClockListener.java  |  27 -
 .../engine/sorter/StreamTimeClockManager.java   |  45 --
 .../engine/sorter/StreamTimeClockTrigger.java   |  61 --
 .../eagle/alert/engine/sorter/StreamWindow.java | 113 ----
 .../engine/sorter/StreamWindowManager.java      |  64 --
 .../engine/sorter/StreamWindowRepository.java   | 257 --------
 .../sorter/impl/CachedEventGroupSerializer.java | 114 ----
 .../impl/PartitionedEventGroupSerializer.java   | 112 ----
 .../PartitionedEventTimeOrderingComparator.java |  50 --
 .../impl/StreamSortWindowHandlerImpl.java       | 113 ----
 .../sorter/impl/StreamSortedWindowInMapDB.java  | 145 -----
 .../sorter/impl/StreamSortedWindowOnHeap.java   |  80 ---
 .../impl/StreamTimeClockInLocalMemory.java      |  64 --
 .../sorter/impl/StreamTimeClockManagerImpl.java | 171 -----
 .../sorter/impl/StreamWindowManagerImpl.java    | 173 -----
 .../alert/engine/spout/CorrelationSpout.java    | 380 -----------
 .../alert/engine/spout/CreateTopicUtils.java    |  43 --
 .../eagle/alert/engine/spout/ISpoutSpecLCM.java |  41 --
 .../engine/spout/KafkaMessageIdWrapper.java     |  42 --
 .../eagle/alert/engine/spout/SchemeBuilder.java |  35 -
 .../spout/SpoutOutputCollectorWrapper.java      | 220 -------
 .../alert/engine/utils/CompressionUtils.java    |  62 --
 .../alert/engine/utils/MetadataSerDeser.java    |  93 ---
 .../alert/engine/utils/SerializableUtils.java   | 128 ----
 .../main/java/storm/kafka/KafkaSpoutMetric.java |  94 ---
 .../java/storm/kafka/KafkaSpoutWrapper.java     | 111 ----
 .../src/main/resources/ALERT_DEFAULT.vm         | 267 --------
 .../src/main/resources/application.conf         |  72 ---
 .../src/main/resources/eagle.siddhiext          |  19 -
 .../src/main/resources/log4j.properties         |  26 -
 .../alert/engine/e2e/CoordinatorClient.java     |  95 ---
 .../eagle/alert/engine/e2e/Integration1.java    | 236 -------
 .../eagle/alert/engine/e2e/Integration2.java    | 142 -----
 .../eagle/alert/engine/e2e/SampleClient1.java   | 127 ----
 .../eagle/alert/engine/e2e/SampleClient2.java   | 139 ----
 ...oltOutputCollectorThreadSafeWrapperTest.java |  90 ---
 .../SiddhiCEPPolicyEventHandlerTest.java        | 161 -----
 .../integration/MockMetadataServiceClient.java  | 124 ----
 .../engine/metric/MemoryUsageGaugeSetTest.java  |  47 --
 .../engine/mock/MockPartitionedCollector.java   |  55 --
 .../engine/mock/MockSampleMetadataFactory.java  | 266 --------
 .../alert/engine/mock/MockStreamCollector.java  |  51 --
 .../engine/mock/MockStreamMetadataService.java  |  39 --
 .../alert/engine/mock/MockStreamReceiver.java   |  79 ---
 .../alert/engine/perf/TestSerDeserPer.java      | 317 ---------
 .../alert/engine/router/TestAlertBolt.java      | 177 ------
 .../engine/router/TestAlertPublisherBolt.java   | 111 ----
 .../engine/runner/TestStreamRouterBolt.java     | 259 --------
 .../serialization/JavaSerializationTest.java    | 112 ----
 .../PartitionedEventSerializerTest.java         | 220 -------
 .../AttributeCollectAggregatorTest.java         | 149 -----
 .../alert/engine/sorter/MapDBTestSuite.java     |  45 --
 .../engine/sorter/StreamSortHandlerTest.java    | 270 --------
 .../sorter/StreamWindowBenchmarkTest.java       | 145 -----
 .../engine/sorter/StreamWindowTestSuite.java    | 164 -----
 .../sorter/TreeMultisetComparatorTest.java      | 110 ----
 .../engine/topology/AlertTopologyTest.java      | 138 ----
 .../CoordinatorSpoutIntegrationTest.java        | 101 ---
 .../engine/topology/CorrelationSpoutTest.java   | 184 ------
 .../engine/topology/FastWordCountTopology.java  | 215 -------
 .../MockMetadataChangeNotifyService.java        | 111 ----
 .../engine/topology/SendData2KafkaTest.java     | 103 ---
 .../eagle/alert/engine/topology/TestBolt.java   |  61 --
 .../alert/engine/topology/TestByteBuffer.java   |  53 --
 .../topology/TestMetadataSpecSerDeser.java      | 266 --------
 .../TestStormCustomGroupingRouting.java         | 144 -----
 .../engine/topology/TestStormParallelism.java   | 161 -----
 .../topology/TestStormStreamIdRouting.java      | 140 ----
 .../topology/TestTuple2StreamConverter.java     |  62 --
 .../engine/topology/TestUnitTopologyMain.java   |  57 --
 .../engine/utils/CompressionUtilsTest.java      |  43 --
 .../alert/engine/utils/TimePeriodUtilsTest.java |  91 ---
 .../test/resources/application-integration.conf |  57 --
 .../test/resources/application-test-backup.conf |  71 ---
 .../src/test/resources/application-test.conf    |  68 --
 .../correlation/application-integration-2.conf  |  57 --
 .../test/resources/correlation/datasources.json |  37 --
 .../test/resources/correlation/policies.json    |  39 --
 .../resources/correlation/publishments.json     |  17 -
 .../correlation/streamdefinitions.json          |  93 ---
 .../test/resources/correlation/topologies.json  |  31 -
 .../src/test/resources/datasources.json         |  19 -
 .../src/test/resources/log4j.properties         |  23 -
 .../src/test/resources/policies.json            |  54 --
 .../src/test/resources/publishments.json        |  29 -
 .../src/test/resources/publishments2.json       |  19 -
 .../src/test/resources/sample_perfmon_data.json |   3 -
 .../src/test/resources/streamdefinitions.json   |  44 --
 .../src/test/resources/testAlertBoltSpec.json   |  92 ---
 .../src/test/resources/testPublishSpec.json     |  32 -
 .../src/test/resources/testPublishSpec2.json    |  32 -
 .../src/test/resources/testSpoutSpec.json       | 139 ----
 .../resources/testStreamDefinitionsSpec.json    |  47 --
 .../resources/testStreamRouterBoltSpec.json     | 123 ----
 .../src/test/resources/topic.json               |   1 -
 .../src/test/resources/topologies.json          |  31 -
 .../eagle-alert/alert/alert-engine/pom.xml      | 110 ----
 .../alert-metadata-service/.gitignore           |   2 -
 .../alert-metadata-service/pom.xml              | 113 ----
 .../metadata/resource/MetadataResource.java     | 225 -------
 .../topology/resource/TopologyMgmtResource.java |  69 --
 .../impl/TopologyMgmtResourceHelper.java        |  48 --
 .../resource/impl/TopologyMgmtResourceImpl.java | 158 -----
 .../topology/resource/impl/TopologyStatus.java  |  82 ---
 .../src/main/resources/application.conf         |  21 -
 .../src/main/webapp/WEB-INF/web.xml             |  81 ---
 .../src/main/webapp/index.html                  |  18 -
 .../impl/TopologyMgmtResourceImplTest.java      |  55 --
 .../alert-metadata/.gitignore                   |   2 -
 .../alert-metadata/pom.xml                      |  52 --
 .../metadata/impl/InMemMetadataDaoImpl.java     | 333 ----------
 .../alert/metadata/impl/MetadataDaoFactory.java |  70 --
 .../metadata/impl/MongoMetadataDaoImpl.java     | 380 -----------
 .../metadata/impl/jdbc/JdbcMetadataDaoImpl.java | 292 ---------
 .../alert/metadata/resource/IMetadataDao.java   |  86 ---
 .../eagle/alert/metadata/resource/Models.java   |  48 --
 .../eagle/alert/metadata/resource/OpResult.java |  28 -
 .../src/main/resources/application.conf         |  23 -
 .../alert/resource/impl/InMemoryTest.java       |  43 --
 .../alert/resource/impl/MongoImplTest.java      | 187 ------
 .../src/test/resources/application-mongo.conf   |  21 -
 .../src/test/resources/policy-sample.json       |  32 -
 .../alert/alert-metadata-parent/pom.xml         |  29 -
 eagle-core/eagle-alert/alert/pom.xml            | 387 -----------
 eagle-core/eagle-alert/eagle-alert-base/pom.xml |  52 --
 .../eagle/alert/common/AlertEmailSender.java    | 160 -----
 .../eagle/alert/email/AlertEmailComponent.java  |  33 -
 .../eagle/alert/email/AlertEmailContext.java    |  70 --
 .../eagle-alert-notification-plugin/pom.xml     |  84 ---
 .../base/NotificationConstants.java             |  35 -
 .../notification/base/NotificationStatus.java   |  26 -
 .../notification/dao/AlertNotificationDAO.java  |  36 --
 .../dao/AlertNotificationDAOImpl.java           |  70 --
 .../notification/email/AlertEmailComponent.java |  32 -
 .../notification/email/AlertEmailContext.java   |  69 --
 .../notification/email/AlertEmailGenerator.java | 138 ----
 .../email/AlertEmailGeneratorBuilder.java       |  59 --
 .../notification/email/AlertEmailSender.java    | 191 ------
 .../plugin/AlertEagleStorePersister.java        |  85 ---
 .../plugin/AlertEagleStorePlugin.java           | 101 ---
 .../notification/plugin/AlertEmailPlugin.java   | 149 -----
 .../notification/plugin/AlertKafkaPlugin.java   | 140 ----
 .../plugin/KafkaProducerSingleton.java          |  47 --
 .../notification/plugin/NotificationPlugin.java |  59 --
 .../plugin/NotificationPluginLoader.java        |  92 ---
 .../plugin/NotificationPluginManager.java       |  39 --
 .../plugin/NotificationPluginManagerImpl.java   | 151 -----
 .../utils/NotificationPluginUtils.java          |  67 --
 .../src/main/resources/ALERT_DEFAULT.vm         | 266 --------
 .../src/main/resources/application.conf         |  69 --
 .../main/resources/notification-plugins-init.sh |  66 --
 .../testcases/TestAlertEagleStorePlugin.java    |  50 --
 .../testcases/TestAlertEmailPlugin.java         |  56 --
 .../testcases/TestAlertKafkaPlugin.java         |  57 --
 .../testcases/TestGetAllNotifications.java      |  41 --
 .../testcases/TestNotificationPluginLoader.java |  41 --
 .../TestNotificationPluginManager.java          |  93 ---
 .../testcases/TestNotificationPluginUtils.java  |  38 --
 .../src/test/resources/application.conf         |  69 --
 .../src/test/resources/log4j.properties         |  35 -
 .../eagle-alert/eagle-alert-process/pom.xml     | 139 ----
 .../eagle/alert/config/DeduplicatorConfig.java  |  42 --
 .../alert/config/EmailNotificationConfig.java   |  50 --
 .../eagle/alert/config/NotificationConfig.java  |  45 --
 .../apache/eagle/alert/config/Remediation.java  |  32 -
 .../dedup/AlertDeduplicationExecutorBase.java   | 188 ------
 .../dedup/AlertEmailDeduplicationExecutor.java  |  30 -
 .../dedup/AlertEntityDeduplicationExecutor.java |  31 -
 .../eagle/alert/dedup/DefaultDeduplicator.java  | 130 ----
 .../eagle/alert/dedup/EntityDedupKey.java       |  62 --
 .../eagle/alert/dedup/EntityDeduplicator.java   |  35 -
 .../eagle/alert/dedup/EntityTagsUniq.java       |  81 ---
 .../eagle/alert/executor/AlertExecutor.java     |  41 --
 .../executor/AlertExecutorCreationUtils.java    | 111 ----
 .../alert/notification/AlertEmailGenerator.java | 136 ----
 .../notification/AlertNotificationExecutor.java | 128 ----
 .../alert/persist/AlertPersistExecutor.java     |  56 --
 .../eagle/alert/persist/EaglePersist.java       |  71 ---
 .../siddhi/SiddhiAlertAPIEntityRender.java      | 109 ----
 ....eagle.policy.PolicyEvaluatorServiceProvider |  16 -
 .../src/main/resources/table-create.script      |  24 -
 .../src/test/java/META-INF/MANIFEST.MF          |  19 -
 .../eagle/alert/cep/TestSiddhiEvaluator.java    | 135 ----
 .../eagle/alert/config/TestAlertDedup.java      |  38 --
 .../alert/dao/TestAlertDefinitionDAOImpl.java   |  81 ---
 .../dao/TestSiddhiStreamMetadataUtils.java      |  60 --
 .../alert/dao/TestStreamDefinitionDAOImpl.java  |  67 --
 .../alert/executor/TestPolicyExecutor.java      |  85 ---
 .../alert/policy/TestDynamicPolicyLoader.java   | 114 ----
 .../alert/policy/TestPolicyDistribution.java    |  30 -
 .../policy/TestPolicyDistributionUpdater.java   |  99 ---
 .../alert/policy/TestPolicyPartitioner.java     |  30 -
 .../alert/siddhi/TestExternalBatchWindow.java   | 307 ---------
 .../eagle/alert/siddhi/TestSiddhiEngine.java    | 243 -------
 .../alert/siddhi/TestSiddhiSlideWindow.java     | 129 ----
 .../eagle/alert/siddhi/TestSiddhiStream.java    |  34 -
 .../eagle/alert/state/TestAggregation.java      |  98 ---
 .../alert/state/TestSiddhiExpiredEvents.java    | 129 ----
 .../TestSiddhiStateSnapshotAndRestore.java      | 506 ---------------
 .../src/test/resources/application.conf         |  33 -
 .../src/test/resources/log4j.properties         |  34 -
 .../src/test/resources/str.siddhiext            |  39 --
 .../src/test/resources/unittest.conf            |  65 --
 .../eagle-alert/eagle-alert-service/pom.xml     |  60 --
 .../alert/AlertPolicyValidateProvider.java      |  36 --
 .../service/alert/PolicyValidateResource.java   |  64 --
 .../SiddhiAlertPolicyValidateProvider.java      | 133 ----
 .../service/alert/SiteApplicationObject.java    |  62 --
 .../service/alert/SiteApplicationResource.java  | 189 ------
 .../alert/resolver/AttributeResolvable.java     |  44 --
 .../resolver/AttributeResolveException.java     |  26 -
 .../resolver/AttributeResolveResource.java      |  81 ---
 .../resolver/AttributeResolveResponse.java      |  40 --
 .../resolver/AttributeResolverFactory.java      |  50 --
 .../BadAttributeResolveRequestException.java    |  31 -
 .../GenericAttributeResolveRequest.java         |  54 --
 .../resolver/impl/BooleanAttributeResolver.java |  43 --
 .../resolver/impl/EntityAttributeResolver.java  | 142 -----
 ...le.service.alert.AlertPolicyValidateProvider |  16 -
 .../src/main/resources/core-site.xml            |  24 -
 ...le.service.alert.AlertPolicyValidateProvider |  16 -
 .../src/test/resources/log4j.properties         |  35 -
 eagle-core/eagle-alert/pom.xml                  |  38 --
 .../eagle-stream-process-api/pom.xml            |   6 +
 .../eagle/datastream/TestStormRunner.scala      |  14 +-
 eagle-core/pom.xml                              |   2 +-
 eagle-external/eagle-kafka/pom.xml              |   1 -
 .../eagle/contrib/kafka/ProducerTool.scala      |   8 +-
 eagle-external/eagle-log4jkafka/pom.xml         |   1 -
 .../model/UserActivityAggModelEntity.java       |   7 +-
 .../model/JavaUserProfileModeler.java           |   2 +-
 .../userprofile/UserProfileTrainingCLI.scala    |   2 +-
 pom.xml                                         |  33 +-
 935 files changed, 40301 insertions(+), 40320 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/737e5a2d/eagle-core/eagle-alert-parent/eagle-alert-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert-parent/eagle-alert-base/pom.xml b/eagle-core/eagle-alert-parent/eagle-alert-base/pom.xml
new file mode 100644
index 0000000..b1d10fd
--- /dev/null
+++ b/eagle-core/eagle-alert-parent/eagle-alert-base/pom.xml
@@ -0,0 +1,52 @@
+<?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.
+  -->
+
+<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-alert-parent</artifactId>
+		<version>0.4.0-incubating-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+	</parent>
+
+	<artifactId>eagle-alert-base</artifactId>
+	<packaging>jar</packaging>
+	<name>eagle-alert-base</name>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.eagle</groupId>
+			<artifactId>eagle-entity-base</artifactId>
+            <version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.eagle</groupId>
+			<artifactId>eagle-client-base</artifactId>
+            <version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.eagle</groupId>
+			<artifactId>eagle-policy-base</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+	</dependencies>
+</project>
+

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/737e5a2d/eagle-core/eagle-alert-parent/eagle-alert-base/src/main/java/org/apache/eagle/alert/common/AlertEmailSender.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert-parent/eagle-alert-base/src/main/java/org/apache/eagle/alert/common/AlertEmailSender.java b/eagle-core/eagle-alert-parent/eagle-alert-base/src/main/java/org/apache/eagle/alert/common/AlertEmailSender.java
new file mode 100644
index 0000000..9761031
--- /dev/null
+++ b/eagle-core/eagle-alert-parent/eagle-alert-base/src/main/java/org/apache/eagle/alert/common/AlertEmailSender.java
@@ -0,0 +1,160 @@
+/*
+ * 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.common;
+
+import java.lang.management.ManagementFactory;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.eagle.alert.email.AlertEmailContext;
+import org.apache.eagle.policy.common.Constants;
+import org.apache.velocity.VelocityContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.eagle.alert.email.AlertEmailComponent;
+import org.apache.eagle.common.DateTimeUtil;
+import org.apache.eagle.common.email.EagleMailClient;
+import com.netflix.config.ConcurrentMapConfiguration;
+import com.typesafe.config.ConfigObject;
+
+@Deprecated
+public class AlertEmailSender implements Runnable {
+	
+	protected final List<Map<String, String>> alertContexts = new ArrayList<Map<String, String>>();
+	protected final String configFileName;
+	protected final String subject;
+	protected final String sender;
+	protected final String recipents;
+	protected final String cc;
+	protected final String origin;
+	protected boolean sentSuccessfully = false;
+
+	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_PORT = "mail.smtp.port";
+	private static final String MAIL_DEBUG = "mail.debug";
+	
+	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_DEBUG = "mailDebug";
+
+	private ConfigObject eagleProps;
+
+
+    private String threadName;
+	/**
+	 * Derived class may have some additional context properties to add
+	 * @param context velocity context
+	 * @param env environment
+	 */
+	protected void additionalContext(VelocityContext context, String env) {
+		// By default there's no additional context added
+	}
+
+	public AlertEmailSender(AlertEmailContext alertEmail){
+		this.recipents = alertEmail.getRecipients();
+		this.configFileName = alertEmail.getVelocityTplFile();
+		this.subject = alertEmail.getSubject();
+		this.sender = alertEmail.getSender();
+		this.cc = alertEmail.getCc();
+		for(AlertEmailComponent bean : alertEmail.getComponents()){
+			this.alertContexts.add(bean.getAlertContext().getProperties());
+		}
+		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);
+	}
+
+	public AlertEmailSender(AlertEmailContext alertEmail, ConfigObject eagleProps){
+		this(alertEmail);
+		this.eagleProps = eagleProps;
+	}
+
+	@Override
+	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);
+			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());
+					}
+					client = new EagleMailClient(con);
+				}
+				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);
+				LOG.info("After calling generateCommonContext...");
+				additionalContext(context, env);
+				
+				if (recipents == null || recipents.equals("")) {
+					LOG.error("Recipients is null, skip sending emails ");
+					return;
+				}
+				String title = subject;
+				if (!env.trim().equals("prod")) {
+					title = "[" + env + "]" + title; 				
+				}
+				success = client.send(sender, recipents, cc, title, configFileName, context, null);
+				LOG.info("Success of sending email: " + success);
+				if(!success && count < MAX_RETRY_COUNT) {
+					LOG.info("Sleep for a while before retrying");
+					Thread.sleep(10*1000);
+				}
+			}
+			catch (Exception e){
+				LOG.warn("Sending mail exception", e);
+			}
+		}
+
+		if(success){
+			sentSuccessfully = true;
+            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));
+		}
+	}
+	
+	private void generateCommonContext(VelocityContext context) {
+		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(){
+		return this.sentSuccessfully;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/737e5a2d/eagle-core/eagle-alert-parent/eagle-alert-base/src/main/java/org/apache/eagle/alert/email/AlertEmailComponent.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert-parent/eagle-alert-base/src/main/java/org/apache/eagle/alert/email/AlertEmailComponent.java b/eagle-core/eagle-alert-parent/eagle-alert-base/src/main/java/org/apache/eagle/alert/email/AlertEmailComponent.java
new file mode 100644
index 0000000..da1078a
--- /dev/null
+++ b/eagle-core/eagle-alert-parent/eagle-alert-base/src/main/java/org/apache/eagle/alert/email/AlertEmailComponent.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.alert.email;
+
+import org.apache.eagle.common.metric.AlertContext;
+
+/**
+ * Alert email component is one part of an email, which could be an individual alert
+ */
+@Deprecated
+public class AlertEmailComponent {
+	private AlertContext alertContext;
+	public AlertContext getAlertContext() {
+		return alertContext;
+	}
+	public void setAlertContext(AlertContext alertContext) {
+		this.alertContext = alertContext;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/737e5a2d/eagle-core/eagle-alert-parent/eagle-alert-base/src/main/java/org/apache/eagle/alert/email/AlertEmailContext.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert-parent/eagle-alert-base/src/main/java/org/apache/eagle/alert/email/AlertEmailContext.java b/eagle-core/eagle-alert-parent/eagle-alert-base/src/main/java/org/apache/eagle/alert/email/AlertEmailContext.java
new file mode 100644
index 0000000..b2fd929
--- /dev/null
+++ b/eagle-core/eagle-alert-parent/eagle-alert-base/src/main/java/org/apache/eagle/alert/email/AlertEmailContext.java
@@ -0,0 +1,70 @@
+/*
+ * 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.email;
+
+import java.util.List;
+
+/**
+ * alert email bean
+ * one email consists of a list of email component
+ */
+@Deprecated
+public class AlertEmailContext {
+	private List<AlertEmailComponent> components;
+	private String sender;
+	private String subject;
+	private String recipients;
+	private String velocityTplFile;
+	private String cc;
+	
+	public List<AlertEmailComponent> getComponents() {
+		return components;
+	}
+	public void setComponents(List<AlertEmailComponent> components) {
+		this.components = components;
+	}
+	public String getVelocityTplFile() {
+		return velocityTplFile;
+	}
+	public void setVelocityTplFile(String velocityTplFile) {
+		this.velocityTplFile = velocityTplFile;
+	}
+	public String getRecipients() {
+		return recipients;
+	}
+	public void setRecipients(String recipients) {
+		this.recipients = recipients;
+	}
+	public String getSender() {
+		return sender;
+	}
+	public void setSender(String sender) {
+		this.sender = sender;
+	}
+	public String getSubject() {
+		return subject;
+	}
+	public void setSubject(String subject) {
+		this.subject = subject;
+	}
+	public String getCc() {
+		return cc;
+	}
+	public void setCc(String cc) {
+		this.cc = cc;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/737e5a2d/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/pom.xml b/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/pom.xml
new file mode 100644
index 0000000..df49817
--- /dev/null
+++ b/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/pom.xml
@@ -0,0 +1,84 @@
+<!--
+/*
+ * 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">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.eagle</groupId>
+    <artifactId>eagle-alert-parent</artifactId>
+    <version>0.4.0-incubating-SNAPSHOT</version>
+  </parent>
+  <artifactId>eagle-alert-notification-plugin</artifactId>
+  <name>eagle-alert-notification-plugin</name>
+  <description>Apache Eagle Notification Plugin to  enable services to use custom or default notification </description>
+  <dependencies>
+  	<dependency>
+          <groupId>org.apache.eagle</groupId>
+          <artifactId>eagle-policy-base</artifactId>
+          <version>${project.version}</version>
+          <exclusions>
+              <exclusion>
+                  <groupId>org.slf4j</groupId>
+                  <artifactId>log4j-over-slf4j</artifactId>
+              </exclusion>
+              <exclusion>
+                  <groupId>org.slf4j</groupId>
+                  <artifactId>slf4j-simple</artifactId>
+              </exclusion>
+          </exclusions>
+      </dependency>
+  	<dependency>
+	    <groupId>org.apache.kafka</groupId>
+	    <artifactId>kafka-clients</artifactId>
+	</dependency>
+      <dependency>
+          <groupId>com.fasterxml.jackson.core</groupId>
+          <artifactId>jackson-core</artifactId>
+      </dependency>
+      <dependency>
+          <groupId>com.fasterxml.jackson.core</groupId>
+          <artifactId>jackson-annotations</artifactId>
+      </dependency>
+      <dependency>
+          <groupId>com.fasterxml.jackson.core</groupId>
+          <artifactId>jackson-databind</artifactId>
+      </dependency>
+      <!--<dependency>-->
+          <!--<groupId>com.fasterxml.jackson.module</groupId>-->
+          <!--<artifactId>jackson-module-scala_${scala.version}</artifactId>-->
+      <!--</dependency>-->
+      <dependency>
+          <groupId>org.codehaus.jackson</groupId>
+          <artifactId>jackson-mapper-asl</artifactId>
+      </dependency>
+      <dependency>
+          <groupId>org.codehaus.jackson</groupId>
+          <artifactId>jackson-core-asl</artifactId>
+      </dependency>
+      <dependency>
+          <groupId>org.reflections</groupId>
+          <artifactId>reflections</artifactId>
+          <exclusions>
+              <exclusion>
+                  <groupId>org.slf4j</groupId>
+                  <artifactId>slf4j-simple</artifactId>
+              </exclusion>
+          </exclusions>
+      </dependency>
+  </dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/737e5a2d/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/base/NotificationConstants.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/base/NotificationConstants.java b/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/base/NotificationConstants.java
new file mode 100644
index 0000000..1e49ac8
--- /dev/null
+++ b/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/base/NotificationConstants.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.notification.base;
+
+public class NotificationConstants {
+    public static final String NOTIFICATION_TYPE = "notificationType";
+    public static final String EMAIL_NOTIFICATION = "email";
+    public static final String KAFKA_STORE = "kafka";
+    public static final String EAGLE_STORE = "eagleStore";
+
+    // email specific constants
+    public static final String SUBJECT = "subject";
+    public static final String SENDER = "sender";
+    public static final String RECIPIENTS = "recipients";
+    public static final String TPL_FILE_NAME = "tplFileName";
+
+    // kafka specific constants
+    public static final String TOPIC = "topic";
+    public static final String BROKER_LIST = "kafka_broker";
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/737e5a2d/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/base/NotificationStatus.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/base/NotificationStatus.java b/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/base/NotificationStatus.java
new file mode 100644
index 0000000..d57dbf9
--- /dev/null
+++ b/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/base/NotificationStatus.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.notification.base;
+
+/**
+ * Object that holds the status of Notification Posted to Notification Plugin  
+ */
+public class NotificationStatus {
+	public boolean successful;
+	public String errorMessage;
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/737e5a2d/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/dao/AlertNotificationDAO.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/dao/AlertNotificationDAO.java b/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/dao/AlertNotificationDAO.java
new file mode 100644
index 0000000..bf2e75e
--- /dev/null
+++ b/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/dao/AlertNotificationDAO.java
@@ -0,0 +1,36 @@
+/*
+ * 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.notification.dao;
+
+
+
+import org.apache.eagle.alert.entity.AlertNotificationEntity;
+
+import java.util.List;
+
+/**
+ * Alert Notification Data Access Obj Interface
+ */
+public interface AlertNotificationDAO {
+    /**
+     * find the Alert Notification Types by querying alertNotifications Table
+     * @return
+     * @throws Exception
+     */
+    List<AlertNotificationEntity> findAlertNotificationTypes() throws Exception;
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/737e5a2d/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/dao/AlertNotificationDAOImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/dao/AlertNotificationDAOImpl.java b/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/dao/AlertNotificationDAOImpl.java
new file mode 100644
index 0000000..7251da3
--- /dev/null
+++ b/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/dao/AlertNotificationDAOImpl.java
@@ -0,0 +1,70 @@
+/*
+ * 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.notification.dao;
+
+import org.apache.commons.lang.time.DateUtils;
+import org.apache.eagle.alert.entity.AlertNotificationEntity;
+import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
+import org.apache.eagle.policy.common.Constants;
+import org.apache.eagle.service.client.EagleServiceConnector;
+import org.apache.eagle.service.client.IEagleServiceClient;
+import org.apache.eagle.service.client.impl.EagleServiceClientImpl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+
+/**
+ * Notification Service API implementation which Provides Read/Write API's of Hbase AlertNotifications Table
+ */
+public class AlertNotificationDAOImpl implements  AlertNotificationDAO {
+
+    private final Logger LOG = LoggerFactory.getLogger(AlertNotificationDAOImpl.class);
+    private final EagleServiceConnector connector;
+
+    public AlertNotificationDAOImpl(EagleServiceConnector connector){
+        this.connector = connector;
+    }
+
+    /**
+     * Find the Alerts by NotificationType
+     * @return
+     * @throws Exception
+     */
+    @Override
+    public List<AlertNotificationEntity> findAlertNotificationTypes() throws Exception {
+        try{
+            IEagleServiceClient client = new EagleServiceClientImpl(connector);
+            String query = Constants.ALERT_NOTIFICATION_SERVICE_ENDPOINT_NAME+"[@enabled=\"true\"]{*}";
+            GenericServiceAPIResponseEntity response = client.search(query).startTime(0)
+                    .endTime(10 * DateUtils.MILLIS_PER_DAY)
+                    .pageSize(Integer.MAX_VALUE)
+                    .query(query)
+                    .send();
+            client.close();
+            if (response.getException() != null) {
+                throw new Exception("Got an exception when query eagle service: " + response.getException());
+            }
+            return response.getObj();
+        }
+        catch (Exception ex) {
+            LOG.error("Got an exception when query alert notification service ", ex);
+            throw new IllegalStateException(ex);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/737e5a2d/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailComponent.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailComponent.java b/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailComponent.java
new file mode 100644
index 0000000..3fe55bf
--- /dev/null
+++ b/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailComponent.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.notification.email;
+
+import org.apache.eagle.common.metric.AlertContext;
+
+/**
+ * Alert email component is one part of an email, which could be an individual alert
+ */
+public class AlertEmailComponent {
+    private AlertContext alertContext;
+    public AlertContext getAlertContext() {
+        return alertContext;
+    }
+    public void setAlertContext(AlertContext alertContext) {
+        this.alertContext = alertContext;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/737e5a2d/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailContext.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailContext.java b/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailContext.java
new file mode 100644
index 0000000..f1642be
--- /dev/null
+++ b/eagle-core/eagle-alert-parent/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailContext.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.notification.email;
+
+import java.util.List;
+
+/**
+ * alert email bean
+ * one email consists of a list of email component
+ */
+public class AlertEmailContext {
+    private List<AlertEmailComponent> components;
+    private String sender;
+    private String subject;
+    private String recipients;
+    private String velocityTplFile;
+    private String cc;
+
+    public List<AlertEmailComponent> getComponents() {
+        return components;
+    }
+    public void setComponents(List<AlertEmailComponent> components) {
+        this.components = components;
+    }
+    public String getVelocityTplFile() {
+        return velocityTplFile;
+    }
+    public void setVelocityTplFile(String velocityTplFile) {
+        this.velocityTplFile = velocityTplFile;
+    }
+    public String getRecipients() {
+        return recipients;
+    }
+    public void setRecipients(String recipients) {
+        this.recipients = recipients;
+    }
+    public String getSender() {
+        return sender;
+    }
+    public void setSender(String sender) {
+        this.sender = sender;
+    }
+    public String getSubject() {
+        return subject;
+    }
+    public void setSubject(String subject) {
+        this.subject = subject;
+    }
+    public String getCc() {
+        return cc;
+    }
+    public void setCc(String cc) {
+        this.cc = cc;
+    }
+}
\ No newline at end of file



Mime
View raw message