Tabnine Logo
BitmapSerdeFactory
Code IndexAdd Tabnine to your IDE (free)

How to use
BitmapSerdeFactory
in
org.apache.druid.segment.data

Best Java code snippets using org.apache.druid.segment.data.BitmapSerdeFactory (Showing top 20 results out of 315)

origin: apache/incubator-druid

 @Override
 public Deserializer getDeserializer()
 {
  return (buffer, builder, columnConfig) -> {
   int offset = buffer.getInt();
   int initialPos = buffer.position();
   final CompressedColumnarLongsSupplier column = CompressedColumnarLongsSupplier.fromByteBuffer(
     buffer,
     byteOrder
   );
   buffer.position(initialPos + offset);
   final ImmutableBitmap bitmap;
   if (buffer.hasRemaining()) {
    bitmap = bitmapSerdeFactory.getObjectStrategy().fromByteBufferWithSize(buffer);
   } else {
    bitmap = bitmapSerdeFactory.getBitmapFactory().makeEmptyImmutableBitmap();
   }
   builder.setType(ValueType.LONG)
       .setHasMultipleValues(false)
       .setNumericColumnSupplier(new LongNumericColumnSupplier(column, bitmap));
  };
 }
}
origin: apache/incubator-druid

public BitmapCreationBenchmark(Class<? extends BitmapSerdeFactory> clazz)
  throws IllegalAccessException, InstantiationException
{
 BitmapSerdeFactory serdeFactory = clazz.newInstance();
 factory = serdeFactory.getBitmapFactory();
}
origin: apache/incubator-druid

byte[] bytes = bitmapSerdeFactory.getObjectStrategy().toBytes(bitmap);
if (bytes != null) {
 jg.writeBinary(bytes);
origin: apache/incubator-druid

@Override
public ColumnValueSelector<?> makeColumnValueSelector(ReadableOffset offset)
{
 return column.makeColumnValueSelector(offset, IndexIO.LEGACY_FACTORY.getBitmapFactory().makeEmptyImmutableBitmap());
}
origin: apache/incubator-druid

@Override
public BitmapIndex getBitmapIndex(String dimension)
{
 return new BitmapIndexColumnPartSupplier(
   factory,
   GenericIndexed.fromIterable(Collections.singletonList(foo1BitMap), serdeFactory.getObjectStrategy()),
   GenericIndexed.fromIterable(Collections.singletonList("foo1"), GenericIndexed.STRING_STRATEGY)
 ).get();
}
origin: apache/incubator-druid

 @Override
 public Deserializer getDeserializer()
 {
  return (buffer, builder, columnConfig) -> {
   int offset = buffer.getInt();
   int initialPos = buffer.position();
   final CompressedColumnarFloatsSupplier column = CompressedColumnarFloatsSupplier.fromByteBuffer(
     buffer,
     byteOrder
   );
   buffer.position(initialPos + offset);
   final ImmutableBitmap bitmap;
   if (buffer.hasRemaining()) {
    bitmap = bitmapSerdeFactory.getObjectStrategy().fromByteBufferWithSize(buffer);
   } else {
    bitmap = bitmapSerdeFactory.getBitmapFactory().makeEmptyImmutableBitmap();
   }
   builder.setType(ValueType.FLOAT)
       .setHasMultipleValues(false)
       .setNumericColumnSupplier(new FloatNumericColumnSupplier(column, bitmap));
  };
 }
}
origin: apache/incubator-druid

@Override
public ColumnValueSelector<?> makeColumnValueSelector(ReadableOffset offset)
{
 return column.makeColumnValueSelector(offset, IndexIO.LEGACY_FACTORY.getBitmapFactory().makeEmptyImmutableBitmap());
}
origin: apache/incubator-druid

  serdeFactory.getObjectStrategy()
),
dictionary
origin: apache/incubator-druid

 @Override
 public Deserializer getDeserializer()
 {
  return (buffer, builder, columnConfig) -> {
   int offset = buffer.getInt();
   int initialPos = buffer.position();
   final Supplier<ColumnarDoubles> column = CompressedColumnarDoublesSuppliers.fromByteBuffer(
     buffer,
     byteOrder
   );

   buffer.position(initialPos + offset);
   final ImmutableBitmap bitmap;
   if (buffer.hasRemaining()) {
    bitmap = bitmapSerdeFactory.getObjectStrategy().fromByteBufferWithSize(buffer);
   } else {
    bitmap = bitmapSerdeFactory.getBitmapFactory().makeEmptyImmutableBitmap();
   }
   builder.setType(ValueType.DOUBLE)
       .setHasMultipleValues(false)
       .setNumericColumnSupplier(new DoubleNumericColumnSupplier(column, bitmap));
  };
 }
}
origin: apache/incubator-druid

