prateekm commented on a change in pull request #1088: SAMZA-2259: Change
boolean gauges to integer
URL: https://github.com/apache/samza/pull/1088#discussion_r296394384
##########
File path:
samza-api/src/main/java/org/apache/samza/util/BlockingEnvelopeMap.java
##########
@@ -244,22 +244,22 @@ protected boolean isAtHead(SystemStreamPartition
systemStreamPartition) {
public class BlockingEnvelopeMapMetrics {
private final String group;
private final MetricsRegistry metricsRegistry;
- private final ConcurrentHashMap<SystemStreamPartition, Gauge<Boolean>>
noMoreMessageGaugeMap;
+ private final ConcurrentHashMap<SystemStreamPartition, Gauge<Integer>>
noMoreMessageGaugeMap;
private final ConcurrentHashMap<SystemStreamPartition, Counter>
blockingPollCountMap;
private final ConcurrentHashMap<SystemStreamPartition, Counter>
blockingPollTimeoutCountMap;
private final Counter pollCount;
public BlockingEnvelopeMapMetrics(String group, MetricsRegistry
metricsRegistry) {
this.group = group;
this.metricsRegistry = metricsRegistry;
- this.noMoreMessageGaugeMap = new
ConcurrentHashMap<SystemStreamPartition, Gauge<Boolean>>();
+ this.noMoreMessageGaugeMap = new
ConcurrentHashMap<SystemStreamPartition, Gauge<Integer>>();
this.blockingPollCountMap = new ConcurrentHashMap<SystemStreamPartition,
Counter>();
this.blockingPollTimeoutCountMap = new
ConcurrentHashMap<SystemStreamPartition, Counter>();
this.pollCount = metricsRegistry.newCounter(group, "poll-count");
}
public void initMetrics(SystemStreamPartition systemStreamPartition) {
- this.noMoreMessageGaugeMap.putIfAbsent(systemStreamPartition,
metricsRegistry.<Boolean>newGauge(group, "no-more-messages-" +
systemStreamPartition, false));
+ this.noMoreMessageGaugeMap.putIfAbsent(systemStreamPartition,
metricsRegistry.<Integer>newGauge(group, "no-more-messages-" +
systemStreamPartition, 0));
Review comment:
Nitpick: Can probably remove the `<Integer>`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services