Tabnine Logo
IncrementalIndex.close
Code IndexAdd Tabnine to your IDE (free)

How to use
close
method
in
org.apache.druid.segment.incremental.IncrementalIndex

Best Java code snippets using org.apache.druid.segment.incremental.IncrementalIndex.close (Showing top 20 results out of 315)

origin: apache/incubator-druid

 @Override
 public void close()
 {
  index.close();
 }
}
origin: apache/incubator-druid

@TearDown(Level.Iteration)
public void teardown()
{
 incIndex.close();
 incIndex = null;
}
origin: apache/incubator-druid

 @Override
 public void doRun()
 {
  try {
   persist(persistIndex, interval, file, progressIndicator);
  }
  catch (Exception e) {
   log.error(e, "persist index error");
   throw Throwables.propagate(e);
  }
  finally {
   // close this index
   persistIndex.close();
  }
 }
}
origin: apache/incubator-druid

/**
 * Clear out maps to allow GC
 * NOTE: This is NOT thread-safe with add... so make sure all the adding is DONE before closing
 */
@Override
public void close()
{
 super.close();
 closeAggregators();
 aggregators.clear();
 facts.clear();
 if (selectors != null) {
  selectors.clear();
 }
}
origin: apache/incubator-druid

 /**
  * NOTE: This is NOT thread-safe with add... so make sure all the adding is DONE before closing
  */
 @Override
 public void close()
 {
  super.close();
  facts.clear();
  indexAndOffsets.clear();

  if (selectors != null) {
   selectors.clear();
  }

  Closer c = Closer.create();
  aggBuffers.forEach(c::register);
  try {
   c.close();
  }
  catch (IOException e) {
   throw new RuntimeException(e);
  }
  aggBuffers.clear();
 }
}
origin: apache/incubator-druid

@TearDown(Level.Trial)
public void tearDown()
{
 try {
  if (anIncrementalIndex != null) {
   anIncrementalIndex.close();
  }
  if (queryableIndexes != null) {
   for (QueryableIndex index : queryableIndexes) {
    index.close();
   }
  }
  if (tmpDir != null) {
   FileUtils.deleteDirectory(tmpDir);
  }
 }
 catch (IOException e) {
  log.warn(e, "Failed to tear down, temp dir was: %s", tmpDir);
  throw Throwables.propagate(e);
 }
}
origin: apache/incubator-druid

@TearDown(Level.Trial)
public void tearDown()
{
 try {
  if (anIncrementalIndex != null) {
   anIncrementalIndex.close();
  }
  if (queryableIndexes != null) {
   for (QueryableIndex index : queryableIndexes) {
    index.close();
   }
  }
  if (tmpDir != null) {
   FileUtils.deleteDirectory(tmpDir);
  }
 }
 catch (IOException e) {
  log.warn(e, "Failed to tear down, temp dir was: %s", tmpDir);
  throw Throwables.propagate(e);
 }
}
origin: apache/incubator-druid

private void flushIndexToContextAndClose(BytesWritable key, IncrementalIndex index, Context context)
  throws IOException, InterruptedException
{
 final List<String> dimensions = index.getDimensionNames();
 Iterator<Row> rows = index.iterator();
 while (rows.hasNext()) {
  context.progress();
  Row row = rows.next();
  InputRow inputRow = getInputRowFromRow(row, dimensions);
  // reportParseExceptions is true as any unparseable data is already handled by the mapper.
  InputRowSerde.SerializeResult serializeResult = InputRowSerde.toBytes(typeHelperMap, inputRow, combiningAggs);
  context.write(
    key,
    new BytesWritable(serializeResult.getSerializedRow())
  );
 }
 index.close();
}
origin: apache/incubator-druid

