szetszwo commented on code in PR #5626:
URL: https://github.com/apache/ozone/pull/5626#discussion_r1398469806
##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/service/TestKeyDeletingService.java:
##########
@@ -567,6 +569,45 @@ volumeName, bucketName, getSnapshotPrefix("snap3"), true))
{
}
+ @Test
+ public void testLogContent() throws IOException, AuthenticationException,
Review Comment:
Let's don't add a test since it is just log message change. You may
manually test it.
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/AbstractKeyDeletingService.java:
##########
@@ -103,6 +103,11 @@ protected int processKeyDeletes(List<BlockGroup>
keyBlocksList,
long startTime = Time.monotonicNow();
int delCount = 0;
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Keys sent to SCM: {}, size: {}.",
+ keyBlocksList, keyBlocksList.size());
+ }
Review Comment:
Let's log it also in info.
```java
if (LOG.isDebugEnabled()) {
LOG.debug("Send {} key(s) to SCM: {}", keyBlocksList.size(),
keyBlocksList);
} else if (LOG.isInfoEnabled()) {
LOG.debug("Send {} key(s) to SCM, first 10 keys: {}",
keyBlocksList.size(), keyBlocksList.subList(0, 10));
}
```
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/KeyDeletingService.java:
##########
@@ -186,6 +186,9 @@ public BackgroundTaskResult call() {
// Check if this is the Leader OM. If not leader, no need to execute this
// task.
if (shouldRun()) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Running KeyDeletingService");
+ }
Review Comment:
Print also the run count:
```java
final long run = getRunCount().incrementAndGet();
LOG.debug("Running KeyDeletingService {}", run);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]