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

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

Best Java code snippets using org.apache.druid.segment.realtime.appenderator.StreamAppenderatorDriver.registerHandoff (Showing top 5 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 Future<SegmentsAndMetadata> handoffFuture = driver.registerHandoff(published);
SegmentsAndMetadata handedOff = null;
if (tuningConfig.getHandoffConditionTimeout() == 0) {
origin: apache/incubator-druid

final SegmentsAndMetadata segmentsAndMetadata = driver.registerHandoff(published)
                           .get(HANDOFF_CONDITION_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);
Assert.assertEquals(numSegments, segmentsAndMetadata.getSegments().size());
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

).get(PUBLISH_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);
driver.registerHandoff(published).get();
org.apache.druid.segment.realtime.appenderatorStreamAppenderatorDriverregisterHandoff

Javadoc

Register the segments in the given SegmentsAndMetadata to be handed off and execute a background task which waits until the hand off completes.

Popular methods of StreamAppenderatorDriver

  • publish
    Execute a task in background to publish all segments corresponding to the given sequence names. The
  • add
    Add a row. Must not be called concurrently from multiple threads.
  • 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
  • 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
  • putExtra (Intent)
  • startActivity (Activity)
  • getSharedPreferences (Context)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • BoxLayout (javax.swing)
  • From CI to AI: The AI layer in your organization
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