Skip to content

Commit 93b9828

Browse files
authored
SAMZA-2784: Remove excessive commit logs (#1695)
1 parent 082899d commit 93b9828

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Diff for: samza-core/src/main/java/org/apache/samza/storage/blobstore/BlobStoreBackupManager.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ public CompletableFuture<Map<String, String>> upload(CheckpointId checkpointId,
236236
CompletionStage<String> snapshotIndexBlobIdFuture =
237237
snapshotIndexFuture
238238
.thenComposeAsync(si -> {
239-
LOG.info("Uploading Snapshot index: {} for task: {} store: {}", si, taskName, storeName);
239+
LOG.debug("Uploading Snapshot index: {} for task: {} store: {}", si, taskName, storeName);
240240
return blobStoreUtil.putSnapshotIndex(si);
241241
}, executor);
242242

@@ -296,7 +296,7 @@ public CompletableFuture<Void> cleanUp(CheckpointId checkpointId, Map<String, St
296296
// 1. remove TTL of index blob and all of its files and sub-dirs marked for retention
297297
CompletionStage<Void> removeTTLFuture =
298298
snapshotIndexFuture.thenComposeAsync(snapshotIndex -> {
299-
LOG.info("Removing TTL for index blob: {} and all of its files and sub-dirs for task: {} store :{}",
299+
LOG.debug("Removing TTL for index blob: {} and all of its files and sub-dirs for task: {} store :{}",
300300
snapshotIndexBlobId, taskName, storeName);
301301
return blobStoreUtil.removeTTL(snapshotIndexBlobId, snapshotIndex, requestMetadata);
302302
}, executor);
@@ -305,7 +305,7 @@ public CompletableFuture<Void> cleanUp(CheckpointId checkpointId, Map<String, St
305305
// 2. delete the files/subdirs marked for deletion in the snapshot index.
306306
CompletionStage<Void> cleanupRemoteSnapshotFuture =
307307
snapshotIndexFuture.thenComposeAsync(snapshotIndex -> {
308-
LOG.info("Deleting files and dirs to remove for current index blob: {} for task: {} store: {}",
308+
LOG.debug("Deleting files and dirs to remove for current index blob: {} for task: {} store: {}",
309309
snapshotIndexBlobId, taskName, storeName);
310310
return blobStoreUtil.cleanUpDir(snapshotIndex.getDirIndex(), requestMetadata);
311311
}, executor);
@@ -317,7 +317,7 @@ public CompletableFuture<Void> cleanUp(CheckpointId checkpointId, Map<String, St
317317
snapshotIndexFuture.thenComposeAsync(snapshotIndex -> {
318318
if (snapshotIndex.getPrevSnapshotIndexBlobId().isPresent()) {
319319
String blobId = snapshotIndex.getPrevSnapshotIndexBlobId().get();
320-
LOG.info("Removing previous snapshot index blob: {} from blob store for task: {} store: {}.",
320+
LOG.debug("Removing previous snapshot index blob: {} from blob store for task: {} store: {}.",
321321
blobId, taskName, storeName);
322322
return blobStoreUtil.deleteSnapshotIndexBlob(blobId, requestMetadata);
323323
} else {

Diff for: samza-core/src/main/java/org/apache/samza/storage/blobstore/util/DirDiffUtil.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ public static BiPredicate<File, FileIndex> areSameFile(boolean compareLargeFileC
219219
if (!compareLargeFileChecksums && isLargeFile) {
220220
// Since RocksDB SST files are immutable after creation, we can skip the expensive checksum computations
221221
// which requires reading the entire file.
222-
LOG.debug("Local file: {} and remote file: {} are same. " +
222+
LOG.debug("Local file: {} and remote file: {} both present. " +
223223
"Skipping checksum calculation for large file of size: {}.",
224224
localFile.getAbsolutePath(), remoteFile.getFileName(), localFileAttrs.size());
225225
return true;
@@ -234,7 +234,7 @@ public static BiPredicate<File, FileIndex> areSameFile(boolean compareLargeFileC
234234

235235
boolean areSameChecksum = localFileChecksum == remoteFile.getChecksum();
236236
if (!areSameChecksum) {
237-
LOG.warn("Local file: {} and remote file: {} are not same. " +
237+
LOG.debug("Local file: {} and remote file: {} are not same. " +
238238
"Local checksum: {}. Remote checksum: {}",
239239
localFile.getAbsolutePath(), remoteFile.getFileName(), localFileChecksum, remoteFile.getChecksum());
240240
} else {

Diff for: samza-core/src/main/scala/org/apache/samza/container/TaskInstance.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ class TaskInstance(
186186
// WARNING: cleanUp is NOT optional with blob stores since this is where we reset the TTL for
187187
// tracked blobs. if this TTL reset is skipped, some of the blobs retained by future commits may
188188
// be deleted in the background by the blob store, leading to data loss.
189-
info("Cleaning up stale state from previous run for taskName: %s" format taskName)
189+
debug("Cleaning up stale state from previous run for taskName: %s" format taskName)
190190
commitManager.cleanUp(checkpointV2.getCheckpointId, checkpointV2.getStateCheckpointMarkers)
191191
}
192192

@@ -474,7 +474,7 @@ class TaskInstance(
474474
new Function[util.Map[String, util.Map[String, String]], CompletableFuture[Void]] {
475475
override def apply(uploadSCMs: util.Map[String, util.Map[String, String]]): CompletableFuture[Void] = {
476476
// Perform cleanup on unused checkpoints
477-
info("Cleaning up old checkpoint state for taskName: %s checkpointId: %s" format(taskName, checkpointId))
477+
debug("Cleaning up old checkpoint state for taskName: %s checkpointId: %s" format(taskName, checkpointId))
478478
val cleanUpStartTime = System.nanoTime()
479479
try {
480480
commitManager.cleanUp(checkpointId, uploadSCMs)

0 commit comments

Comments
 (0)