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

How to use
IncrementalIndexAdapter
in
org.apache.druid.segment.incremental

Best Java code snippets using org.apache.druid.segment.incremental.IncrementalIndexAdapter (Showing top 19 results out of 315)

origin: apache/incubator-druid

@Before
public void setUp() throws IndexSizeExceededException
{
 long timestamp = 0L;
 for (Map<String, Object> event : events1) {
  incrementalIndex1.add(new MapBasedInputRow(timestamp++, Lists.newArrayList(event.keySet()), event));
 }
 timestamp = 0L;
 for (Map<String, Object> event : events2) {
  incrementalIndex2.add(new MapBasedInputRow(timestamp++, Lists.newArrayList(event.keySet()), event));
 }
 adapter2 = new IncrementalIndexAdapter(
   DEFAULT_INTERVAL,
   incrementalIndex2,
   INDEX_SPEC.getBitmapSerdeFactory().getBitmapFactory()
 );
 adapter1 = new IncrementalIndexAdapter(
   DEFAULT_INTERVAL,
   incrementalIndex1,
   INDEX_SPEC.getBitmapSerdeFactory().getBitmapFactory()
 );
}
origin: apache/incubator-druid

public IncrementalIndexAdapter(Interval dataInterval, IncrementalIndex<?> index, BitmapFactory bitmapFactory)
{
 this.dataInterval = dataInterval;
 this.index = index;
 final List<IncrementalIndex.DimensionDesc> dimensions = index.getDimensions();
 accessors = dimensions
   .stream()
   .collect(Collectors.toMap(IncrementalIndex.DimensionDesc::getName, DimensionAccessor::new));
 processRows(index, bitmapFactory, dimensions);
}
origin: apache/incubator-druid

