@Override public String toString() { return "BlockCompressedColumnarLongs_Anonymous{" + "currBufferNum=" + currBufferNum + ", sizePer=" + sizePer + ", numChunks=" + singleThreadedLongBuffers.size() + ", totalSize=" + totalSize + '}'; } }
@Override public String toString() { return "BlockCompressedColumnarFloats_Anonymous{" + "currBufferNum=" + currBufferNum + ", sizePer=" + sizePer + ", numChunks=" + singleThreadedFloatBuffers.size() + ", totalSize=" + totalSize + '}'; } }
@Override public boolean hasNext() { return currIndex < indexed.size(); }
@Override public String toString() { return "BlockCompressedColumnarDoubles_Anonymous{" + "currBufferNum=" + currBufferNum + ", sizePer=" + sizePer + ", numChunks=" + singleThreadedDoubleBuffers.size() + ", totalSize=" + totalSize + '}'; } }
@Override public String toString() { return "CompressedVSizeColumnarInts{" + "currBufferNum=" + currBufferNum + ", sizePer=" + sizePer + ", numChunks=" + singleThreadedBuffers.size() + ", totalSize=" + totalSize + '}'; }
@Override public String toString() { return "CompressedIntsIndexedSupplier_Anonymous{" + "currBufferNum=" + currBufferNum + ", sizePer=" + sizePer + ", numChunks=" + singleThreadedIntBuffers.size() + ", totalSize=" + totalSize + '}'; }
private boolean allNull(Indexed<String> dimValues) { for (int i = 0, size = dimValues.size(); i < size; i++) { if (dimValues.get(i) != null) { return false; } } return true; } }
int allocationSize = indexed.size() * Integer.BYTES; log.debug("Allocating dictionary merging direct buffer with size[%,d]", allocationSize); mergeBufferTotalSize += allocationSize; directBufferAllocations.add(new Pair<>(conversionDirectBuffer, allocationSize)); } else { conversions[i] = IntBuffer.allocate(indexed.size()); mergeBufferTotalSize += indexed.size();
} else if (numMergeIndex == 1) { writeDictionary(dimValueLookup); cardinality = dimValueLookup.size();
private void checkBasicAPIs(String[] strings, Indexed<String> index, boolean allowReverseLookup) { Assert.assertEquals(strings.length, index.size()); for (int i = 0; i < strings.length; i++) { Assert.assertEquals(strings[i], index.get(i)); } if (allowReverseLookup) { HashMap<String, Integer> mixedUp = new HashMap<>(); for (int i = 0; i < strings.length; i++) { mixedUp.put(strings[i], i); } for (Map.Entry<String, Integer> entry : mixedUp.entrySet()) { Assert.assertEquals(entry.getValue().intValue(), index.indexOf(entry.getKey())); } } else { try { index.indexOf("xxx"); Assert.fail("should throw exception"); } catch (UnsupportedOperationException e) { // not supported } } }
Assert.assertEquals(2, queryable.getAvailableDimensions().size()); Assert.assertEquals("host", queryable.getAvailableDimensions().get(0)); Assert.assertEquals("spatial", queryable.getAvailableDimensions().get(1));
.buildMMappedIndex(); if (index4.getAvailableDimensions().size() != 0) {
@Override public String toString() { return "BlockCompressedColumnarDoubles_Anonymous{" + "currBufferNum=" + currBufferNum + ", sizePer=" + sizePer + ", numChunks=" + singleThreadedDoubleBuffers.size() + ", totalSize=" + totalSize + '}'; } }
@Override public String toString() { return "CompressedVSizeColumnarInts{" + "currBufferNum=" + currBufferNum + ", sizePer=" + sizePer + ", numChunks=" + singleThreadedBuffers.size() + ", totalSize=" + totalSize + '}'; }
@Override public boolean hasNext() { return currIndex < indexed.size(); }
@Override public String toString() { return "BlockCompressedColumnarLongs_Anonymous{" + "currBufferNum=" + currBufferNum + ", sizePer=" + sizePer + ", numChunks=" + singleThreadedLongBuffers.size() + ", totalSize=" + totalSize + '}'; } }
@Override public String toString() { return "CompressedIntsIndexedSupplier_Anonymous{" + "currBufferNum=" + currBufferNum + ", sizePer=" + sizePer + ", numChunks=" + singleThreadedIntBuffers.size() + ", totalSize=" + totalSize + '}'; }
@Override public String toString() { return "BlockCompressedColumnarFloats_Anonymous{" + "currBufferNum=" + currBufferNum + ", sizePer=" + sizePer + ", numChunks=" + singleThreadedFloatBuffers.size() + ", totalSize=" + totalSize + '}'; } }
private boolean allNull(Indexed<String> dimValues) { for (int i = 0, size = dimValues.size(); i < size; i++) { if (dimValues.get(i) != null) { return false; } } return true; } }
DictionaryMergeIterator(Indexed<String>[] dimValueLookups, boolean useDirect) { pQueue = new PriorityQueue<>(dimValueLookups.length, NULLS_FIRST_PEEKING_COMPARATOR); conversions = new IntBuffer[dimValueLookups.length]; for (int i = 0; i < conversions.length; i++) { if (dimValueLookups[i] == null) { continue; } Indexed<String> indexed = dimValueLookups[i]; if (useDirect) { int allocationSize = indexed.size() * Integer.BYTES; log.info("Allocating dictionary merging direct buffer with size[%,d]", allocationSize); final ByteBuffer conversionDirectBuffer = ByteBuffer.allocateDirect(allocationSize); conversions[i] = conversionDirectBuffer.asIntBuffer(); directBufferAllocations.add(new Pair<>(conversionDirectBuffer, allocationSize)); } else { conversions[i] = IntBuffer.allocate(indexed.size()); } final PeekingIterator<String> iter = Iterators.peekingIterator( Iterators.transform( indexed.iterator(), NullHandling::nullToEmptyIfNeeded ) ); if (iter.hasNext()) { pQueue.add(Pair.of(i, iter)); } } }