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

How to use
add
method
in
org.apache.druid.utils.CircularBuffer

Best Java code snippets using org.apache.druid.utils.CircularBuffer.add (Showing top 11 results out of 315)

origin: apache/incubator-druid

/**
 * Add batch of segment changes update.
 */
public synchronized void addChangeRequests(List<T> requests)
{
 for (T request : requests) {
  changes.add(new Holder<>(request, getLastCounter().inc()));
 }
 singleThreadedExecutor.execute(resolveWaitingFuturesRunnable);
}
origin: apache/incubator-druid

private void handleParseException(ParseException e)
{
 if (e.isFromPartiallyValidRow()) {
  buildSegmentsMeters.incrementProcessedWithError();
 } else {
  buildSegmentsMeters.incrementUnparseable();
 }
 if (ingestionSchema.tuningConfig.isLogParseExceptions()) {
  log.error(e, "Encountered parse exception:");
 }
 if (buildSegmentsSavedParseExceptions != null) {
  buildSegmentsSavedParseExceptions.add(e);
 }
 if (buildSegmentsMeters.getUnparseable()
   + buildSegmentsMeters.getProcessedWithError() > ingestionSchema.tuningConfig.getMaxParseExceptions()) {
  log.error("Max parse exceptions exceeded, terminating task...");
  throw new RuntimeException("Max parse exceptions exceeded, terminating task...", e);
 }
}
origin: apache/incubator-druid

determinePartitionsSavedParseExceptions.add(e);
origin: apache/incubator-druid

private void handleParseException(ParseException pe)
{
 if (pe.isFromPartiallyValidRow()) {
  rowIngestionMeters.incrementProcessedWithError();
 } else {
  rowIngestionMeters.incrementUnparseable();
 }
 if (spec.getTuningConfig().isLogParseExceptions()) {
  log.error(pe, "Encountered parse exception: ");
 }
 if (savedParseExceptions != null) {
  savedParseExceptions.add(pe);
 }
 if (rowIngestionMeters.getUnparseable() + rowIngestionMeters.getProcessedWithError()
   > spec.getTuningConfig().getMaxParseExceptions()) {
  log.error("Max parse exceptions exceeded, terminating task...");
  throw new RuntimeException("Max parse exceptions exceeded, terminating task...");
 }
}
origin: apache/incubator-druid

private void handleParseException(ParseException pe, ConsumerRecord<byte[], byte[]> record)
{
 if (pe.isFromPartiallyValidRow()) {
  rowIngestionMeters.incrementProcessedWithError();
 } else {
  rowIngestionMeters.incrementUnparseable();
 }
 if (tuningConfig.isLogParseExceptions()) {
  log.error(
    pe,
    "Encountered parse exception on row from partition[%d] offset[%d]",
    record.partition(),
    record.offset()
  );
 }
 if (savedParseExceptions != null) {
  savedParseExceptions.add(pe);
 }
 if (rowIngestionMeters.getUnparseable() + rowIngestionMeters.getProcessedWithError()
   > tuningConfig.getMaxParseExceptions()) {
  log.error("Max parse exceptions exceeded, terminating task...");
  throw new RuntimeException("Max parse exceptions exceeded, terminating task...");
 }
}
origin: apache/incubator-druid

private void handleParseException(ParseException pe, OrderedPartitionableRecord record)
{
 if (pe.isFromPartiallyValidRow()) {
  rowIngestionMeters.incrementProcessedWithError();
 } else {
  rowIngestionMeters.incrementUnparseable();
 }
 if (tuningConfig.isLogParseExceptions()) {
  log.error(
    pe,
    "Encountered parse exception on row from partition[%s] sequence[%s]",
    record.getPartitionId(),
    record.getSequenceNumber()
  );
 }
 if (savedParseExceptions != null) {
  savedParseExceptions.add(pe);
 }
 if (rowIngestionMeters.getUnparseable() + rowIngestionMeters.getProcessedWithError()
   > tuningConfig.getMaxParseExceptions()) {
  log.error("Max parse exceptions exceeded, terminating task...");
  throw new RuntimeException("Max parse exceptions exceeded, terminating task...");
 }
}
origin: apache/incubator-druid

