Skip to content
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

[SPARK-49749][CORE] Change log level to debug in BlockManagerInfo #48197

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1059,13 +1059,13 @@ private[spark] class BlockManagerInfo(
_blocks.put(blockId, blockStatus)
_remainingMem -= memSize
if (blockExists) {
logInfo(log"Updated ${MDC(BLOCK_ID, blockId)} in memory on " +
logDebug(log"Updated ${MDC(BLOCK_ID, blockId)} in memory on " +
Copy link
Member

Choose a reason for hiding this comment

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

structured logging is only supposed to be used for logInfo/logWarning/logError, please also change the value to String

log"${MDC(HOST_PORT, blockManagerId.hostPort)} (current size: " +
log"${MDC(CURRENT_MEMORY_SIZE, Utils.bytesToString(memSize))}, original " +
log"size: ${MDC(ORIGINAL_MEMORY_SIZE, Utils.bytesToString(originalMemSize))}, " +
log"free: ${MDC(FREE_MEMORY_SIZE, Utils.bytesToString(_remainingMem))})")
} else {
logInfo(log"Added ${MDC(BLOCK_ID, blockId)} in memory on " +
logDebug(log"Added ${MDC(BLOCK_ID, blockId)} in memory on " +
log"${MDC(HOST_PORT, blockManagerId.hostPort)} " +
log"(size: ${MDC(CURRENT_MEMORY_SIZE, Utils.bytesToString(memSize))}, " +
log"free: ${MDC(FREE_MEMORY_SIZE, Utils.bytesToString(_remainingMem))})")
Expand All @@ -1075,12 +1075,12 @@ private[spark] class BlockManagerInfo(
blockStatus = BlockStatus(storageLevel, memSize = 0, diskSize = diskSize)
_blocks.put(blockId, blockStatus)
if (blockExists) {
logInfo(log"Updated ${MDC(BLOCK_ID, blockId)} on disk on " +
logDebug(log"Updated ${MDC(BLOCK_ID, blockId)} on disk on " +
log"${MDC(HOST_PORT, blockManagerId.hostPort)} " +
log"(current size: ${MDC(CURRENT_DISK_SIZE, Utils.bytesToString(diskSize))}," +
log" original size: ${MDC(ORIGINAL_DISK_SIZE, Utils.bytesToString(originalDiskSize))})")
} else {
logInfo(log"Added ${MDC(BLOCK_ID, blockId)} on disk on " +
logDebug(log"Added ${MDC(BLOCK_ID, blockId)} on disk on " +
log"${MDC(HOST_PORT, blockManagerId.hostPort)} (size: " +
log"${MDC(CURRENT_DISK_SIZE, Utils.bytesToString(diskSize))})")
}
Expand All @@ -1098,13 +1098,13 @@ private[spark] class BlockManagerInfo(
blockStatus.remove(blockId)
}
if (originalLevel.useMemory) {
logInfo(log"Removed ${MDC(BLOCK_ID, blockId)} on " +
logDebug(log"Removed ${MDC(BLOCK_ID, blockId)} on " +
log"${MDC(HOST_PORT, blockManagerId.hostPort)} in memory " +
log"(size: ${MDC(ORIGINAL_MEMORY_SIZE, Utils.bytesToString(originalMemSize))}, " +
log"free: ${MDC(FREE_MEMORY_SIZE, Utils.bytesToString(_remainingMem))})")
}
if (originalLevel.useDisk) {
logInfo(log"Removed ${MDC(BLOCK_ID, blockId)} on " +
logDebug(log"Removed ${MDC(BLOCK_ID, blockId)} on " +
log"${MDC(HOST_PORT, blockManagerId.hostPort)} on disk" +
log" (size: ${MDC(ORIGINAL_DISK_SIZE, Utils.bytesToString(originalDiskSize))})")
}
Expand Down