Examples of currentTime()


Examples of org.apache.accumulo.server.util.time.BaseRelativeTime.currentTime()

    // Ten seconds into the past
    advice.value -= 10000;
   
    BaseRelativeTime brt = new BaseRelativeTime(local);
    brt.updateTime(advice.value);
    long once = brt.currentTime();
    assertTrue(once < local.value);
    brt.updateTime(advice.value);
    long twice = brt.currentTime();
    assertTrue("Time cannot go backwards", once <= twice);
    brt.updateTime(advice.value - 10000);
View Full Code Here

Examples of org.apache.accumulo.server.util.time.BaseRelativeTime.currentTime()

    BaseRelativeTime brt = new BaseRelativeTime(local);
    brt.updateTime(advice.value);
    long once = brt.currentTime();
    assertTrue(once < local.value);
    brt.updateTime(advice.value);
    long twice = brt.currentTime();
    assertTrue("Time cannot go backwards", once <= twice);
    brt.updateTime(advice.value - 10000);
    assertTrue("Time cannot go backwards", once <= twice);
  }
 
View Full Code Here

Examples of org.apache.hadoop.hbase.util.IncrementingEnvironmentEdge.currentTime()

      Collection<StoreFile> sfs = this.store.getStorefiles();
      // Ensure i files are gone.
      assertEquals(storeFileNum - i, sfs.size());
      // Ensure only non-expired files remain.
      for (StoreFile sf : sfs) {
        assertTrue(sf.getReader().getMaxTimestamp() >= (edge.currentTime() - storeTtl));
      }
      // Let the next store file expired.
      edge.incrementTime(sleepTime);
    }
    assertNull(this.store.requestCompaction());
View Full Code Here

Examples of org.apache.hadoop.hbase.util.IncrementingEnvironmentEdge.currentTime()

    assertNull(this.store.requestCompaction());
    Collection<StoreFile> sfs = this.store.getStorefiles();
    // Assert the last expired file is not removed.
    assertEquals(1, sfs.size());
    long ts = sfs.iterator().next().getReader().getMaxTimestamp();
    assertTrue(ts < (edge.currentTime() - storeTtl));
  }

  @Test
  public void testLowestModificationTime() throws Exception {
    Configuration conf = HBaseConfiguration.create();
View Full Code Here

Examples of org.apache.hadoop.hbase.util.IncrementingEnvironmentEdge.currentTime()

      // Ensure i files are gone.
      if (minVersions == 0) {
        assertEquals(storeFileNum - i, sfs.size());
        // Ensure only non-expired files remain.
        for (StoreFile sf : sfs) {
          assertTrue(sf.getReader().getMaxTimestamp() >= (edge.currentTime() - storeTtl));
        }
      } else {
        assertEquals(storeFileNum, sfs.size());
      }
      // Let the next store file expired.
View Full Code Here

Examples of org.apache.hadoop.hbase.util.IncrementingEnvironmentEdge.currentTime()

    // Assert the last expired file is not removed.
    if (minVersions == 0) {
      assertEquals(1, sfs.size());
    }
    long ts = sfs.iterator().next().getReader().getMaxTimestamp();
    assertTrue(ts < (edge.currentTime() - storeTtl));
  }

  @Test
  public void testLowestModificationTime() throws Exception {
    Configuration conf = HBaseConfiguration.create();
View Full Code Here

Examples of org.apache.hadoop.hbase.util.ManualEnvironmentEdge.currentTime()

    ServerName diffLocation = ServerName.valueOf("127.0.0.1", 2, 0);

    ManualEnvironmentEdge timeMachine = new ManualEnvironmentEdge();
    EnvironmentEdgeManager.injectEdge(timeMachine);
    try {
      long timeBase = timeMachine.currentTime();
      long largeAmountOfTime = ANY_PAUSE * 1000;
      ConnectionManager.ServerErrorTracker tracker =
          new ConnectionManager.ServerErrorTracker(largeAmountOfTime, 100);

      // The default backoff is 0.
View Full Code Here

Examples of org.apache.hadoop.hbase.util.ManualEnvironmentEdge.currentTime()

    ServerName diffLocation = ServerName.valueOf("127.0.0.1", 2, 0);

    ManualEnvironmentEdge timeMachine = new ManualEnvironmentEdge();
    EnvironmentEdgeManager.injectEdge(timeMachine);
    try {
      long timeBase = timeMachine.currentTime();
      long largeAmountOfTime = ANY_PAUSE * 1000;
      ConnectionManager.ServerErrorTracker tracker =
          new ConnectionManager.ServerErrorTracker(largeAmountOfTime, 100);

      // The default backoff is 0.
View Full Code Here

Examples of org.broadinstitute.gatk.utils.SimpleTimer.currentTime()

            final SimpleTimer timer = new SimpleTimer().start();

            if ( totalNumberOfFiles > 0 ) logger.info("Initializing SAMRecords in serial");
            final int tickSize = 50;
            int nExecutedTotal = 0;
            long lastTick = timer.currentTime();
            for(final SAMReaderID readerID: readerIDs) {
                final ReaderInitializer init = new ReaderInitializer(readerID).call();

                checkForUnsupportedBamFile(init.reader.getFileHeader());
View Full Code Here

Examples of org.broadinstitute.gatk.utils.SimpleTimer.currentTime()

                }

                logger.debug(String.format("Processing file (%d of %d) %s...", readerNumber++, totalNumberOfFiles,  readerID.samFile));
                readers.put(init.readerID,init.reader);
                if ( ++nExecutedTotal % tickSize == 0) {
                    double tickInSec = (timer.currentTime() - lastTick) / 1000.0;
                    printReaderPerformance(nExecutedTotal, tickSize, totalNumberOfFiles, timer, tickInSec);
                    lastTick = timer.currentTime();
                }
            }
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.