[1/2] incubator-eagle git commit: EAGLE-741: Make publishment settings both policy & stream awareness

2016-11-07 Thread ralphsu
Repository: incubator-eagle
Updated Branches:
  refs/heads/master eaab4a9e0 -> a1c5eca05


EAGLE-741: Make publishment settings both policy & stream awareness

Currently our publishment is defined policy specific, we cannot publish the 
alert into different places for one policy although there are multiple output 
streams for this policy.


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

Branch: refs/heads/master
Commit: ccc5ffb528f8ffd2c750ad57d5bbb3ad5bcbdab8
Parents: ca0fae4
Author: Xiancheng Li 
Authored: Mon Nov 7 13:55:20 2016 +0800
Committer: Xiancheng Li 
Committed: Mon Nov 7 16:31:07 2016 +0800

--
 .../alert/engine/coordinator/Publishment.java   |  13 ++-
 .../publisher/impl/AbstractPublishPlugin.java   |   1 -
 .../publisher/impl/AlertPublisherImpl.java  | 101 +--
 .../engine/router/TestAlertPublisherBolt.java   |   2 +
 .../src/test/resources/testPublishSpec.json |   6 +-
 .../src/test/resources/testPublishSpec2.json|   6 +-
 .../src/test/resources/testPublishSpec3.json|  42 
 7 files changed, 135 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ccc5ffb5/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/Publishment.java
--
diff --git 
a/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/Publishment.java
 
b/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/Publishment.java
index b224a4b..dbb1844 100644
--- 
a/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/Publishment.java
+++ 
b/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/Publishment.java
@@ -32,6 +32,7 @@ public class Publishment {
 private String name;
 private String type;
 private List policyIds;
+private List streamIds;
 private String dedupIntervalMin;
 private List dedupFields;
 private String dedupStateField;
@@ -97,6 +98,14 @@ public class Publishment {
 this.policyIds = policyIds;
 }
 
+public List getStreamIds() {
+return streamIds;
+}
+
+public void setStreamIds(List streamIds) {
+this.streamIds = streamIds;
+}
+
 public String getDedupIntervalMin() {
 return dedupIntervalMin;
 }
@@ -130,7 +139,9 @@ public class Publishment {
 && Objects.equals(dedupFields, p.getDedupFields())
 && Objects.equals(dedupStateField, p.getDedupStateField())
 && Objects.equals(overrideDeduplicator, 
p.getOverrideDeduplicator())
-&& Objects.equals(policyIds, p.getPolicyIds()) && 
properties.equals(p.getProperties()));
+&& Objects.equals(policyIds, p.getPolicyIds())
+&& Objects.equals(streamIds, p.getStreamIds())
+&& properties.equals(p.getProperties()));
 }
 return false;
 }

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ccc5ffb5/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/impl/AbstractPublishPlugin.java
--
diff --git 
a/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/impl/AbstractPublishPlugin.java
 
b/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/impl/AbstractPublishPlugin.java
index f0f048d..f68ae52 100644
--- 
a/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/impl/AbstractPublishPlugin.java
+++ 
b/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/impl/AbstractPublishPlugin.java
@@ -23,7 +23,6 @@ import org.apache.commons.lang3.StringUtils;
 import org.apache.eagle.alert.engine.codec.IEventSerializer;
 import org.apache.eagle.alert.engine.coordinator.OverrideDeduplicatorSpec;
 import org.apache.eagle.alert.engine.coordinator.Publishment;
-import org.apache.eagle.alert.engine.model.AlertPublishEvent;
 import org.apache.eagle.alert.engine.model.AlertStreamEvent;
 import org.apache.eagle.alert.engine.publisher.AlertDeduplicator;
 import 

incubator-eagle git commit: [MINOR] Resolve apache license header missing

2016-11-07 Thread hao
Repository: incubator-eagle
Updated Branches:
  refs/heads/master d4be077b8 -> 9f64be00e


[MINOR] Resolve apache license header missing


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

Branch: refs/heads/master
Commit: 9f64be00e9d0e9156e0a187650a3ef9b4185d5b6
Parents: d4be077
Author: Hao Chen 
Authored: Mon Nov 7 16:32:16 2016 +0800
Committer: Hao Chen 
Committed: Mon Nov 7 16:32:16 2016 +0800

--
 .../eagle/storage/hbase/spi/TestHBaseStorage.java   | 16 
 .../TestHBaseStorageAggregateWithCoprocessor.java   | 16 
 2 files changed, 32 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9f64be00/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorage.java
--
diff --git 
a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorage.java
 
b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorage.java
index 2a497d1..de24b5d 100755
--- 
a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorage.java
+++ 
b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorage.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.eagle.storage.hbase.spi;
 
 import org.apache.eagle.common.DateTimeUtil;

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9f64be00/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorageAggregateWithCoprocessor.java
--
diff --git 
a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorageAggregateWithCoprocessor.java
 
b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorageAggregateWithCoprocessor.java
index 1f27a72..8620a5b 100755
--- 
a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorageAggregateWithCoprocessor.java
+++ 
b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorageAggregateWithCoprocessor.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.eagle.storage.hbase.spi;
 
 import org.apache.eagle.common.DateTimeUtil;