Examples of MetricsLongValue


Examples of org.apache.hadoop.metrics.util.MetricsLongValue

      new RegionServerDynamicMetrics();
    return metrics;
  }

  public synchronized void setNumericMetric(String name, long amt) {
    MetricsLongValue m = (MetricsLongValue)registry.get(name);
    if (m == null) {
      m = new MetricsLongValue(name, this.registry);
      this.needsUpdateMessage = true;
    }
    m.set(amt);
  }
View Full Code Here

Examples of org.apache.hadoop.metrics.util.MetricsLongValue

  private void initPlacementMetrics() {
    codecToMisplacedBlocks = new HashMap<String, Map<Integer, MetricsLongValue>>();
    for (Codec codec : Codec.getCodecs()) {
      Map<Integer, MetricsLongValue> m = new HashMap<Integer, MetricsLongValue>();
      for (int i = 0; i < MAX_MONITORED_MISPLACED_BLOCKS; ++i) {
        m.put(i, new MetricsLongValue(misplacedMetricHeader +
                                   "_" + codec.id + "_" + i, registry));
      }
      codecToMisplacedBlocks.put(codec.id, m);
    }
  }
View Full Code Here

Examples of org.apache.hadoop.metrics.util.MetricsLongValue

    if (corruptFiles == null) {
      String[] dirs = DistBlockIntegrityMonitor.getCorruptMonitorDirs(conf);
      corruptFiles = new HashMap<String, MetricsLongValue>();
      for (String dir: dirs) {
        String name = dir + "_corrupt_files";
        corruptFiles.put(dir, new MetricsLongValue(name, registry));
      }
    }
  }
View Full Code Here

Examples of org.apache.hadoop.metrics.util.MetricsLongValue

    if (underRedundantFiles == null) {
      String[] dirs = DistBlockIntegrityMonitor.getCorruptMonitorDirs(conf);
      underRedundantFiles = new HashMap<String, MetricsLongValue>();
      for (String dir: dirs) {
        String name = "under_redundant_files_" + dir;
        underRedundantFiles.put(dir, new MetricsLongValue(name, registry));
      }
      String name = "under_redundant_files_" + BlockIntegrityMonitor.OTHERS;
      underRedundantFiles.put(BlockIntegrityMonitor.OTHERS,
          new MetricsLongValue(name, registry));
    }
  }
View Full Code Here

Examples of org.apache.hadoop.metrics.util.MetricsLongValue

 
  private void createSourceMetrics(
      Map<String, Map<RaidState, MetricsLongValue>> m,
      String code, RaidState state, String name) {
    Map<RaidState, MetricsLongValue> innerMap = m.get(code);
    innerMap.put(state, new MetricsLongValue(name, registry));
  }
View Full Code Here

Examples of org.apache.hadoop.metrics.util.MetricsLongValue

      createParityMetrics(parityFiles, code, head + "files");
      createParityMetrics(parityBlocks, code, head + "blocks");
      createParityMetrics(parityBytes, code, head + "bytes");
      createParityMetrics(parityLogical, code, head + "logical");
      String savingName = ("saving_" + code).toLowerCase();
      savingForCode.put(code, new MetricsLongValue(savingName, registry));
    }
  }
View Full Code Here

Examples of org.apache.hadoop.metrics.util.MetricsLongValue

  }

  private void createParityMetrics(
      Map<String, MetricsLongValue> m,
      String code, String name) {
    m.put(code, new MetricsLongValue(name, registry));
  }
View Full Code Here

Examples of org.apache.hadoop.metrics.util.MetricsLongValue

        for (Entry<Integer, MetricsLongValue> e: codecStatsMap.entrySet()) {
          e.getValue().set(0);
        }
        for (Entry<Integer, Long> e : blockHistograms.get(id).entrySet()) {
          if (e.getKey() < RaidNodeMetrics.MAX_MONITORED_MISPLACED_BLOCKS - 1) {
            MetricsLongValue v = codecStatsMap.get(e.getKey());
            v.set(e.getValue());
          } else {
            extra += e.getValue();
          }
        }
        MetricsLongValue v = codecStatsMap.get(
            RaidNodeMetrics.MAX_MONITORED_MISPLACED_BLOCKS - 1);
        v.set(extra);
      }
    }
    lastBlockHistograms = blockHistograms;
    lastBlockHistogramsPerRack = blockHistogramsPerRack;
    lastUpdateFinishTime = RaidNode.now();
View Full Code Here

Examples of org.apache.hadoop.metrics.util.MetricsLongValue

        registry, "bytesWritten");
    txnsWritten = new MetricsTimeVaryingLong("txnsWritten_" + journalId,
        registry, "txnsWritten");
    syncTime = new MetricsTimeVaryingRate("syncTimes_" + journalId, registry);

    lastWriterEpoch = new MetricsLongValue("lastWriterEpoch_" + journalId,
        registry);
    lastPromisedEpoch = new MetricsLongValue("lastPromisedEpoch_" + journalId,
        registry);
    lastWrittenTxId = new MetricsLongValue("lastWrittenTxId_" + journalId,
        registry);
    currentTxnsLag = new MetricsLongValue("currentTxnsLag_" + journalId,
        registry);
   
    // http related metrics
    numGetJournalDoGet = new MetricsTimeVaryingLong("numGetEditsServletDoGet_"
        + journalId, registry);
View Full Code Here

Examples of org.apache.hadoop.metrics.util.MetricsLongValue

    writeEndToEndLatency = new MetricsTimeVaryingRate("writeEndToEndLatency_"
        + name, registry);
    writeRpcLatency = new MetricsTimeVaryingRate("writeRpcLatency_" + name,
        registry);

    currentQueuedEditsSizeBytes = new MetricsLongValue(
        "currentQueuedEditsSizeBytes_" + name, registry);
    currentLagTransactions = new MetricsLongValue("currentLagTransactions_"
        + name, registry);
    currentLagTimeMicros = new MetricsLongValue("currentLagTimeMicros_" + name,
        registry);
    isOutOfSync = new MetricsIntValue("isOutOfSync_" + name, registry);
  }
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.