Package org.apache.accumulo.core.util

Examples of org.apache.accumulo.core.util.Stat


      Scanner scanner = conn.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
      scanner.fetchColumnFamily(Constants.METADATA_DATAFILE_COLUMN_FAMILY);
      scanner.setScanIterators(1000, ColumnFamilyCounter.class.getName(), "cfc");
      scanner.setRange(new KeyExtent(new Text(tableId), null, null).toMetadataRange());
     
      Stat s = new Stat();
     
      int count = 0;
      for (Entry<Key,Value> entry : scanner) {
        count++;
        s.addStat(Long.parseLong(entry.getValue().toString()));
      }
     
      if (count > 0)
        return String.format("%d %d %.3f %.3f", s.getMin(), s.getMax(), s.getAverage(), s.getStdDev());
      else
        return "0 0 0 0";
     
    }
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.util.Stat

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.