From 9a5d559a14265f6d6e29ded1770f327da3a5fe3b Mon Sep 17 00:00:00 2001 From: pcunningham Date: Mon, 4 Sep 2017 18:15:27 +0100 Subject: [PATCH 1/2] Fixes wrong parse exception type being caught by TranquilityEventWriter Avro extensions from the Druid codebase throw a ParseException from the io.druid.java.util.common.parsers package, the Tranquility code is not catching this as it is expecting the ParseException to be from the com.metamx.common.parsers package. This means that broken messages will halt processing regardless of the reportParseExceptions setting as the exception goes uncaught. Fixed this to use the ParseException from io.druid.java.util.common.parsers package --- .../metamx/tranquility/kafka/writer/TranquilityEventWriter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kafka/src/main/java/com/metamx/tranquility/kafka/writer/TranquilityEventWriter.java b/kafka/src/main/java/com/metamx/tranquility/kafka/writer/TranquilityEventWriter.java index 7cbf98d..75acb75 100644 --- a/kafka/src/main/java/com/metamx/tranquility/kafka/writer/TranquilityEventWriter.java +++ b/kafka/src/main/java/com/metamx/tranquility/kafka/writer/TranquilityEventWriter.java @@ -21,7 +21,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Throwables; import com.metamx.common.logger.Logger; -import com.metamx.common.parsers.ParseException; +import io.druid.java.util.common.parsers.ParseException; import com.metamx.tranquility.config.DataSourceConfig; import com.metamx.tranquility.finagle.FinagleRegistry; import com.metamx.tranquility.kafka.KafkaBeamUtils; From 600a848e9496925a0e3386a0018f16ced7234742 Mon Sep 17 00:00:00 2001 From: pcunningham Date: Mon, 4 Sep 2017 18:31:03 +0100 Subject: [PATCH 2/2] Updated logger class to io.druid.java.util.commmon --- .../metamx/tranquility/kafka/writer/TranquilityEventWriter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kafka/src/main/java/com/metamx/tranquility/kafka/writer/TranquilityEventWriter.java b/kafka/src/main/java/com/metamx/tranquility/kafka/writer/TranquilityEventWriter.java index 75acb75..0cbd2ff 100644 --- a/kafka/src/main/java/com/metamx/tranquility/kafka/writer/TranquilityEventWriter.java +++ b/kafka/src/main/java/com/metamx/tranquility/kafka/writer/TranquilityEventWriter.java @@ -20,7 +20,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Throwables; -import com.metamx.common.logger.Logger; +import io.druid.java.util.common.logger.Logger; import io.druid.java.util.common.parsers.ParseException; import com.metamx.tranquility.config.DataSourceConfig; import com.metamx.tranquility.finagle.FinagleRegistry;