Tabnine Logo
Segment.getIdentifier
Code IndexAdd Tabnine to your IDE (free)

How to use
getIdentifier
method
in
org.apache.druid.segment.Segment

Best Java code snippets using org.apache.druid.segment.Segment.getIdentifier (Showing top 6 results out of 315)

origin: org.apache.druid/druid-processing

@Override
public String getIdentifier()
{
 return !isClosed() ? baseSegment.getIdentifier() : null;
}
origin: org.apache.druid/druid-processing

 @Override
 protected boolean onAdvance(int phase, int registeredParties)
 {
  Preconditions.checkState(registeredParties == 0);
  // Ensure that onAdvance() doesn't throw exception, otherwise termination won't happen
  try {
   baseSegment.close();
  }
  catch (Exception e) {
   try {
    log.error(e, "Exception while closing segment[%s]", baseSegment.getIdentifier());
   }
   catch (Exception e2) {
    // ignore
   }
  }
  // Always terminate.
  return true;
 }
};
origin: org.apache.druid/druid-server

public void swapSegment(@Nullable Segment newSegment)
{
 while (true) {
  ReferenceCountingSegment currentSegment = adapter.get();
  if (currentSegment == null && newSegment == null) {
   return;
  }
  if (currentSegment != null && newSegment != null &&
    !newSegment.getIdentifier().equals(currentSegment.getIdentifier())) {
   // Sanity check: identifier should not change
   throw new ISE(
     "WTF?! Cannot swap identifier[%s] -> [%s]!",
     currentSegment.getIdentifier(),
     newSegment.getIdentifier()
   );
  }
  if (currentSegment == newSegment) {
   throw new ISE("Cannot swap to the same segment");
  }
  ReferenceCountingSegment newReferenceCountingSegment =
    newSegment != null ? new ReferenceCountingSegment(newSegment) : null;
  if (adapter.compareAndSet(currentSegment, newReferenceCountingSegment)) {
   if (currentSegment != null) {
    currentSegment.close();
   }
   index = null;
   return;
  }
 }
}
origin: org.apache.druid/druid-processing

Preconditions.checkArgument(intervals.size() == 1, "Can only handle a single interval, got[%s]", intervals);
final String segmentId = segment.getIdentifier();
origin: org.apache.druid/druid-processing

Collections.singletonList(
  new SegmentAnalysis(
    segment.getIdentifier(),
    retIntervals,
    columns,
origin: org.apache.druid/druid-processing

final String segmentId = DataSegmentUtils.withInterval(dataSource, segment.getIdentifier(), intervals.get(0));
org.apache.druid.segmentSegmentgetIdentifier

Popular methods of Segment

  • getDataInterval
  • asQueryableIndex
  • getId
  • as
    Request an implementation of a particular interface. If the passed-in interface is QueryableIndex or
  • asStorageAdapter
  • close

Popular in Java

  • Reactive rest calls using spring rest template
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getExternalFilesDir (Context)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Socket (java.net)
    Provides a client-side TCP socket.
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • JButton (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