-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce coordinator logs #17566
Reduce coordinator logs #17566
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,14 +76,10 @@ | |
public class HttpLoadQueuePeon implements LoadQueuePeon | ||
{ | ||
public static final TypeReference<List<DataSegmentChangeRequest>> REQUEST_ENTITY_TYPE_REF = | ||
new TypeReference<List<DataSegmentChangeRequest>>() | ||
{ | ||
}; | ||
new TypeReference<>() {}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Java 9+ supports diamond operator with anonymous classes. cc: @Akshat-Jain There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have raised PR: #17567. The PR isn't limited to just anonymous class usages, but rather does it for all usages where explicit type argument was redundant. I don't see an easy way to identify usages only for anonymous classes, and I didn't see any reason why we shouldn't do it for other usages as well, so ended up doing that. Hope that works! Appreciate your review on the PR, thanks! |
||
|
||
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); | ||
|
||
|
@@ -390,8 +386,10 @@ public void stop() | |
stopped = true; | ||
|
||
// Cancel all queued requests | ||
kfaraz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. log only when non-empty. |
||
} | ||
|
||
segmentsToDrop.clear(); | ||
segmentsToLoad.clear(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this log doesn't provide much useful info and can remain a debug