jackjlli commented on a change in pull request #4934: Clean up
BitmapInvertedIndexReader
URL: https://github.com/apache/incubator-pinot/pull/4934#discussion_r359078294
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/segment/index/readers/BitmapInvertedIndexReader.java
##########
@@ -31,25 +30,22 @@
public class BitmapInvertedIndexReader implements
InvertedIndexReader<ImmutableRoaringBitmap> {
public static final Logger LOGGER =
LoggerFactory.getLogger(BitmapInvertedIndexReader.class);
- final private int numberOfBitmaps;
- private volatile SoftReference<SoftReference<ImmutableRoaringBitmap>[]>
bitmaps = null;
-
- private PinotDataBuffer buffer;
-
- private File file;
+ private final int _numBitmaps;
+ private volatile SoftReference<SoftReference<ImmutableRoaringBitmap>[]>
_bitmaps = null;
+ private final PinotDataBuffer _buffer;
/**
* Constructs an inverted index with the specified size.
* @param cardinality the number of bitmaps in the inverted index, which
should be the same as the
* number of values in
* the dictionary.
- * @throws IOException
*/
- public BitmapInvertedIndexReader(PinotDataBuffer indexDataBuffer, int
cardinality)
- throws IOException {
- this.file = file;
- numberOfBitmaps = cardinality;
- load(indexDataBuffer);
+ public BitmapInvertedIndexReader(PinotDataBuffer indexDataBuffer, int
cardinality) {
+ _numBitmaps = cardinality;
+ _buffer = indexDataBuffer;
+
+ final int lastOffset = _buffer.getInt(_numBitmaps * Integer.BYTES);
Review comment:
Updated.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]