@Override public void incr() { incr(1); }
@Override public void decr() { decr(1); }
metrics.renewalFailures.set(0); rp = null; } catch (InterruptedException ie) { + "command for {}. (TGT end time:{}, renewalFailures: {}," + "renewalFailuresTotal: {})", getUserName(), tgtEndTime, metrics.renewalFailures.value(), metrics.renewalFailuresTotal.value(), ie); if (rp == null) { return; metrics.renewalFailures.incr();
@Override public void snapshot(MetricsRecordBuilder builder, boolean all) { if (all || changed()) { builder.addGauge(info(), value()); clearChanged(); } } }
public void allocateContainer(Resource res) { allocatedContainers.incr(); allocatedMB = allocatedMB + res.getMemorySize(); allocatedGB.set((int)Math.ceil(allocatedMB/1024d)); availableMB = availableMB - res.getMemorySize(); availableGB.set((int)Math.floor(availableMB/1024d)); allocatedVCores.incr(res.getVirtualCores()); availableVCores.decr(res.getVirtualCores()); }
public void runAppAttempt(ApplicationId appId, String user) { runBuckets.add(appId, System.currentTimeMillis()); appsRunning.incr(); appsPending.decr(); QueueMetrics userMetrics = getUserMetrics(user); if (userMetrics != null) { userMetrics.runAppAttempt(appId, user); } if (parent != null) { parent.runAppAttempt(appId, user); } }
@Override public Integer getValue() { return mm.value(); } }
public void setClusterNodeCount(int value) { clusterNodeCount.set(value); }
/** * Create a mutable integer gauge * @param info metadata of the metric * @param iVal initial value * @return a new gauge object */ public synchronized MutableGaugeInt newGauge(MetricsInfo info, int iVal) { checkMetricName(info.name()); MutableGaugeInt ret = new MutableGaugeInt(info, iVal); metricsMap.put(info.name(), ret); return ret; }
public void allocateContainer(Resource res) { allocatedContainers.incr(); allocatedMB = allocatedMB + res.getMemory(); allocatedGB.set((int)Math.ceil(allocatedMB/1024d)); availableMB = availableMB - res.getMemory(); availableGB.set((int)Math.floor(availableMB/1024d)); allocatedVCores.incr(res.getVirtualCores()); availableVCores.decr(res.getVirtualCores()); }
public void runAppAttempt(ApplicationId appId, String user) { runBuckets.add(appId, System.currentTimeMillis()); appsRunning.incr(); appsPending.decr(); QueueMetrics userMetrics = getUserMetrics(user); if (userMetrics != null) { userMetrics.runAppAttempt(appId, user); } if (parent != null) { parent.runAppAttempt(appId, user); } }
/** * Get time for next login retry. This will allow the thread to retry with * exponential back-off, until tgt endtime. * Last retry is {@link #kerberosMinSecondsBeforeRelogin} before endtime. * * @param tgtEndTime EndTime of the tgt. * @param now Current time. * @param rp The retry policy. * @return Time for next login retry. */ @VisibleForTesting static long getNextTgtRenewalTime(final long tgtEndTime, final long now, final RetryPolicy rp) throws Exception { final long lastRetryTime = tgtEndTime - kerberosMinSecondsBeforeRelogin; final RetryPolicy.RetryAction ra = rp.shouldRetry(null, metrics.renewalFailures.value(), 0, false); return Math.min(lastRetryTime, now + ra.delayMillis); }
public void setWmTotalGuaranteed(int totalGuaranteed) { wmTotalGuaranteedCount.set(totalGuaranteed); }
@Override public void snapshot(MetricsRecordBuilder builder, boolean all) { if (all || changed()) { builder.addGauge(info(), value()); clearChanged(); } } }
/** * Create a mutable integer gauge * @param info metadata of the metric * @param iVal initial value * @return a new gauge object */ public MutableGaugeInt newGauge(MetricsInfo info, int iVal) { MutableGaugeInt ret = new MutableGaugeInt(info, iVal); return addNewMetricIfAbsent(info.name(), ret, MutableGaugeInt.class); }
public void allocateContainer(Resource res) { allocatedContainers.incr(); allocatedMB = allocatedMB + res.getMemory(); allocatedGB.set((int)Math.ceil(allocatedMB/1024d)); availableMB = availableMB - res.getMemory(); availableGB.set((int)Math.floor(availableMB/1024d)); allocatedVCores.incr(res.getVirtualCores()); availableVCores.decr(res.getVirtualCores()); }
public void incrDataNodeActiveXceiversCount() { dataNodeActiveXceiversCount.incr(); }
@Override public void operationComplete(ChannelFuture future) throws Exception { if (future.isSuccess()) { shuffleOutputsOK.incr(); } else { shuffleOutputsFailed.incr(); } shuffleConnections.decr(); } }
public void runAppAttempt(ApplicationId appId, String user) { runBuckets.add(appId, System.currentTimeMillis()); appsRunning.incr(); appsPending.decr(); QueueMetrics userMetrics = getUserMetrics(user); if (userMetrics != null) { userMetrics.runAppAttempt(appId, user); } if (parent != null) { parent.runAppAttempt(appId, user); } }