Tabnine Logo
StreamAppenderatorDriver.add
Code IndexAdd Tabnine to your IDE (free)

How to use
add
method
in
org.apache.druid.segment.realtime.appenderator.StreamAppenderatorDriver

Best Java code snippets using org.apache.druid.segment.realtime.appenderator.StreamAppenderatorDriver.add (Showing top 13 results out of 315)

origin: apache/incubator-druid

@Test(timeout = 60_000L, expected = TimeoutException.class)
public void testHandoffTimeout() throws Exception
{
 final TestCommitterSupplier<Integer> committerSupplier = new TestCommitterSupplier<>();
 segmentHandoffNotifierFactory.disableHandoff();
 Assert.assertNull(driver.startJob());
 for (int i = 0; i < ROWS.size(); i++) {
  committerSupplier.setMetadata(i + 1);
  Assert.assertTrue(driver.add(ROWS.get(i), "dummy", committerSupplier, false, true).isOk());
 }
 final SegmentsAndMetadata published = driver.publish(
   makeOkPublisher(),
   committerSupplier.get(),
   ImmutableList.of("dummy")
 ).get(PUBLISH_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);
 while (driver.getSegments().containsKey("dummy")) {
  Thread.sleep(100);
 }
 driver.registerHandoff(published).get(HANDOFF_CONDITION_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);
}
origin: apache/incubator-druid

final AppenderatorDriverAddResult addResult = driver.add(
  row,
  sequenceToUse.getSequenceName(),
origin: apache/incubator-druid

if (row != null && task.withinMinMaxRecordTime(row)) {
 final String sequenceName = sequenceNames.get(record.partition());
 final AppenderatorDriverAddResult addResult = driver.add(
   row,
   sequenceName,
origin: apache/incubator-druid

final AppenderatorDriverAddResult addResult = driver.add(row, "dummy", committerSupplier, false, true);
Assert.assertTrue(addResult.isOk());
if (addResult.getNumRowsInSegment() > MAX_ROWS_PER_SEGMENT) {
origin: apache/incubator-druid

@Test(timeout = 60_000L)
public void testSimple() throws Exception
{
 final TestCommitterSupplier<Integer> committerSupplier = new TestCommitterSupplier<>();
 Assert.assertNull(driver.startJob());
 for (int i = 0; i < ROWS.size(); i++) {
  committerSupplier.setMetadata(i + 1);
  Assert.assertTrue(driver.add(ROWS.get(i), "dummy", committerSupplier, false, true).isOk());
 }
 final SegmentsAndMetadata published = driver.publish(
   makeOkPublisher(),
   committerSupplier.get(),
   ImmutableList.of("dummy")
 ).get(PUBLISH_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);
 while (driver.getSegments().containsKey("dummy")) {
  Thread.sleep(100);
 }
 final SegmentsAndMetadata segmentsAndMetadata = driver.registerHandoff(published)
                            .get(HANDOFF_CONDITION_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);
 Assert.assertEquals(
   ImmutableSet.of(
     new SegmentIdWithShardSpec(DATA_SOURCE, Intervals.of("2000/PT1H"), VERSION, new NumberedShardSpec(0, 0)),
     new SegmentIdWithShardSpec(DATA_SOURCE, Intervals.of("2000T01/PT1H"), VERSION, new NumberedShardSpec(0, 0))
   ),
   asIdentifiers(segmentsAndMetadata.getSegments())
 );
 Assert.assertEquals(3, segmentsAndMetadata.getCommitMetadata());
}
origin: apache/incubator-druid

Assert.assertTrue(driver.add(ROWS.get(i), "dummy", committerSupplier, false, true).isOk());
origin: apache/incubator-druid

Assert.assertTrue(driver.add(ROWS.get(i), "dummy", committerSupplier, false, true).isOk());
origin: apache/incubator-druid

Assert.assertTrue(driver.add(ROWS.get(i), "dummy", committerSupplier, false, true).isOk());
origin: apache/incubator-druid

Assert.assertTrue(driver.add(ROWS.get(i), "dummy", committerSupplier, false, true).isOk());
origin: apache/incubator-druid

Assert.assertTrue(driver.add(ROWS.get(0), "sequence_0", committerSupplier, false, true).isOk());
 Assert.assertTrue(driver.add(ROWS.get(i), "sequence_1", committerSupplier, false, true).isOk());
origin: apache/incubator-druid

Assert.assertTrue(driver.add(ROWS.get(0), "dummy", committerSupplier, false, true).isOk());
Assert.assertTrue(driver.add(ROWS.get(i), "dummy", committerSupplier, false, true).isOk());
origin: apache/incubator-druid

 rowIngestionMeters.incrementThrownAway();
} else {
 AppenderatorDriverAddResult addResult = driver.add(inputRow, sequenceName, committerSupplier);
origin: org.apache.druid/druid-indexing-service

 rowIngestionMeters.incrementThrownAway();
} else {
 AppenderatorDriverAddResult addResult = driver.add(inputRow, sequenceName, committerSupplier);
org.apache.druid.segment.realtime.appenderatorStreamAppenderatorDriveradd

Javadoc

Add a row. Must not be called concurrently from multiple threads.

Popular methods of StreamAppenderatorDriver

  • publish
    Execute a task in background to publish all segments corresponding to the given sequence names. The
  • persist
    Persist all data indexed through this driver so far. Blocks until complete. Should be called after a
  • startJob
  • <init>
    Create a driver.
  • close
  • moveSegmentOut
    Move a set of identifiers out from "active", making way for newer segments. This method is to suppor
  • registerHandoff
    Register the segments in the given SegmentsAndMetadata to be handed off and execute a background tas
  • append
  • clear
  • getSegmentWithStates
  • getSegments
  • persistAsync
    Persist all data indexed through this driver so far. Returns a future of persisted commitMetadata. S
  • getSegments,
  • persistAsync,
  • publishAndRegisterHandoff,
  • publishInBackground,
  • pushInBackground,
  • wrapCommitter

Popular in Java

  • Creating JSON documents from java classes using gson
  • getContentResolver (Context)
  • getApplicationContext (Context)
  • compareTo (BigDecimal)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • JComboBox (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Best plugins for Eclipse
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