Reduce coordinator logs (#17566)

This commit is contained in:
Kashif Faraz 2024-12-16 03:18:39 -08:00 committed by GitHub
parent 29ab12ccd7
commit 0335bdd90f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 16 deletions

View File

@ -491,10 +491,9 @@ public class DataSourceCompactibleSegmentIterator implements CompactionSegmentIt
remainingStart = skipInterval.getEnd();
} else {
// Ignore this skipInterval
log.warn(
log.debug(
"skipInterval[%s] is not contained in remainingInterval[%s]",
skipInterval,
new Interval(remainingStart, remainingEnd)
skipInterval, new Interval(remainingStart, remainingEnd)
);
}
}

View File

@ -76,14 +76,10 @@ import java.util.concurrent.atomic.AtomicReference;
public class HttpLoadQueuePeon implements LoadQueuePeon
{
public static final TypeReference<List<DataSegmentChangeRequest>> REQUEST_ENTITY_TYPE_REF =
new TypeReference<List<DataSegmentChangeRequest>>()
{
};
new TypeReference<>() {};
public static final TypeReference<List<DataSegmentChangeResponse>> RESPONSE_ENTITY_TYPE_REF =
new TypeReference<List<DataSegmentChangeResponse>>()
{
};
new TypeReference<>() {};
private static final EmittingLogger log = new EmittingLogger(HttpLoadQueuePeon.class);
@ -389,9 +385,10 @@ public class HttpLoadQueuePeon implements LoadQueuePeon
log.info("Stopping load queue peon for server[%s].", serverId);
stopped = true;
// Cancel all queued requests
queuedSegments.forEach(holder -> onRequestCompleted(holder, RequestStatus.CANCELLED));
log.info("Cancelled [%d] requests queued on server [%s].", queuedSegments.size(), serverId);
if (!queuedSegments.isEmpty()) {
queuedSegments.forEach(holder -> onRequestCompleted(holder, RequestStatus.CANCELLED));
log.info("Cancelled [%d] requests queued on server[%s].", queuedSegments.size(), serverId);
}
segmentsToDrop.clear();
segmentsToLoad.clear();

View File

@ -19,7 +19,6 @@
package org.apache.druid.server.coordinator.loading;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
@ -350,9 +349,8 @@ public class HttpLoadQueuePeonTest
httpResponseHandler.handleResponse(httpResponse, null);
try {
List<DataSegmentChangeRequest> changeRequests = MAPPER.readValue(
request.getContent().array(), new TypeReference<List<DataSegmentChangeRequest>>()
{
}
request.getContent().array(),
HttpLoadQueuePeon.REQUEST_ENTITY_TYPE_REF
);
List<DataSegmentChangeResponse> statuses = new ArrayList<>(changeRequests.size());