return merge(
  Collections.singletonList(
    new IncrementalIndexAdapter(
      dataInterval,
      index,
origin: org.apache.druid/druid-processing

public IncrementalIndexAdapter(Interval dataInterval, IncrementalIndex<?> index, BitmapFactory bitmapFactory)
{
 this.dataInterval = dataInterval;
 this.index = index;
 final List<IncrementalIndex.DimensionDesc> dimensions = index.getDimensions();
 accessors = dimensions
   .stream()
   .collect(Collectors.toMap(IncrementalIndex.DimensionDesc::getName, DimensionAccessor::new));
 processRows(index, bitmapFactory, dimensions);
}
origin: apache/incubator-druid

@Test
public void testGetRowsIterable() throws Exception
{
 final long timestamp = System.currentTimeMillis();
 IncrementalIndex toPersist1 = IncrementalIndexTest.createIndex(null);
 IncrementalIndexTest.populateIndex(timestamp, toPersist1);
 final IndexableAdapter incrementalAdapter = new IncrementalIndexAdapter(
   toPersist1.getInterval(),
   toPersist1,
   INDEX_SPEC.getBitmapSerdeFactory()
        .getBitmapFactory()
 );
 RowIterator rows = incrementalAdapter.getRows();
 List<Integer> rowNums = new ArrayList<>();
 while (rows.moveToNext()) {
  rowNums.add(rows.getPointer().getRowNum());
 }
 Assert.assertEquals(2, rowNums.size());
 Assert.assertEquals(0, (long) rowNums.get(0));
 Assert.assertEquals(1, (long) rowNums.get(1));
}
origin: apache/incubator-druid

final IndexableAdapter incrementalAdapter = new IncrementalIndexAdapter(
  toPersist1.getInterval(),
  toPersist1,
origin: apache/incubator-druid

RoaringBitmapFactory factory = new RoaringBitmapFactory();
List<IndexableAdapter> toMerge = Arrays.asList(
  new IncrementalIndexAdapter(interval, index1, factory),
  new IncrementalIndexAdapter(interval, index2, factory),
  new IncrementalIndexAdapter(interval, index3, factory)
);
origin: apache/incubator-druid

RoaringBitmapFactory factory = new RoaringBitmapFactory();
List<IndexableAdapter> toMerge = Arrays.asList(
  new IncrementalIndexAdapter(interval, index1, factory),
  new IncrementalIndexAdapter(interval, index2, factory)
);
origin: apache/incubator-druid

RoaringBitmapFactory factory = new RoaringBitmapFactory();
List<IndexableAdapter> toMerge = Arrays.asList(
  new IncrementalIndexAdapter(interval, index1, factory),
  new IncrementalIndexAdapter(interval, index2, factory)
origin: apache/incubator-druid

  .buildOnheap();
IncrementalIndexAdapter emptyIndexAdapter = new IncrementalIndexAdapter(
  Intervals.of("2012-08-01/P3D"),
  emptyIndex,
origin: apache/incubator-druid

@Test
public void testGetBitmapIndex() throws Exception
{
 final long timestamp = System.currentTimeMillis();
 IncrementalIndex incrementalIndex = IncrementalIndexTest.createIndex(null);
 IncrementalIndexTest.populateIndex(timestamp, incrementalIndex);
 IndexableAdapter adapter = new IncrementalIndexAdapter(
   incrementalIndex.getInterval(),
   incrementalIndex,
   INDEX_SPEC.getBitmapSerdeFactory().getBitmapFactory()
 );
 String dimension = "dim1";
 try (CloseableIndexed<String> dimValueLookup = adapter.getDimValueLookup(dimension)) {
  for (int i = 0; i < dimValueLookup.size(); i++) {
   BitmapValues bitmapValues = adapter.getBitmapValues(dimension, i);
   Assert.assertEquals(1, bitmapValues.size());
  }
 }
}
origin: apache/incubator-druid

RoaringBitmapFactory factory = new RoaringBitmapFactory();
List<IndexableAdapter> toMerge = Arrays.asList(
  new IncrementalIndexAdapter(interval, index1, factory),
  new IncrementalIndexAdapter(interval, index2, factory),
  new IncrementalIndexAdapter(interval, index3, factory),
  new IncrementalIndexAdapter(interval, index4, factory),
  new IncrementalIndexAdapter(interval, index5, factory)
);
origin: apache/incubator-druid

final IndexableAdapter incrementalAdapter = new IncrementalIndexAdapter(
  toPersist1.getInterval(),
  toPersist1,
origin: apache/incubator-druid

RoaringBitmapFactory factory = new RoaringBitmapFactory();
List<IndexableAdapter> toMerge = Collections.singletonList(
  new IncrementalIndexAdapter(interval, index2, factory)
);
origin: apache/incubator-druid

final IndexableAdapter incrementalAdapter = new IncrementalIndexAdapter(
  toPersist1.getInterval(),
  toPersist1,
origin: apache/incubator-druid

final IndexableAdapter incrementalAdapter = new IncrementalIndexAdapter(
  toPersist1.getInterval(),
  toPersist1,
origin: apache/incubator-druid

final IndexableAdapter incrementalAdapter = new IncrementalIndexAdapter(
  toPersist1.getInterval(),
  toPersist1,
origin: apache/incubator-druid

final IndexableAdapter incrementalAdapter = new IncrementalIndexAdapter(
  toPersist1.getInterval(),
  toPersist1,
origin: org.apache.druid/druid-processing

return merge(
  Collections.singletonList(
    new IncrementalIndexAdapter(
      dataInterval,
      index,
org.apache.druid.segment.incrementalIncrementalIndexAdapter

Most used methods

  • <init>
  • processRows
    Sometimes it's hard to tell whether one dimension contains a null value or not. If one dimension had

Popular in Java

  • Updating database using SQL prepared statement
  • compareTo (BigDecimal)
  • setScale (BigDecimal)
  • getApplicationContext (Context)
  • Kernel (java.awt.image)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • JList (javax.swing)
  • Top plugins for WebStorm
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