diff --git a/hercules-application/pom.xml b/hercules-application/pom.xml
index 2f5efe27..15722459 100644
--- a/hercules-application/pom.xml
+++ b/hercules-application/pom.xml
@@ -5,7 +5,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-auth/pom.xml b/hercules-auth/pom.xml
index ad2dc7dc..1817819d 100644
--- a/hercules-auth/pom.xml
+++ b/hercules-auth/pom.xml
@@ -3,7 +3,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-cassandra-sink/pom.xml b/hercules-cassandra-sink/pom.xml
index 94c8564b..1e88cedc 100644
--- a/hercules-cassandra-sink/pom.xml
+++ b/hercules-cassandra-sink/pom.xml
@@ -5,7 +5,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-cassandra-util/pom.xml b/hercules-cassandra-util/pom.xml
index dc497bd2..fdc6f878 100644
--- a/hercules-cassandra-util/pom.xml
+++ b/hercules-cassandra-util/pom.xml
@@ -3,7 +3,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-clickhouse-sink/pom.xml b/hercules-clickhouse-sink/pom.xml
index 31186545..01b41018 100644
--- a/hercules-clickhouse-sink/pom.xml
+++ b/hercules-clickhouse-sink/pom.xml
@@ -5,7 +5,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-clickhouse-util/pom.xml b/hercules-clickhouse-util/pom.xml
index a2f36288..10153f92 100644
--- a/hercules-clickhouse-util/pom.xml
+++ b/hercules-clickhouse-util/pom.xml
@@ -5,7 +5,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-client/pom.xml b/hercules-client/pom.xml
index f1dc1987..c197cfc2 100644
--- a/hercules-client/pom.xml
+++ b/hercules-client/pom.xml
@@ -5,7 +5,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-configuration/pom.xml b/hercules-configuration/pom.xml
index 84b338c9..d99b22c3 100644
--- a/hercules-configuration/pom.xml
+++ b/hercules-configuration/pom.xml
@@ -3,7 +3,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-curator/pom.xml b/hercules-curator/pom.xml
index 806ca34a..ef8e2006 100644
--- a/hercules-curator/pom.xml
+++ b/hercules-curator/pom.xml
@@ -5,7 +5,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-elastic-adapter/pom.xml b/hercules-elastic-adapter/pom.xml
index e13bfd0c..2ff93047 100644
--- a/hercules-elastic-adapter/pom.xml
+++ b/hercules-elastic-adapter/pom.xml
@@ -5,7 +5,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-elastic-sink/application.properties b/hercules-elastic-sink/application.properties
index f385917f..61e1aa59 100644
--- a/hercules-elastic-sink/application.properties
+++ b/hercules-elastic-sink/application.properties
@@ -11,7 +11,7 @@ sink.consumer.max.partition.fetch.bytes=52428800
sink.consumer.max.poll.interval.ms=370000
sink.consumer.metric.reporters=ru.kontur.vostok.hercules.kafka.util.metrics.GraphiteReporter
-sink.filter.list=ru.kontur.vostok.hercules.elastic.sink.LogEventFilter
+sink.filter.0.class=ru.kontur.vostok.hercules.elastic.sink.LogEventFilter
sink.sender.pingPeriodMs=60000
diff --git a/hercules-elastic-sink/pom.xml b/hercules-elastic-sink/pom.xml
index 8f7a5cb2..d5571b6a 100644
--- a/hercules-elastic-sink/pom.xml
+++ b/hercules-elastic-sink/pom.xml
@@ -5,7 +5,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-elastic-sink/src/test/java/ru/kontur/vostok/hercules/elastic/sink/LogEventFilterTest.java b/hercules-elastic-sink/src/test/java/ru/kontur/vostok/hercules/elastic/sink/LogEventFilterTest.java
index 1c28b28b..058d8c48 100644
--- a/hercules-elastic-sink/src/test/java/ru/kontur/vostok/hercules/elastic/sink/LogEventFilterTest.java
+++ b/hercules-elastic-sink/src/test/java/ru/kontur/vostok/hercules/elastic/sink/LogEventFilterTest.java
@@ -6,8 +6,10 @@
import ru.kontur.vostok.hercules.protocol.Event;
import ru.kontur.vostok.hercules.protocol.EventBuilder;
import ru.kontur.vostok.hercules.protocol.Variant;
+import ru.kontur.vostok.hercules.sink.filter.EventFilter;
import ru.kontur.vostok.hercules.util.time.TimeUtil;
+import java.util.List;
import java.util.Properties;
/**
@@ -125,4 +127,14 @@ private EventBuilder getEventBuilder() {
TimeUtil.millisToTicks(System.currentTimeMillis()),
"00000000-0000-0000-0000-000000000000");
}
+
+ @Test
+ public void shouldInitializeListOfFiltersFromProperties() {
+ Properties properties = new Properties();
+ properties.setProperty("0.class", "ru.kontur.vostok.hercules.elastic.sink.LogEventFilter");
+
+ List filters = EventFilter.from(properties);
+ Assert.assertEquals(1, filters.size());
+ Assert.assertEquals(LogEventFilter.class, filters.get(0).getClass());
+ }
}
diff --git a/hercules-gate-client/pom.xml b/hercules-gate-client/pom.xml
index 1acf7920..35b17ee6 100644
--- a/hercules-gate-client/pom.xml
+++ b/hercules-gate-client/pom.xml
@@ -3,7 +3,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-gate/pom.xml b/hercules-gate/pom.xml
index 5d9f2ca6..9d616482 100644
--- a/hercules-gate/pom.xml
+++ b/hercules-gate/pom.xml
@@ -3,7 +3,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-graphite-sink/application.properties b/hercules-graphite-sink/application.properties
index f7e9c23b..7cef0db7 100644
--- a/hercules-graphite-sink/application.properties
+++ b/hercules-graphite-sink/application.properties
@@ -20,9 +20,10 @@ sink.sender.graphite.connector.local.connection.limit.per.endpoint=3
sink.sender.graphite.connector.local.socket.timeout.ms=2000
sink.sender.graphite.connector.remote.endpoints=
-sink.filter.list=ru.kontur.vostok.hercules.graphite.sink.filter.MetricEventFilter,ru.kontur.vostok.hercules.graphite.sink.filter.MetricAclEventFilter
-sink.filter.1.acl.path=file://metrics.acl
-sink.filter.1.acl.defaultStatement=PERMIT
+sink.filter.0.class=ru.kontur.vostok.hercules.graphite.sink.filter.MetricEventFilter
+sink.filter.1.class=ru.kontur.vostok.hercules.graphite.sink.filter.MetricAclEventFilter
+sink.filter.1.props.acl.path=file://metrics.acl
+sink.filter.1.props.acl.defaultStatement=PERMIT
metrics.graphite.server.addr=localhost
metrics.graphite.server.port=2003
diff --git a/hercules-graphite-sink/pom.xml b/hercules-graphite-sink/pom.xml
index 05e2720b..aa3301f1 100644
--- a/hercules-graphite-sink/pom.xml
+++ b/hercules-graphite-sink/pom.xml
@@ -3,7 +3,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-health/pom.xml b/hercules-health/pom.xml
index d9e4bfe4..6de9103a 100644
--- a/hercules-health/pom.xml
+++ b/hercules-health/pom.xml
@@ -3,7 +3,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-http/pom.xml b/hercules-http/pom.xml
index 712a0f55..07b40198 100644
--- a/hercules-http/pom.xml
+++ b/hercules-http/pom.xml
@@ -3,7 +3,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-init/pom.xml b/hercules-init/pom.xml
index 752673b5..dfdb7c52 100644
--- a/hercules-init/pom.xml
+++ b/hercules-init/pom.xml
@@ -3,7 +3,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-json/pom.xml b/hercules-json/pom.xml
index 84f77303..613b04d4 100644
--- a/hercules-json/pom.xml
+++ b/hercules-json/pom.xml
@@ -5,7 +5,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-kafka-util/pom.xml b/hercules-kafka-util/pom.xml
index da523d08..a9038a96 100644
--- a/hercules-kafka-util/pom.xml
+++ b/hercules-kafka-util/pom.xml
@@ -3,7 +3,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-management-api/pom.xml b/hercules-management-api/pom.xml
index 8a4cfa80..48233089 100644
--- a/hercules-management-api/pom.xml
+++ b/hercules-management-api/pom.xml
@@ -3,7 +3,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-meta/pom.xml b/hercules-meta/pom.xml
index e506f700..a1cec8fe 100644
--- a/hercules-meta/pom.xml
+++ b/hercules-meta/pom.xml
@@ -3,7 +3,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-partitioner/pom.xml b/hercules-partitioner/pom.xml
index 9c365702..dd4d8b72 100644
--- a/hercules-partitioner/pom.xml
+++ b/hercules-partitioner/pom.xml
@@ -3,7 +3,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-protocol/pom.xml b/hercules-protocol/pom.xml
index eaf24f1c..dee23089 100644
--- a/hercules-protocol/pom.xml
+++ b/hercules-protocol/pom.xml
@@ -3,7 +3,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-sd/pom.xml b/hercules-sd/pom.xml
index 05f7778e..107378b9 100644
--- a/hercules-sd/pom.xml
+++ b/hercules-sd/pom.xml
@@ -5,7 +5,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-sentry-sink/application.properties b/hercules-sentry-sink/application.properties
index 30999c6a..5be45418 100644
--- a/hercules-sentry-sink/application.properties
+++ b/hercules-sentry-sink/application.properties
@@ -13,10 +13,12 @@ sink.sender.readTimeoutMs=25000
sink.consumer.bootstrap.servers=localhost:9092,localhost:9093,localhost:9094
sink.consumer.metric.reporters=ru.kontur.vostok.hercules.kafka.util.metrics.GraphiteReporter
-sink.filter.list=ru.kontur.vostok.hercules.sentry.sink.filter.LevelEventFilter,ru.kontur.vostok.hercules.sentry.sink.filter.SentryWhitelistEventFilter,ru.kontur.vostok.hercules.sentry.sink.filter.SentryBlacklistEventFilter
-sink.filter.0.level=ERROR
-sink.filter.1.patterns=*:*:*
-sink.filter.2.patterns=test_project:testing:test_subproject
+sink.filter.0.class=ru.kontur.vostok.hercules.sentry.sink.filter.LevelEventFilter
+sink.filter.1.class=ru.kontur.vostok.hercules.sentry.sink.filter.SentryWhitelistEventFilter
+sink.filter.2.class=ru.kontur.vostok.hercules.sentry.sink.filter.SentryBlacklistEventFilter
+sink.filter.0.props.level=ERROR
+sink.filter.1.props.patterns=*:*:*
+sink.filter.2.props.patterns=test_project:testing:test_subproject
sink.pattern=logs_*
diff --git a/hercules-sentry-sink/pom.xml b/hercules-sentry-sink/pom.xml
index 01272429..a4f064ed 100644
--- a/hercules-sentry-sink/pom.xml
+++ b/hercules-sentry-sink/pom.xml
@@ -3,7 +3,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-sink/pom.xml b/hercules-sink/pom.xml
index ebe11090..840c57ab 100644
--- a/hercules-sink/pom.xml
+++ b/hercules-sink/pom.xml
@@ -5,7 +5,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-stream-api/pom.xml b/hercules-stream-api/pom.xml
index 5cd4e4cd..07a93794 100644
--- a/hercules-stream-api/pom.xml
+++ b/hercules-stream-api/pom.xml
@@ -3,7 +3,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-stream-manager/pom.xml b/hercules-stream-manager/pom.xml
index 9d2a42a5..0afb2d51 100644
--- a/hercules-stream-manager/pom.xml
+++ b/hercules-stream-manager/pom.xml
@@ -3,7 +3,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-stream-sink/pom.xml b/hercules-stream-sink/pom.xml
index 49a0596a..a3a74600 100644
--- a/hercules-stream-sink/pom.xml
+++ b/hercules-stream-sink/pom.xml
@@ -3,7 +3,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-tags/pom.xml b/hercules-tags/pom.xml
index f4b64a67..b5231987 100644
--- a/hercules-tags/pom.xml
+++ b/hercules-tags/pom.xml
@@ -3,7 +3,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-throttling/pom.xml b/hercules-throttling/pom.xml
index 7ef43f9f..bc00cb0e 100644
--- a/hercules-throttling/pom.xml
+++ b/hercules-throttling/pom.xml
@@ -3,7 +3,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-timeline-api/pom.xml b/hercules-timeline-api/pom.xml
index ce31611c..b199f298 100644
--- a/hercules-timeline-api/pom.xml
+++ b/hercules-timeline-api/pom.xml
@@ -3,7 +3,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-timeline-manager/pom.xml b/hercules-timeline-manager/pom.xml
index ce1247a7..f0846a38 100644
--- a/hercules-timeline-manager/pom.xml
+++ b/hercules-timeline-manager/pom.xml
@@ -3,7 +3,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-timeline-sink/pom.xml b/hercules-timeline-sink/pom.xml
index e9fa2ecf..e18eac0e 100644
--- a/hercules-timeline-sink/pom.xml
+++ b/hercules-timeline-sink/pom.xml
@@ -3,7 +3,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-tracing-api/pom.xml b/hercules-tracing-api/pom.xml
index 57734f6d..60bb666a 100644
--- a/hercules-tracing-api/pom.xml
+++ b/hercules-tracing-api/pom.xml
@@ -5,7 +5,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-tracing-sink-clickhouse/pom.xml b/hercules-tracing-sink-clickhouse/pom.xml
index f907fe78..bcb0bd4e 100644
--- a/hercules-tracing-sink-clickhouse/pom.xml
+++ b/hercules-tracing-sink-clickhouse/pom.xml
@@ -5,7 +5,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-tracing-sink/pom.xml b/hercules-tracing-sink/pom.xml
index 7019c23f..e59849cf 100644
--- a/hercules-tracing-sink/pom.xml
+++ b/hercules-tracing-sink/pom.xml
@@ -5,7 +5,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-undertow-util/pom.xml b/hercules-undertow-util/pom.xml
index 099d516e..a3a414c1 100644
--- a/hercules-undertow-util/pom.xml
+++ b/hercules-undertow-util/pom.xml
@@ -3,7 +3,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-util/pom.xml b/hercules-util/pom.xml
index 6405e976..b82f5122 100644
--- a/hercules-util/pom.xml
+++ b/hercules-util/pom.xml
@@ -3,7 +3,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/hercules-util/src/main/java/ru/kontur/vostok/hercules/util/properties/PropertiesUtil.java b/hercules-util/src/main/java/ru/kontur/vostok/hercules/util/properties/PropertiesUtil.java
index 8f4117ba..d6d3711c 100644
--- a/hercules-util/src/main/java/ru/kontur/vostok/hercules/util/properties/PropertiesUtil.java
+++ b/hercules-util/src/main/java/ru/kontur/vostok/hercules/util/properties/PropertiesUtil.java
@@ -84,7 +84,6 @@ private PropertiesUtil() {
* Notes:
* The property {@code class} should be inheritor from parentClass
* and implement constructor with Properties param
- * if properties for class are defined under scope {@code props}
* @return list of parentClass instances
*/
public static List createClassInstanceList(Properties properties, Class parentClass) {
@@ -127,22 +126,16 @@ public static List createClassInstanceList(Properties properties, Class T createClassInstance(Properties properties, Class parentClass) {
String className = PropertiesUtil.get(Props.CLASS, properties).get();
Properties classProperties = PropertiesUtil.ofScope(properties, "props");
-
- if (classProperties.isEmpty()) {
- return ClassUtil.fromClass(className, parentClass);
- } else {
- return ClassUtil.fromClass(
- className,
- parentClass,
- new Class>[]{Properties.class},
- new Object[]{classProperties});
- }
+ return ClassUtil.fromClass(
+ className,
+ parentClass,
+ new Class>[]{Properties.class},
+ new Object[]{classProperties});
}
private static class Props {
diff --git a/hercules-util/src/test/java/ru/kontur/vostok/hercules/util/properties/PropertiesUtilTest.java b/hercules-util/src/test/java/ru/kontur/vostok/hercules/util/properties/PropertiesUtilTest.java
index c4099b99..7d3f670b 100644
--- a/hercules-util/src/test/java/ru/kontur/vostok/hercules/util/properties/PropertiesUtilTest.java
+++ b/hercules-util/src/test/java/ru/kontur/vostok/hercules/util/properties/PropertiesUtilTest.java
@@ -81,13 +81,13 @@ public static class TestClass {
boolean b;
public TestClass(Properties properties) {
- a = Integer.parseInt(properties.getProperty("a"));
- b = Boolean.parseBoolean(properties.getProperty("b"));
- }
-
- public TestClass() {
- a = 3;
- b = true;
+ if (properties.isEmpty()) {
+ a = 3;
+ b = true;
+ } else {
+ a = Integer.parseInt(properties.getProperty("a"));
+ b = Boolean.parseBoolean(properties.getProperty("b"));
+ }
}
}
}
diff --git a/hercules-uuid/pom.xml b/hercules-uuid/pom.xml
index 96df343e..6e6a7fef 100644
--- a/hercules-uuid/pom.xml
+++ b/hercules-uuid/pom.xml
@@ -3,7 +3,7 @@
hercules
ru.kontur.vostok.hercules
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
4.0.0
diff --git a/pom.xml b/pom.xml
index cbf17670..69ca47d2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
ru.kontur.vostok.hercules
hercules
pom
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
UTF-8
@@ -14,7 +14,7 @@
1.8
1.8
- 0.48.0-SNAPSHOT
+ 0.48.1-SNAPSHOT
2.4.0
3.4.13