circularBuffer.add(1);
Assert.assertEquals(1, circularBuffer.size());
Assert.assertEquals(1, (int) circularBuffer.get(0));
circularBuffer.add(2);
Assert.assertEquals(2, circularBuffer.size());
for (int i = 0; i < circularBuffer.size(); i++) {
circularBuffer.add(3);
Assert.assertEquals(3, circularBuffer.size());
for (int i = 0; i < circularBuffer.size(); i++) {
circularBuffer.add(4);
Assert.assertEquals(3, circularBuffer.size());
for (int i = 0; i < circularBuffer.size(); i++) {
circularBuffer.add(5);
Assert.assertEquals(3, circularBuffer.size());
for (int i = 0; i < circularBuffer.size(); i++) {
circularBuffer.add(6);
Assert.assertEquals(3, circularBuffer.size());
for (int i = 0; i < circularBuffer.size(); i++) {
circularBuffer.add(7);
Assert.assertEquals(3, circularBuffer.size());
for (int i = 0; i < circularBuffer.size(); i++) {
circularBuffer.add(8);
origin: org.apache.druid/druid-server

/**
 * Add batch of segment changes update.
 */
public synchronized void addChangeRequests(List<T> requests)
{
 for (T request : requests) {
  changes.add(new Holder(request, getLastCounter().inc()));
 }
 singleThreadedExecutor.execute(resolveWaitingFuturesRunnable);
}
origin: org.apache.druid/druid-indexing-service

private void handleParseException(ParseException e)
{
 if (e.isFromPartiallyValidRow()) {
  buildSegmentsMeters.incrementProcessedWithError();
 } else {
  buildSegmentsMeters.incrementUnparseable();
 }
 if (ingestionSchema.tuningConfig.isLogParseExceptions()) {
  log.error(e, "Encountered parse exception:");
 }
 if (buildSegmentsSavedParseExceptions != null) {
  buildSegmentsSavedParseExceptions.add(e);
 }
 if (buildSegmentsMeters.getUnparseable()
   + buildSegmentsMeters.getProcessedWithError() > ingestionSchema.tuningConfig.getMaxParseExceptions()) {
  log.error("Max parse exceptions exceeded, terminating task...");
  throw new RuntimeException("Max parse exceptions exceeded, terminating task...", e);
 }
}
origin: org.apache.druid/druid-indexing-service

private void handleParseException(ParseException pe)
{
 if (pe.isFromPartiallyValidRow()) {
  rowIngestionMeters.incrementProcessedWithError();
 } else {
  rowIngestionMeters.incrementUnparseable();
 }
 if (spec.getTuningConfig().isLogParseExceptions()) {
  log.error(pe, "Encountered parse exception: ");
 }
 if (savedParseExceptions != null) {
  savedParseExceptions.add(pe);
 }
 if (rowIngestionMeters.getUnparseable() + rowIngestionMeters.getProcessedWithError()
   > spec.getTuningConfig().getMaxParseExceptions()) {
  log.error("Max parse exceptions exceeded, terminating task...");
  throw new RuntimeException("Max parse exceptions exceeded, terminating task...");
 }
}
origin: org.apache.druid/druid-indexing-service

determinePartitionsSavedParseExceptions.add(e);
org.apache.druid.utilsCircularBufferadd

Popular methods of CircularBuffer

  • <init>
  • size
  • get
    Access object at a given index, starting from the earliest entry added and moving forward.
  • getLatest
    Access object at a given index, starting from the latest entry added and moving backwards.

Popular in Java

  • Updating database using SQL prepared statement
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Collectors (java.util.stream)
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • 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