Package org.apache.hadoop.hdfs.metrics.LookasideMetrics

Examples of org.apache.hadoop.hdfs.metrics.LookasideMetrics.LocalMetrics


    long maxSize = 5 * 1024;
    long evictPercent = 20;
    conf.setLong(LookasideCache.CACHESIZE, maxSize);
    conf.setLong(LookasideCache.CACHEEVICT_PERCENT,  evictPercent);
    LookasideCache cache = new LookasideCache(conf);
    LocalMetrics metrics = cache.getLocalMetrics();

    assertTrue(cache.getCacheMaxSize() == maxSize);
    assertTrue(cache.getCacheSize() == 0);
    assertTrue(cache.getCacheEvictPercent() == evictPercent);

View Full Code Here


    long maxSize = 5 * 1024;
    long evictPercent = 20;
    conf.setLong(LookasideCache.CACHESIZE, maxSize);
    conf.setLong(LookasideCache.CACHEEVICT_PERCENT,  evictPercent);
    LookasideCache cache = new LookasideCache(conf);
    LocalMetrics metrics = LookasideCache.getLocalMetrics();
    metrics.reset();

    assertTrue(cache.getCacheMaxSize() == maxSize);
    assertTrue(cache.getCacheSize() == 0);
    assertTrue(cache.getCacheEvictPercent() == evictPercent);

View Full Code Here

   * Metrics are locally gathers in the static structure called 'stats'.
   * These are returned here to the metrics module, and the local values
   * in 'stats' are zeroed out.
   */
  public static LocalMetrics copyZeroLocalMetrics() {
    return new LocalMetrics(localMetrics);
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hdfs.metrics.LookasideMetrics.LocalMetrics

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.