@Override
public ColumnValueSelector<?> makeColumnValueSelector(ReadableOffset offset)
{
 return column.makeColumnValueSelector(offset, IndexIO.LEGACY_FACTORY.getBitmapFactory().makeEmptyImmutableBitmap());
}
origin: apache/incubator-druid

  serdeFactory.getObjectStrategy()
),
dictionary
origin: apache/incubator-druid

@Override
public void open() throws IOException
{
 writer = CompressionFactory.getDoubleSerializer(
   segmentWriteOutMedium,
   StringUtils.format("%s.double_column", filenameBase),
   byteOrder,
   compression
 );
 writer.open();
 nullValueBitmapWriter = new ByteBufferWriter<>(
   segmentWriteOutMedium,
   bitmapSerdeFactory.getObjectStrategy()
 );
 nullValueBitmapWriter.open();
 nullRowsBitmap = bitmapSerdeFactory.getBitmapFactory().makeEmptyMutableBitmap();
}
origin: apache/incubator-druid

public StringDimensionMergerV9(
  String dimensionName,
  IndexSpec indexSpec,
  SegmentWriteOutMedium segmentWriteOutMedium,
  ColumnCapabilities capabilities,
  ProgressIndicator progress,
  Closer closer
)
{
 this.dimensionName = dimensionName;
 this.indexSpec = indexSpec;
 this.capabilities = capabilities;
 this.segmentWriteOutMedium = segmentWriteOutMedium;
 nullRowsBitmap = indexSpec.getBitmapSerdeFactory().getBitmapFactory().makeEmptyMutableBitmap();
 this.progress = progress;
 this.closer = closer;
}
origin: apache/incubator-druid

  serdeFactory.getObjectStrategy()
),
dictionary
origin: apache/incubator-druid

@Override
public void open() throws IOException
{
 writer = CompressionFactory.getFloatSerializer(
   segmentWriteOutMedium,
   StringUtils.format("%s.float_column", filenameBase),
   byteOrder,
   compression
 );
 writer.open();
 nullValueBitmapWriter = new ByteBufferWriter<>(
   segmentWriteOutMedium,
   bitmapSerdeFactory.getObjectStrategy()
 );
 nullValueBitmapWriter.open();
 nullRowsBitmap = bitmapSerdeFactory.getBitmapFactory().makeEmptyMutableBitmap();
}
origin: apache/incubator-druid

@Override
public long getSerializedSize() throws IOException
{
 nullValueBitmapWriter.write(bitmapSerdeFactory.getBitmapFactory().makeImmutableBitmap(nullRowsBitmap));
 long bitmapSize = nullRowsBitmap.isEmpty()
          ? 0L
          : nullValueBitmapWriter.getSerializedSize();
 return Integer.BYTES + writer.getSerializedSize() + bitmapSize;
}
origin: org.apache.druid/druid-services

byte[] bytes = bitmapSerdeFactory.getObjectStrategy().toBytes(bitmap);
if (bytes != null) {
 jg.writeBinary(bytes);
origin: apache/incubator-druid

@Override
public void open() throws IOException
{
 writer = CompressionFactory.getLongSerializer(
   segmentWriteOutMedium,
   StringUtils.format("%s.long_column", filenameBase),
   byteOrder,
   encoding,
   compression
 );
 writer.open();
 nullValueBitmapWriter = new ByteBufferWriter<>(
   segmentWriteOutMedium,
   bitmapSerdeFactory.getObjectStrategy()
 );
 nullValueBitmapWriter.open();
 nullRowsBitmap = bitmapSerdeFactory.getBitmapFactory().makeEmptyMutableBitmap();
}
origin: apache/incubator-druid

@Override
public long getSerializedSize() throws IOException
{
 nullValueBitmapWriter.write(bitmapSerdeFactory.getBitmapFactory().makeImmutableBitmap(nullRowsBitmap));
 long bitmapSize = nullRowsBitmap.isEmpty()
          ? 0L
          : nullValueBitmapWriter.getSerializedSize();
 return Integer.BYTES + writer.getSerializedSize() + bitmapSize;
}
origin: apache/incubator-druid

bitmaps.put(
  serializerUtils.readString(invertedBuffer),
  GenericIndexed.read(invertedBuffer, bitmapSerdeFactory.getObjectStrategy())
);
spatialIndexed.put(
  serializerUtils.readString(spatialBuffer),
  new ImmutableRTreeObjectStrategy(bitmapSerdeFactory.getBitmapFactory()).fromByteBufferWithSize(
    spatialBuffer
org.apache.druid.segment.dataBitmapSerdeFactory

Most used methods

  • getObjectStrategy
  • getBitmapFactory

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setContentView (Activity)
  • getResourceAsStream (ClassLoader)
  • getContentResolver (Context)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Menu (java.awt)
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now