log.warn(e, "Query interrupted, cancelling pending results, query id [%s]", query.getId());
future.cancel(true);
closeOnFailure.close();
throw new QueryInterruptedException(e);
closeOnFailure.close();
throw new QueryInterruptedException(e);
closeOnFailure.close();
log.info("Query timeout, cancelling pending results for query id [%s]", query.getId());
future.cancel(true);
closeOnFailure.close();
throw Throwables.propagate(e.getCause());
origin: apache/incubator-druid

 @After
 public void cleanup() throws Exception
 {
  queryableIndex.close();
  incrementalIndex.close();
  FileUtils.deleteDirectory(persistedSegmentDir);
 }
}
origin: apache/incubator-druid

@After
public void tearDown() throws Exception
{
 for (IncrementalIndex incrementalIndex : incrementalIndices) {
  incrementalIndex.close();
 }
 for (QueryableIndex queryableIndex : groupByIndices) {
  queryableIndex.close();
 }
 if (tmpDir != null) {
  FileUtils.deleteDirectory(tmpDir);
 }
}
origin: apache/incubator-druid

@After
public void tearDown() throws Exception
{
 for (IncrementalIndex incrementalIndex : incrementalIndices) {
  incrementalIndex.close();
 }
 for (QueryableIndex queryableIndex : groupByIndices) {
  queryableIndex.close();
 }
 resourceCloser.close();
 if (tmpDir != null) {
  FileUtils.deleteDirectory(tmpDir);
 }
}
origin: apache/incubator-druid

@After
public void tearDown() throws Exception
{
 for (IncrementalIndex incrementalIndex : incrementalIndices) {
  incrementalIndex.close();
 }
 for (QueryableIndex queryableIndex : groupByIndices) {
  queryableIndex.close();
 }
 resourceCloser.close();
 if (tmpDir != null) {
  FileUtils.deleteDirectory(tmpDir);
 }
}
origin: apache/incubator-druid

@After
public void tearDown() throws Exception
{
 for (IncrementalIndex incrementalIndex : incrementalIndices) {
  incrementalIndex.close();
 }
 for (QueryableIndex queryableIndex : groupByIndices) {
  queryableIndex.close();
 }
 resourceCloser.close();
 if (tmpDir != null) {
  FileUtils.deleteDirectory(tmpDir);
 }
}
origin: apache/incubator-druid

);
innerQueryResultIndex.close();
origin: apache/incubator-druid

index.close();
if (persistExecutor != null) {
 persistExecutor.shutdownNow();
origin: apache/incubator-druid

} else {
 newIndex.close();
 throw new ISE("finishWriting() called during swap");
origin: apache/incubator-druid

 toMerge.add(tmp);
 indexMerger.persist(index, tmp, new IndexSpec(), null);
 index.close();
 index = new IncrementalIndex.Builder()
   .setIndexSchema(
index.close();
origin: org.apache.druid/druid-processing

 @Override
 public void close()
 {
  index.close();
 }
}
origin: org.apache.druid/druid-processing

/**
 * Clear out maps to allow GC
 * NOTE: This is NOT thread-safe with add... so make sure all the adding is DONE before closing
 */
@Override
public void close()
{
 super.close();
 closeAggregators();
 aggregators.clear();
 facts.clear();
 if (selectors != null) {
  selectors.clear();
 }
}
org.apache.druid.segment.incrementalIncrementalIndexclose

Popular methods of IncrementalIndex

  • add
  • size
  • canAppendRow
  • getDimensionNames
  • getInterval
  • getMetadata
  • isEmpty
  • formatRow
  • getCapabilities
  • getColumnCapabilities
  • getCombinedParseException
  • getDimensionOrder
  • getCombinedParseException,
  • getDimensionOrder,
  • getFacts,
  • getMetricNames,
  • iterator,
  • loadDimensionIterable,
  • makeColumnSelectorFactory,
  • toIncrementalIndexRow,
  • addNewDimension

Popular in Java

  • Running tasks concurrently on multiple threads
  • putExtra (Intent)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setRequestProperty (URLConnection)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Collectors (java.util.stream)
  • Best IntelliJ plugins
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