Package org.apache.blur.lucene.store.refcounter

Examples of org.apache.blur.lucene.store.refcounter.DirectoryReferenceCounter


    Directory directory = wrap(new RAMDirectory());
    DirectoryReferenceFileGC gc = new DirectoryReferenceFileGC();
    gc.init();
    IndexInputCloser closer = new IndexInputCloser();
    closer.init();
    DirectoryReferenceCounter counter = new DirectoryReferenceCounter(directory, gc, closer);
    IndexWriterConfig conf = new IndexWriterConfig(LUCENE_VERSION, new KeywordAnalyzer());
    IndexWriter writer = new IndexWriter(counter, conf);
    int size = 100;
    IndexReader[] readers = new IndexReader[size];
    for (int i = 0; i < size; i++) {
View Full Code Here


    TieredMergePolicy mergePolicy = (TieredMergePolicy) conf.getMergePolicy();
    mergePolicy.setUseCompoundFile(false);
    conf.setMergeScheduler(mergeScheduler.getMergeScheduler());

    DirectoryReferenceCounter referenceCounter = new DirectoryReferenceCounter(directory, gc, closer);
    // This directory allows for warm up by adding tracing ability.
    TraceableDirectory dir = new TraceableDirectory(referenceCounter);
   
    SimpleTimer simpleTimer = new SimpleTimer();
    simpleTimer.start("writerOpen");
View Full Code Here

TOP

Related Classes of org.apache.blur.lucene.store.refcounter.DirectoryReferenceCounter

Copyright © 2018 www.massapicom. 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.