From af86c0e6ea56dd41a9b5004c8ebc443f7408a2c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavier=20L=C3=A9aut=C3=A9?= Date: Fri, 18 Sep 2015 17:59:59 -0700 Subject: [PATCH 1/2] update druid-api + java-util for timstamp parsing speedup --- pom.xml | 4 ++-- .../test/java/io/druid/segment/indexing/DataSchemaTest.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 404c9a8da47..facbdeda7ce 100644 --- a/pom.xml +++ b/pom.xml @@ -65,11 +65,11 @@ - 0.27.2 + 0.27.3 2.8.0 9.2.13.v20150730 1.19 - 0.3.12 + 0.3.13 2.4.6 2.3 diff --git a/server/src/test/java/io/druid/segment/indexing/DataSchemaTest.java b/server/src/test/java/io/druid/segment/indexing/DataSchemaTest.java index 219d86b649f..8a54de53763 100644 --- a/server/src/test/java/io/druid/segment/indexing/DataSchemaTest.java +++ b/server/src/test/java/io/druid/segment/indexing/DataSchemaTest.java @@ -170,7 +170,8 @@ public class DataSchemaTest + "\"parseSpec\":{" + "\"format\":\"json\"," + "\"timestampSpec\":{\"column\":\"xXx\", \"format\": \"auto\", \"missingValue\": null}," - + "\"dimensionsSpec\":{\"dimensions\":[], \"dimensionExclusions\":[], \"spatialDimensions\":[]}}" + + "\"dimensionsSpec\":{\"dimensions\":[], \"dimensionExclusions\":[], \"spatialDimensions\":[]}}," + + "\"encoding\":\"UTF-8\"" + "}," + "\"metricsSpec\":[{\"type\":\"doubleSum\",\"name\":\"metric1\",\"fieldName\":\"col1\"}]," + "\"granularitySpec\":{" From 8f489c1f6662dfc305a162b4677691021f33c6db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavier=20L=C3=A9aut=C3=A9?= Date: Mon, 21 Sep 2015 09:55:44 -0700 Subject: [PATCH 2/2] fix type cast warnings --- .../io/druid/segment/indexing/DataSchemaTest.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/server/src/test/java/io/druid/segment/indexing/DataSchemaTest.java b/server/src/test/java/io/druid/segment/indexing/DataSchemaTest.java index 8a54de53763..9059a7928d9 100644 --- a/server/src/test/java/io/druid/segment/indexing/DataSchemaTest.java +++ b/server/src/test/java/io/druid/segment/indexing/DataSchemaTest.java @@ -17,6 +17,7 @@ package io.druid.segment.indexing; +import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.InjectableValues; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.ImmutableList; @@ -56,7 +57,7 @@ public class DataSchemaTest new TimestampSpec("time", "auto", null), new DimensionsSpec(ImmutableList.of("dimB", "dimA"), null, null) ) - ), Map.class + ), new TypeReference>() {} ); DataSchema schema = new DataSchema( @@ -85,7 +86,7 @@ public class DataSchemaTest new TimestampSpec("time", "auto", null), new DimensionsSpec(ImmutableList.of("time", "dimA", "dimB", "col2"), ImmutableList.of("dimC"), null) ) - ), Map.class + ), new TypeReference>() {} ); DataSchema schema = new DataSchema( @@ -114,7 +115,7 @@ public class DataSchemaTest new TimestampSpec("time", "auto", null), new DimensionsSpec(ImmutableList.of("time", "dimA", "dimB", "metric1"), ImmutableList.of("dimC"), null) ) - ), Map.class + ), new TypeReference>() {} ); DataSchema schema = new DataSchema( @@ -189,13 +190,13 @@ public class DataSchemaTest Assert.assertEquals( new DataSchema( "test", - jsonMapper.convertValue( + jsonMapper.>convertValue( new StringInputRowParser( new JSONParseSpec( new TimestampSpec("xXx", null, null), new DimensionsSpec(null, null, null) ) - ), Map.class + ), new TypeReference>() {} ), new AggregatorFactory[]{ new DoubleSumAggregatorFactory("metric1", "col1")