Examples of directory()


Examples of org.apache.lucene.index.SegmentReader.directory()

  public Map<String, List<IndexTracerResult>> sampleIndex(AtomicReader atomicReader, String context) throws IOException {
    Map<String, List<IndexTracerResult>> results = new HashMap<String, List<IndexTracerResult>>();
    if (atomicReader instanceof SegmentReader) {
      SegmentReader segmentReader = (SegmentReader) atomicReader;
      Directory directory = segmentReader.directory();
      if (!(directory instanceof TraceableDirectory)) {
        LOG.info("Context [{1}] cannot warmup directory [{0}] needs to be a TraceableDirectory.", directory, context);
        return results;
      }
      IndexTracer tracer = new IndexTracer((TraceableDirectory) directory, _maxSampleSize);
View Full Code Here

Examples of org.apache.lucene.index.SegmentReader.directory()

      AtomicReaderContext atomicReaderContext = (AtomicReaderContext) ctext;
      AtomicReader atomicReader = atomicReaderContext.reader();
      if (atomicReader instanceof SegmentReader) {
        SegmentReader segmentReader = (SegmentReader) atomicReader;
        if (segmentReader.getSegmentName().equals(segmentName)) {
          return segmentReader.directory();
        }
      }
    }
    return null;
  }
View Full Code Here

Examples of org.apache.lucene.index.SegmentReader.directory()

      }
      AtomicReaderContext atomicReaderContext = (AtomicReaderContext) ctext;
      AtomicReader atomicReader = atomicReaderContext.reader();
      if (atomicReader instanceof SegmentReader) {
        SegmentReader segmentReader = (SegmentReader) atomicReader;
        return segmentReader.directory();
      }
    }
    return null;
  }
View Full Code Here

Examples of org.apache.lucene.index.SegmentReader.directory()

  private Directory getDirectory(AtomicReader atomicReader, String segmentName, String context) {
    if (atomicReader instanceof SegmentReader) {
      SegmentReader segmentReader = (SegmentReader) atomicReader;
      if (segmentReader.getSegmentName().equals(segmentName)) {
        return segmentReader.directory();
      }
    }
    return null;
  }
View Full Code Here

Examples of org.apache.lucene.index.SegmentReader.directory()

  public Map<String, List<IndexTracerResult>> sampleIndex(AtomicReader atomicReader, String context) throws IOException {
    Map<String, List<IndexTracerResult>> results = new HashMap<String, List<IndexTracerResult>>();
    if (atomicReader instanceof SegmentReader) {
      SegmentReader segmentReader = (SegmentReader) atomicReader;
      Directory directory = segmentReader.directory();
      if (!(directory instanceof TraceableDirectory)) {
        LOG.info("Context [{1}] cannot warmup directory [{0}] needs to be a TraceableDirectory.", directory, context);
        return results;
      }
      IndexTracer tracer = new IndexTracer((TraceableDirectory) directory, _maxSampleSize);
View Full Code Here

Examples of org.elasticsearch.index.store.Store.directory()

                recoveryStatus.renameAllTempFiles();
                final Store store = recoveryStatus.store();
                // now write checksums
                recoveryStatus.legacyChecksums().write(store);

                for (String existingFile : store.directory().listAll()) {
                    // don't delete snapshot file, or the checksums file (note, this is extra protection since the Store won't delete checksum)
                    if (!request.snapshotFiles().contains(existingFile) && !Store.isChecksum(existingFile)) {
                        try {
                            store.directory().deleteFile(existingFile);
                        } catch (Exception e) {
View Full Code Here

Examples of org.hivedb.Hive.directory()

        throw new RuntimeException("Can't find WEATHER_REPORT table on node " + node.getUri());
      }
    }
    save(factoryBuilder, report);
    Hive hive = getHive();
    assertTrue(hive.directory().doesResourceIdExist("WeatherReport", report.getReportId()));
    assertTrue(hive.directory().doesResourceIdExist("Temperature", report.getTemperature()));   
  }
 
  @Test
  public void testInsertFail() throws Exception {
View Full Code Here

Examples of org.hivedb.Hive.directory()

      }
    }
    save(factoryBuilder, report);
    Hive hive = getHive();
    assertTrue(hive.directory().doesResourceIdExist("WeatherReport", report.getReportId()));
    assertTrue(hive.directory().doesResourceIdExist("Temperature", report.getTemperature()));   
  }
 
  @Test
  public void testInsertFail() throws Exception {
    HiveSessionFactoryBuilderImpl factoryBuilder = getHiveSessionFactoryBuilder();
View Full Code Here

Examples of org.hivedb.Hive.directory()

      }
    }
    doInTransactionAndFailBeforeCommit(callback, session);
   
    Hive hive = getHive();
    assertFalse(hive.directory().doesResourceIdExist("WeatherReport", report.getReportId()));
    assertFalse(hive.directory().doesResourceIdExist("Temperature", report.getTemperature()));   
    assertTrue(factoryBuilder.getDefaultInterceptor().isTransient(report));
  }
 
  @Test
View Full Code Here

Examples of org.hivedb.Hive.directory()

    }
    doInTransactionAndFailBeforeCommit(callback, session);
   
    Hive hive = getHive();
    assertFalse(hive.directory().doesResourceIdExist("WeatherReport", report.getReportId()));
    assertFalse(hive.directory().doesResourceIdExist("Temperature", report.getTemperature()));   
    assertTrue(factoryBuilder.getDefaultInterceptor().isTransient(report));
  }
 
  @Test
  public void testInsertAndRetrieve() throws Exception {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.