This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new bc19a4c18a HDDS-12711. Limit number of excluded SST files logged at
info level (#8186)
bc19a4c18a is described below
commit bc19a4c18afe44154f16b546a06df717ddfcd7c3
Author: Chia-Chuan Yu <[email protected]>
AuthorDate: Fri Apr 4 00:41:07 2025 +0800
HDDS-12711. Limit number of excluded SST files logged at info level (#8186)
---
.../hadoop/hdds/utils/DBCheckpointServlet.java | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git
a/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/DBCheckpointServlet.java
b/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/DBCheckpointServlet.java
index 597a2415a1..4f528a83c2 100644
---
a/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/DBCheckpointServlet.java
+++
b/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/DBCheckpointServlet.java
@@ -130,6 +130,18 @@ private boolean hasPermission(UserGroupInformation user) {
}
}
+ private static void logSstFileList(List<String>sstList, String msg, int
sampleSize) {
+ int count = sstList.size();
+ if (LOG.isDebugEnabled()) {
+ LOG.debug(msg, count, "", sstList);
+ } else if (count > sampleSize) {
+ List<String> sample = sstList.subList(0, sampleSize);
+ LOG.info(msg, count, ", sample", sample);
+ } else {
+ LOG.info(msg, count, "", sstList);
+ }
+ }
+
/**
* Generates Snapshot checkpoint as tar ball.
* @param request the HTTP servlet request
@@ -195,7 +207,8 @@ private void generateSnapshotCheckpoint(HttpServletRequest
request,
.filter(s -> s.endsWith(ROCKSDB_SST_SUFFIX))
.distinct()
.collect(Collectors.toList()));
- LOG.info("Received excluding SST {}", receivedSstList);
+ logSstFileList(receivedSstList,
+ "Received list of {} SST files to be excluded{}: {}", 5);
}
Path tmpdir = null;
@@ -229,9 +242,8 @@ private void generateSnapshotCheckpoint(HttpServletRequest
request,
long duration = Duration.between(start, end).toMillis();
LOG.info("Time taken to write the checkpoint to response output " +
"stream: {} milliseconds", duration);
-
- LOG.info("Excluded SST {} from the latest checkpoint.",
- excludedSstList);
+ logSstFileList(excludedSstList,
+ "Excluded {} SST files from the latest checkpoint{}: {}", 5);
if (!excludedSstList.isEmpty()) {
dbMetrics.incNumIncrementalCheckpoint();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]