@Override public void incCounterValue(String name, long delta) { this.instance.get().incCounterValue(name, delta); }
void bookKeeperWriteCompleted(int length, Duration elapsed) { this.writeLatency.reportSuccessEvent(elapsed); DYNAMIC_LOGGER.incCounterValue(MetricsNames.BK_WRITE_BYTES, length); } }
/** * This method increments the global and Stream-specific counters of Stream deletions and reports the latency of * the operation. * * @param scope Scope. * @param streamName Name of the Stream. * @param latency Latency of the deleteStream operation. */ public void deleteStream(String scope, String streamName, Duration latency) { DYNAMIC_LOGGER.incCounterValue(DELETE_STREAM, 1); deleteStreamLatency.reportSuccessValue(latency.toMillis()); }
/** * This method increments the global counter of failed Stream creations in the system as well as the failed creation * attempts for this specific Stream. * * @param scope Scope. * @param streamName Name of the Stream. */ public void createStreamFailed(String scope, String streamName) { DYNAMIC_LOGGER.incCounterValue(globalMetricName(CREATE_STREAM_FAILED), 1); DYNAMIC_LOGGER.incCounterValue(nameFromStream(CREATE_STREAM_FAILED, scope, streamName), 1); }
/** * This method increments the counter of failed Stream seal operations in the system as well as the failed seal * attempts for this specific Stream. * * @param scope Scope. * @param streamName Name of the Stream. */ public void sealStreamFailed(String scope, String streamName) { DYNAMIC_LOGGER.incCounterValue(globalMetricName(SEAL_STREAM_FAILED), 1); DYNAMIC_LOGGER.incCounterValue(nameFromStream(SEAL_STREAM_FAILED, scope, streamName), 1); }
/** * This method increments the counter of failed Stream update operations in the system as well as the failed * update attempts for this specific Stream. * * @param scope Scope. * @param streamName Name of the Stream. */ public void updateStreamFailed(String scope, String streamName) { DYNAMIC_LOGGER.incCounterValue(globalMetricName(UPDATE_STREAM_FAILED), 1); DYNAMIC_LOGGER.incCounterValue(nameFromStream(UPDATE_STREAM_FAILED, scope, streamName), 1); }
/** * This method increments the global, Stream-related and Transaction-related counters of failed abort operations. * * @param scope Scope. * @param streamName Name of the Stream. * @param txnId Transaction id. */ public void abortTransactionFailed(String scope, String streamName, String txnId) { DYNAMIC_LOGGER.incCounterValue(globalMetricName(ABORT_TRANSACTION_FAILED), 1); DYNAMIC_LOGGER.incCounterValue(nameFromStream(ABORT_TRANSACTION_FAILED, scope, streamName), 1); DYNAMIC_LOGGER.incCounterValue(nameFromTransaction(ABORT_TRANSACTION_FAILED, scope, streamName, txnId), 1); }
private void reportContainerFailovers(Set<Integer> failedContainers) { DYNAMIC_LOGGER.incCounterValue(globalMetricName(CONTAINER_FAILOVERS), failedContainers.size()); for (Integer containerId: failedContainers) { DYNAMIC_LOGGER.incCounterValue(nameFromContainer(CONTAINER_FAILOVERS, containerId), 1); } } }
static void get(long elapsedMillis, long getDataSize) { DYNAMIC_LOGGER.incCounterValue(MetricsNames.CACHE_READ_BYTES, getDataSize); GET_LATENCY.reportSuccessValue(elapsedMillis); } }
/** * This method increments the counter of failed Stream deletions in the system as well as the failed deletion * attempts for this specific Stream. * * @param scope Scope. * @param streamName Name of the Stream. */ public void deleteStreamFailed(String scope, String streamName) { DYNAMIC_LOGGER.incCounterValue(globalMetricName(DELETE_STREAM_FAILED), 1); DYNAMIC_LOGGER.incCounterValue(nameFromStream(DELETE_STREAM_FAILED, scope, streamName), 1); }
/** * This method increments the global and Stream-related counters of failed Transaction create operations. * * @param scope Scope. * @param streamName Name of the Stream. */ public void createTransactionFailed(String scope, String streamName) { DYNAMIC_LOGGER.incCounterValue(globalMetricName(CREATE_TRANSACTION_FAILED), 1); DYNAMIC_LOGGER.incCounterValue(nameFromStream(CREATE_TRANSACTION_FAILED, scope, streamName), 1); }
/** * This method increments the global, Stream-related and Transaction-related counters of failed commit operations. * * @param scope Scope. * @param streamName Name of the Stream. * @param txnId Transaction id. */ public void commitTransactionFailed(String scope, String streamName, String txnId) { DYNAMIC_LOGGER.incCounterValue(globalMetricName(COMMIT_TRANSACTION_FAILED), 1); DYNAMIC_LOGGER.incCounterValue(nameFromStream(COMMIT_TRANSACTION_FAILED, scope, streamName), 1); DYNAMIC_LOGGER.incCounterValue(nameFromTransaction(COMMIT_TRANSACTION_FAILED, scope, streamName, txnId), 1); }
/** * This method increments the counter of failed Stream truncate operations in the system as well as the failed * truncate attempts for this specific Stream. * * @param scope Scope. * @param streamName Name of the Stream. */ public void truncateStreamFailed(String scope, String streamName) { DYNAMIC_LOGGER.incCounterValue(globalMetricName(TRUNCATE_STREAM_FAILED), 1); DYNAMIC_LOGGER.incCounterValue(nameFromStream(TRUNCATE_STREAM_FAILED, scope, streamName), 1); }
/** * This method increments the global and Stream-related counters of aborted Transactions and reports the latency * of the operation. * * @param scope Scope. * @param streamName Name of the Stream. * @param latency Latency of the abort Transaction operation. */ public void abortTransaction(String scope, String streamName, Duration latency) { DYNAMIC_LOGGER.incCounterValue(globalMetricName(ABORT_TRANSACTION), 1); DYNAMIC_LOGGER.incCounterValue(nameFromStream(ABORT_TRANSACTION, scope, streamName), 1); abortTransactionLatency.reportSuccessValue(latency.toMillis()); }
/** * This method increments the global and Stream-related counters of created Transactions and reports the latency of * the operation. * * @param scope Scope. * @param streamName Name of the Stream. * @param latency Latency of the create Transaction operation. */ public void createTransaction(String scope, String streamName, Duration latency) { DYNAMIC_LOGGER.incCounterValue(globalMetricName(CREATE_TRANSACTION), 1); DYNAMIC_LOGGER.incCounterValue(nameFromStream(CREATE_TRANSACTION, scope, streamName), 1); createTransactionLatency.reportSuccessValue(latency.toMillis()); }
/** * This method increments the global and Stream-specific counters of Stream updates and reports the latency of the * operation. * * @param scope Scope. * @param streamName Name of the Stream. * @param latency Latency of the updateStream operation. */ public void updateStream(String scope, String streamName, Duration latency) { DYNAMIC_LOGGER.incCounterValue(globalMetricName(UPDATE_STREAM), 1); DYNAMIC_LOGGER.incCounterValue(nameFromStream(UPDATE_STREAM, scope, streamName), 1); updateStreamLatency.reportSuccessValue(latency.toMillis()); }
/** * This method increments the global and Stream-specific counters of Stream truncations and reports the latency of * the operation. * * @param scope Scope. * @param streamName Name of the Stream. * @param latency Latency of the truncateStream operation. */ public void truncateStream(String scope, String streamName, Duration latency) { DYNAMIC_LOGGER.incCounterValue(globalMetricName(TRUNCATE_STREAM), 1); DYNAMIC_LOGGER.incCounterValue(nameFromStream(TRUNCATE_STREAM, scope, streamName), 1); truncateStreamLatency.reportSuccessValue(latency.toMillis()); }
/** * This method increments the global and Stream-related counters of committed Transactions and reports the latency * of the operation. * * @param scope Scope. * @param streamName Name of the Stream. * @param latency Latency of the commit Transaction operation. */ public void commitTransaction(String scope, String streamName, Duration latency) { DYNAMIC_LOGGER.incCounterValue(globalMetricName(COMMIT_TRANSACTION), 1); DYNAMIC_LOGGER.incCounterValue(nameFromStream(COMMIT_TRANSACTION, scope, streamName), 1); commitTransactionLatency.reportSuccessValue(latency.toMillis()); }
/** * This method increments the global and Stream-specific counters of seal Stream operations, set the number of open * Transactions to 0, and reports the latency of the operation. * * @param scope Scope. * @param streamName Name of the Stream. * @param latency Latency of the sealStream operation. */ public void sealStream(String scope, String streamName, Duration latency) { DYNAMIC_LOGGER.incCounterValue(SEAL_STREAM, 1); DYNAMIC_LOGGER.reportGaugeValue(nameFromStream(OPEN_TRANSACTIONS, scope, streamName), 0); sealStreamLatency.reportSuccessValue(latency.toMillis()); }
private void reportHostFailures(Host failedHost) { DYNAMIC_LOGGER.incCounterValue(globalMetricName(SEGMENT_STORE_HOST_FAILURES), 1); DYNAMIC_LOGGER.incCounterValue(nameFromHost(SEGMENT_STORE_HOST_FAILURES, failedHost.toString()), 1); // Set to 0 the number of containers for the failed host. DYNAMIC_LOGGER.reportGaugeValue(nameFromHost(SEGMENT_STORE_HOST_CONTAINER_COUNT, failedHost.toString()), 0); }