From 4dd01d4eaee26ab188ec4e8af48a7115e90ffb6e Mon Sep 17 00:00:00 2001 From: nishantmonu51 Date: Mon, 18 Aug 2014 19:34:56 +0530 Subject: [PATCH] review comments --- .../io/druid/segment/incremental/IncrementalIndex.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/processing/src/main/java/io/druid/segment/incremental/IncrementalIndex.java b/processing/src/main/java/io/druid/segment/incremental/IncrementalIndex.java index 26985edc024..722153ccbef 100644 --- a/processing/src/main/java/io/druid/segment/incremental/IncrementalIndex.java +++ b/processing/src/main/java/io/druid/segment/incremental/IncrementalIndex.java @@ -81,7 +81,7 @@ public class IncrementalIndex implements Iterable, Closeable private final long minTimestamp; private final QueryGranularity gran; - private final Set> rowTransformers; + private final List> rowTransformers; private final AggregatorFactory[] metrics; private final Map metricIndexes; @@ -120,7 +120,7 @@ public class IncrementalIndex implements Iterable, Closeable this.minTimestamp = incrementalIndexSchema.getMinTimestamp(); this.gran = incrementalIndexSchema.getGran(); this.metrics = incrementalIndexSchema.getMetrics(); - this.rowTransformers = Sets.newHashSet(); + this.rowTransformers = Lists.newCopyOnWriteArrayList(); final ImmutableList.Builder metricNamesBuilder = ImmutableList.builder(); final ImmutableMap.Builder metricIndexesBuilder = ImmutableMap.builder(); @@ -447,13 +447,12 @@ public class IncrementalIndex implements Iterable, Closeable if (!facts.containsKey(key)) { int rowOffset = totalAggSize * numEntries.getAndIncrement(); if (rowOffset + totalAggSize > bufferHolder.get().limit()) { - throw new ISE("Buffer Full cannot add more rows current rowSize : %d", numEntries.get()); + throw new ISE("Buffer full, cannot add more rows! Current rowSize[%,d].", numEntries.get()); } for (int i = 0; i < aggs.length; i++) { aggs[i].init(bufferHolder.get(), getMetricPosition(rowOffset, i)); } facts.put(key, rowOffset); - } } in.set(row);