Examples of HourGlassScheduler


Examples of proj.zoie.hourglass.impl.HourGlassScheduler

    return;
  }
  private void oneTest(File idxDir, String schedule, long numTestContent) throws IOException, InterruptedException
  {
    DefaultZoieVersionFactory defaultZoieVersionFactory = new DefaultZoieVersionFactory();
    HourglassDirectoryManagerFactory<DefaultZoieVersion> factory = new HourglassDirectoryManagerFactory<DefaultZoieVersion>(idxDir, new HourGlassScheduler(HourGlassScheduler.FREQUENCY.MINUTELY, schedule, 100), defaultZoieVersionFactory);
    ZoieConfig<DefaultZoieVersion> zConfig = new ZoieConfig<DefaultZoieVersion>(defaultZoieVersionFactory);
    zConfig.setBatchSize(3);
    zConfig.setBatchDelay(10);
    zConfig.setFreshness(10);
    Hourglass<IndexReader, String,DefaultZoieVersion> hourglass = new Hourglass<IndexReader, String,DefaultZoieVersion>(factory, new HourglassTestInterpreter(), new IndexReaderDecorator<IndexReader>(){
View Full Code Here

Examples of proj.zoie.hourglass.impl.HourGlassScheduler

    }
    // format "ss mm hh" meaning at hh:mm:ss time of the day, we roll forward for DAILY rolling
    // if it is hourly rolling, it means at mm:ss time of the hour, we roll forward
    // if it is MINUTELY, it means at ss seond of the minute, we roll forward.
    ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(1);
    HourGlassScheduler scheduler = new HourGlassScheduler(frequency, schedule, appendOnly, trimThreshold);
    HourglassDirectoryManagerFactory dirmgr = new HourglassDirectoryManagerFactory(partDir, scheduler,_dirMode);
    log.info("creating Hourglass for nodeId: " + nodeId + " partition: " + partitionId);
    return new Hourglass<BoboIndexReader,T>(dirmgr, _interpreter, _indexReaderDecorator, _zoieConfig, hourglassListeners, executor);
  }
View Full Code Here

Examples of proj.zoie.hourglass.impl.HourGlassScheduler

    return;
  }

  private void modifyTest(File idxDir, String schedule) throws IOException, InterruptedException {
    HourglassDirectoryManagerFactory factory = new HourglassDirectoryManagerFactory(idxDir,
        new HourGlassScheduler(HourGlassScheduler.FREQUENCY.MINUTELY, schedule, false, 100));
    ZoieConfig zConfig = new ZoieConfig();
    zConfig.setBatchSize(100000);
    zConfig.setMaxBatchSize(100000);
    zConfig.setBatchDelay(30000);
    zConfig.setFreshness(100);
View Full Code Here

Examples of proj.zoie.hourglass.impl.HourGlassScheduler

  }

  private void oneTest(File idxDir, String schedule, long numTestContent, boolean appendOnly)
      throws IOException, InterruptedException {
    HourglassDirectoryManagerFactory factory = new HourglassDirectoryManagerFactory(idxDir,
        new HourGlassScheduler(HourGlassScheduler.FREQUENCY.MINUTELY, schedule, appendOnly, 100));
    ZoieConfig zConfig = new ZoieConfig();
    zConfig.setBatchSize(100000);
    zConfig.setMaxBatchSize(100000);
    zConfig.setBatchDelay(30000);
    zConfig.setFreshness(100);
View Full Code Here

Examples of proj.zoie.hourglass.impl.HourGlassScheduler

  @SuppressWarnings("rawtypes")
  private void doTrimmingTest(File idxDir, String schedule, int trimThreshold) throws Exception {
    HourglassDirectoryManagerFactory factory = new HourglassDirectoryManagerFactory(
        idxDir,
        new HourGlassScheduler(HourGlassScheduler.FREQUENCY.MINUTELY, schedule, true, trimThreshold) {
          volatile Long nextTime;

          @Override
          protected Calendar getNextRoll() {
            if (nextTime == null) {
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.