From 30183d3b4dafbdd65adf6a0741f77a53023db7b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavier=20L=C3=A9aut=C3=A9?= Date: Tue, 7 Oct 2014 12:40:12 -0700 Subject: [PATCH] update druid-api for json parsing improvements --- pom.xml | 2 +- .../java/io/druid/data/input/ProtoBufInputRowParser.java | 3 ++- .../io/druid/data/input/ProtoBufInputRowParserTest.java | 3 ++- .../java/io/druid/segment/realtime/FireDepartmentTest.java | 3 ++- .../segment/realtime/plumber/RealtimePlumberSchoolTest.java | 6 +++++- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 60304fd173c..54158c11c82 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,7 @@ UTF-8 0.26.8 2.6.0 - 0.2.11 + 0.2.12 diff --git a/processing/src/main/java/io/druid/data/input/ProtoBufInputRowParser.java b/processing/src/main/java/io/druid/data/input/ProtoBufInputRowParser.java index df8bdb5cef8..4a449efbe82 100644 --- a/processing/src/main/java/io/druid/data/input/ProtoBufInputRowParser.java +++ b/processing/src/main/java/io/druid/data/input/ProtoBufInputRowParser.java @@ -69,7 +69,8 @@ public class ProtoBufInputRowParser implements ByteBufferInputRowParser if (parseSpec == null) { this.parseSpec = new JSONParseSpec( timestampSpec, - new DimensionsSpec(dimensions, dimensionExclusions, spatialDimensions) + new DimensionsSpec(dimensions, dimensionExclusions, spatialDimensions), + JSONParseSpec.JSON ); } else { this.parseSpec = parseSpec; diff --git a/processing/src/test/java/io/druid/data/input/ProtoBufInputRowParserTest.java b/processing/src/test/java/io/druid/data/input/ProtoBufInputRowParserTest.java index 67d5fdc3574..570045daab0 100644 --- a/processing/src/test/java/io/druid/data/input/ProtoBufInputRowParserTest.java +++ b/processing/src/test/java/io/druid/data/input/ProtoBufInputRowParserTest.java @@ -59,7 +59,8 @@ public class ProtoBufInputRowParserTest ProtoBufInputRowParser parser = new ProtoBufInputRowParser( new JSONParseSpec( new TimestampSpec("timestamp", "iso"), - new DimensionsSpec(Arrays.asList(DIMENSIONS), Arrays.asList(), null) + new DimensionsSpec(Arrays.asList(DIMENSIONS), Arrays.asList(), null), + JSONParseSpec.JSON ), "prototest.desc", null, null, null, null diff --git a/server/src/test/java/io/druid/segment/realtime/FireDepartmentTest.java b/server/src/test/java/io/druid/segment/realtime/FireDepartmentTest.java index 5fca643fc08..d212342abdf 100644 --- a/server/src/test/java/io/druid/segment/realtime/FireDepartmentTest.java +++ b/server/src/test/java/io/druid/segment/realtime/FireDepartmentTest.java @@ -61,7 +61,8 @@ public class FireDepartmentTest Arrays.asList("dim1", "dim2"), null, null - ) + ), + JSONParseSpec.JSON ), null, null, null, null ), diff --git a/server/src/test/java/io/druid/segment/realtime/plumber/RealtimePlumberSchoolTest.java b/server/src/test/java/io/druid/segment/realtime/plumber/RealtimePlumberSchoolTest.java index e610d3c53e7..ff4808f6815 100644 --- a/server/src/test/java/io/druid/segment/realtime/plumber/RealtimePlumberSchoolTest.java +++ b/server/src/test/java/io/druid/segment/realtime/plumber/RealtimePlumberSchoolTest.java @@ -123,7 +123,11 @@ public class RealtimePlumberSchoolTest @Override public ParseSpec getParseSpec() { - return new JSONParseSpec(new TimestampSpec("timestamp", "auto"), new DimensionsSpec(null, null, null)); + return new JSONParseSpec( + new TimestampSpec("timestamp", "auto"), + new DimensionsSpec(null, null, null), + JSONParseSpec.JSON + ); } @Override