Skip to content

Reduce coordinator logs#17566

Merged
kfaraz merged 2 commits intoapache:masterfrom
kfaraz:cleanup_coordinator_logs
Dec 16, 2024
Merged

Reduce coordinator logs#17566
kfaraz merged 2 commits intoapache:masterfrom
kfaraz:cleanup_coordinator_logs

Conversation

@kfaraz
Copy link
Copy Markdown
Contributor

@kfaraz kfaraz commented Dec 13, 2024

No description provided.

} else {
// Ignore this skipInterval
log.warn(
log.debug(
Copy link
Copy Markdown
Contributor Author

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

new TypeReference<List<DataSegmentChangeRequest>>()
{
};
new TypeReference<>() {};
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Java 9+ supports diamond operator with anonymous classes.
Since we have dropped support for Java 8, we can use this syntax here (and in several other places in the code which can be done in a separate PR).

cc: @Akshat-Jain

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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!

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);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

log only when non-empty.

@kfaraz kfaraz requested a review from abhishekrb19 December 13, 2024 15:18
@kfaraz
Copy link
Copy Markdown
Contributor Author

kfaraz commented Dec 16, 2024

IT failures are unrelated.

@kfaraz kfaraz merged commit 0335bdd into apache:master Dec 16, 2024
@kfaraz kfaraz deleted the cleanup_coordinator_logs branch December 16, 2024 11:18
@adarshsanjeev adarshsanjeev added this to the 32.0.0 milestone Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants