Skip to content

Commit

Permalink
Merge pull request apache#1755 from metamx/update-druid-api
Browse files Browse the repository at this point in the history
update druid-api for timestamp parsing speedup
  • Loading branch information
himanshug committed Sep 22, 2015
2 parents 490b1ae + 8f489c1 commit 34a8fbc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@
</scm>

<properties>
<metamx.java-util.version>0.27.2</metamx.java-util.version>
<metamx.java-util.version>0.27.3</metamx.java-util.version>
<apache.curator.version>2.8.0</apache.curator.version>
<jetty.version>9.2.13.v20150730</jetty.version>
<jersey.version>1.19</jersey.version>
<druid.api.version>0.3.12</druid.api.version>
<druid.api.version>0.3.13</druid.api.version>
<!-- Watch out for Hadoop compatibility when updating to >= 2.5; see https://github.com/druid-io/druid/pull/1669 -->
<jackson.version>2.4.6</jackson.version>
<log4j.version>2.3</log4j.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -56,7 +57,7 @@ public void testDefaultExclusions() throws Exception
new TimestampSpec("time", "auto", null),
new DimensionsSpec(ImmutableList.of("dimB", "dimA"), null, null)
)
), Map.class
), new TypeReference<Map<String, Object>>() {}
);

DataSchema schema = new DataSchema(
Expand Down Expand Up @@ -85,7 +86,7 @@ public void testExplicitInclude() throws Exception
new TimestampSpec("time", "auto", null),
new DimensionsSpec(ImmutableList.of("time", "dimA", "dimB", "col2"), ImmutableList.of("dimC"), null)
)
), Map.class
), new TypeReference<Map<String, Object>>() {}
);

DataSchema schema = new DataSchema(
Expand Down Expand Up @@ -114,7 +115,7 @@ public void testOverlapMetricNameAndDim() throws Exception
new TimestampSpec("time", "auto", null),
new DimensionsSpec(ImmutableList.of("time", "dimA", "dimB", "metric1"), ImmutableList.of("dimC"), null)
)
), Map.class
), new TypeReference<Map<String, Object>>() {}
);

DataSchema schema = new DataSchema(
Expand Down Expand Up @@ -170,7 +171,8 @@ public void testSerde() throws Exception
+ "\"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\":{"
Expand All @@ -188,13 +190,13 @@ public void testSerde() throws Exception
Assert.assertEquals(
new DataSchema(
"test",
jsonMapper.convertValue(
jsonMapper.<Map<String, Object>>convertValue(
new StringInputRowParser(
new JSONParseSpec(
new TimestampSpec("xXx", null, null),
new DimensionsSpec(null, null, null)
)
), Map.class
), new TypeReference<Map<String, Object>>() {}
),
new AggregatorFactory[]{
new DoubleSumAggregatorFactory("metric1", "col1")
Expand Down

0 comments on commit 34a8fbc

Please sign in to comment.