diff --git a/processing/src/main/java/io/druid/segment/IndexIO.java b/processing/src/main/java/io/druid/segment/IndexIO.java index 815c358bc46..9d6f7db0552 100644 --- a/processing/src/main/java/io/druid/segment/IndexIO.java +++ b/processing/src/main/java/io/druid/segment/IndexIO.java @@ -756,6 +756,10 @@ public class IndexIO SmooshedFileMapper smooshedFiles = Smoosh.map(inDir); ByteBuffer indexBuffer = smooshedFiles.mapFile("index.drd"); + /** + * Index.drd should consist of the segment version, the columns and dimensions of the segment as generic + * indexes, the interval start and end millis as longs (in 16 bytes), and a bitmap index type. + */ final GenericIndexed cols = GenericIndexed.read(indexBuffer, GenericIndexed.stringStrategy); final GenericIndexed dims = GenericIndexed.read(indexBuffer, GenericIndexed.stringStrategy); final Interval dataInterval = new Interval(indexBuffer.getLong(), indexBuffer.getLong()); @@ -768,7 +772,7 @@ public class IndexIO if (indexBuffer.hasRemaining()) { segmentBitmapSerdeFactory = mapper.readValue(serializerUtils.readString(indexBuffer), BitmapSerdeFactory.class); } else { - segmentBitmapSerdeFactory = BitmapSerdeFactory.DEFAULT_BITMAP_SERDE_FACTORY; + segmentBitmapSerdeFactory = new ConciseBitmapSerdeFactory(); } Map columns = Maps.newHashMap(); diff --git a/processing/src/main/java/io/druid/segment/data/BitmapSerdeFactory.java b/processing/src/main/java/io/druid/segment/data/BitmapSerdeFactory.java index 2056e4eddf6..09db6f5fff0 100644 --- a/processing/src/main/java/io/druid/segment/data/BitmapSerdeFactory.java +++ b/processing/src/main/java/io/druid/segment/data/BitmapSerdeFactory.java @@ -34,8 +34,6 @@ import com.metamx.collections.bitmap.ImmutableBitmap; public interface BitmapSerdeFactory { - public static BitmapSerdeFactory DEFAULT_BITMAP_SERDE_FACTORY = new ConciseBitmapSerdeFactory(); - public ObjectStrategy getObjectStrategy(); public BitmapFactory getBitmapFactory(); diff --git a/processing/src/main/java/io/druid/segment/data/ConciseCompressedIndexedInts.java b/processing/src/main/java/io/druid/segment/data/ConciseCompressedIndexedInts.java index 9d4e4246961..a93c5deb0d7 100644 --- a/processing/src/main/java/io/druid/segment/data/ConciseCompressedIndexedInts.java +++ b/processing/src/main/java/io/druid/segment/data/ConciseCompressedIndexedInts.java @@ -26,7 +26,6 @@ import com.metamx.common.ISE; import it.uniroma3.mat.extendedset.intset.ImmutableConciseSet; import it.uniroma3.mat.extendedset.intset.IntSet; -import javax.annotation.Nullable; import java.nio.ByteBuffer; import java.util.Iterator; @@ -65,11 +64,10 @@ public class ConciseCompressedIndexedInts implements IndexedInts, Comparable