Suppress LeaseAssignmentManager excessive WARN logs when there is no issue (#1437)
This commit fixes https://github.com/awslabs/amazon-kinesis-client/issues/1407. The WARN level log statements should only be executed when a real problem had been detected.
This commit is contained in:
parent
ae9a433ebd
commit
68a7a9bf53
1 changed files with 2 additions and 2 deletions
|
|
@ -537,8 +537,8 @@ public final class LeaseAssignmentManager {
|
|||
.filter(workerMetrics -> !workerMetrics.isValidWorkerMetric())
|
||||
.map(WorkerMetricStats::getWorkerId)
|
||||
.collect(Collectors.toList());
|
||||
log.warn("List of workerIds with invalid entries : {}", listOfWorkerIdOfInvalidWorkerMetricsEntry);
|
||||
if (!listOfWorkerIdOfInvalidWorkerMetricsEntry.isEmpty()) {
|
||||
log.warn("List of workerIds with invalid entries : {}", listOfWorkerIdOfInvalidWorkerMetricsEntry);
|
||||
metricsScope.addData(
|
||||
"NumWorkersWithInvalidEntry",
|
||||
listOfWorkerIdOfInvalidWorkerMetricsEntry.size(),
|
||||
|
|
@ -567,8 +567,8 @@ public final class LeaseAssignmentManager {
|
|||
|
||||
final Map.Entry<List<Lease>, List<String>> leaseListResponse = leaseListFuture.join();
|
||||
this.leaseList = leaseListResponse.getKey();
|
||||
log.warn("Leases that failed deserialization : {}", leaseListResponse.getValue());
|
||||
if (!leaseListResponse.getValue().isEmpty()) {
|
||||
log.warn("Leases that failed deserialization : {}", leaseListResponse.getValue());
|
||||
MetricsUtil.addCount(
|
||||
metricsScope,
|
||||
"LeaseDeserializationFailureCount",
|
||||
|
|
|
|||
Loading…
Reference in a new issue