org.apache.druid.segment.QueryableIndex.close()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(81)

本文整理了Java中org.apache.druid.segment.QueryableIndex.close方法的一些代码示例,展示了QueryableIndex.close的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueryableIndex.close方法的具体详情如下:
包路径:org.apache.druid.segment.QueryableIndex
类名称:QueryableIndex
方法名:close

QueryableIndex.close介绍

[英]The close method shouldn't actually be here as this is nasty. We will adjust it in the future.
[中]封闭方法不应该出现在这里,因为这很糟糕。我们将在未来对其进行调整。

代码示例

代码示例来源:origin: apache/incubator-druid

@Override
 public void close()
 {
  // this is kinda nasty
  index.close();
 }
}

代码示例来源:origin: apache/incubator-druid

@TearDown(Level.Trial)
public void tearDown() throws Exception
{
 if (index != null) {
  index.close();
  index = null;
 }
 if (segmentGenerator != null) {
  segmentGenerator.close();
  segmentGenerator = null;
 }
}

代码示例来源:origin: apache/incubator-druid

@TearDown(Level.Trial)
public void tearDown() throws Exception
{
 if (index != null) {
  index.close();
  index = null;
 }
 if (segmentGenerator != null) {
  segmentGenerator.close();
  segmentGenerator = null;
 }
}

代码示例来源:origin: apache/incubator-druid

@After
public void cleanUp()
{
 index.close();
}

代码示例来源: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

@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

index.close();

代码示例来源:origin: apache/incubator-druid

@Test
public void testPersistWithSegmentMetadata() throws IOException
{
 File outDir = Files.createTempDir();
 QueryableIndex index = null;
 try {
  outDir = Files.createTempDir();
  index = indexIO.loadIndex(indexMerger.persist(toPersist, outDir, INDEX_SPEC, null));
  Assert.assertEquals("value", index.getMetadata().get("key"));
 }
 finally {
  if (index != null) {
   index.close();
  }
  if (outDir != null) {
   FileUtils.deleteDirectory(outDir);
  }
 }
}

代码示例来源:origin: apache/incubator-druid

index.close();

代码示例来源:origin: apache/incubator-druid

qi.close();

代码示例来源:origin: org.apache.druid/druid-processing

@Override
 public void close()
 {
  // this is kinda nasty
  index.close();
 }
}

相关文章