Package org.apache.accumulo.core.util

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


   
    for (String c : columns) {
      scanner.fetchColumnFamily(new Text(c));
    }
   
    Stat rowLen = new Stat();
    Stat cfLen = new Stat();
    Stat cqLen = new Stat();
    Stat cvLen = new Stat();
    Stat valLen = new Stat();
    Stat colsPerRow = new Stat();
   
    Text lastRow = null;
    int colsPerRowCount = 0;
   
    for (Entry<Key,Value> entry : scanner) {
     
      Key key = entry.getKey();
      Text row = key.getRow();
     
      if (lastRow == null) {
        lastRow = row;
      }
     
      if (!lastRow.equals(row)) {
        colsPerRow.addStat(colsPerRowCount);
        lastRow = row;
        colsPerRowCount = 0;
      }
     
      colsPerRowCount++;
View Full Code Here


      scanner.setBatchSize(scanBatchSize);
      scanner.fetchColumnFamily(Constants.METADATA_DATAFILE_COLUMN_FAMILY);
      scanner.addScanIterator(new IteratorSetting(1000, "cfc", ColumnFamilyCounter.class.getName()));
      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

   
    for (String c : columns) {
      scanner.fetchColumnFamily(new Text(c));
    }
   
    Stat rowLen = new Stat();
    Stat cfLen = new Stat();
    Stat cqLen = new Stat();
    Stat cvLen = new Stat();
    Stat valLen = new Stat();
    Stat colsPerRow = new Stat();
   
    Text lastRow = null;
    int colsPerRowCount = 0;
   
    for (Entry<Key,Value> entry : scanner) {
     
      Key key = entry.getKey();
      Text row = key.getRow();
     
      if (lastRow == null) {
        lastRow = row;
      }
     
      if (!lastRow.equals(row)) {
        colsPerRow.addStat(colsPerRowCount);
        lastRow = row;
        colsPerRowCount = 0;
      }
     
      colsPerRowCount++;
View Full Code Here

      Scanner scanner = conn.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
      scanner.fetchColumnFamily(Constants.METADATA_DATAFILE_COLUMN_FAMILY);
      scanner.addScanIterator(new IteratorSetting(1000, "cfc", ColumnFamilyCounter.class.getName()));
      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

      scanner.setBatchSize(scanBatchSize);
      scanner.fetchColumnFamily(DataFileColumnFamily.NAME);
      scanner.addScanIterator(new IteratorSetting(1000, "cfc", ColumnFamilyCounter.class.getName()));
      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

    System.out.println(s + ":" + wt);
   
    if (stats == null)
      return;

    Stat stat = stats.get(s);
    if (stat == null) {
      stat = new Stat();
      stats.put(s, stat);
    }
    stat.addStat(wt);
  }
View Full Code Here

   
    for (String c : columns) {
      scanner.fetchColumnFamily(new Text(c));
    }
   
    Stat rowLen = new Stat();
    Stat cfLen = new Stat();
    Stat cqLen = new Stat();
    Stat cvLen = new Stat();
    Stat valLen = new Stat();
    Stat colsPerRow = new Stat();
   
    Text lastRow = null;
    int colsPerRowCount = 0;
   
    for (Entry<Key,Value> entry : scanner) {
     
      Key key = entry.getKey();
      Text row = key.getRow();
     
      if (lastRow == null) {
        lastRow = row;
      }
     
      if (!lastRow.equals(row)) {
        colsPerRow.addStat(colsPerRowCount);
        lastRow = row;
        colsPerRowCount = 0;
      }
     
      colsPerRowCount++;
View Full Code Here

   
    for (String c : columns) {
      scanner.fetchColumnFamily(new Text(c));
    }
   
    Stat rowLen = new Stat();
    Stat cfLen = new Stat();
    Stat cqLen = new Stat();
    Stat cvLen = new Stat();
    Stat valLen = new Stat();
    Stat colsPerRow = new Stat();
   
    Text lastRow = null;
    int colsPerRowCount = 0;
   
    for (Entry<Key,Value> entry : scanner) {
     
      Key key = entry.getKey();
      Text row = key.getRow();
     
      if (lastRow == null) {
        lastRow = row;
      }
     
      if (!lastRow.equals(row)) {
        colsPerRow.addStat(colsPerRowCount);
        lastRow = row;
        colsPerRowCount = 0;
      }
     
      colsPerRowCount++;
View Full Code Here

      Scanner scanner = conn.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
      scanner.fetchColumnFamily(Constants.METADATA_DATAFILE_COLUMN_FAMILY);
      scanner.addScanIterator(new IteratorSetting(1000, "cfc", ColumnFamilyCounter.class.getName()));
      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

   
    for (String c : columns) {
      scanner.fetchColumnFamily(new Text(c));
    }
   
    Stat rowLen = new Stat();
    Stat cfLen = new Stat();
    Stat cqLen = new Stat();
    Stat cvLen = new Stat();
    Stat valLen = new Stat();
    Stat colsPerRow = new Stat();
   
    Text lastRow = null;
    int colsPerRowCount = 0;
   
    for (Entry<Key,Value> entry : scanner) {
     
      Key key = entry.getKey();
      Text row = key.getRow();
     
      if (lastRow == null) {
        lastRow = row;
      }
     
      if (!lastRow.equals(row)) {
        colsPerRow.addStat(colsPerRowCount);
        lastRow = row;
        colsPerRowCount = 0;
      }
     
      colsPerRowCount++;
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.