From 6fe5c372ee9d23df0411dd99b314285565f2790e Mon Sep 17 00:00:00 2001 From: chrislu Date: Sun, 23 Nov 2025 22:27:29 -0800 Subject: [PATCH] debug: change logs to WARN level to ensure visibility INFO logs from seaweed.hdfs package may be filtered. Changed all diagnostic logs to WARN level to match the 'PARQUET FILE WRITTEN' log which DOES appear in test output. This will definitively show: 1. Whether our code path is being used 2. Whether the getPos() override is being called 3. What position values are being returned --- .../src/main/java/seaweed/hdfs/SeaweedFileSystem.java | 8 ++++---- .../main/java/seaweed/hdfs/SeaweedHadoopOutputStream.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/other/java/hdfs3/src/main/java/seaweed/hdfs/SeaweedFileSystem.java b/other/java/hdfs3/src/main/java/seaweed/hdfs/SeaweedFileSystem.java index b8852950b..07410a065 100644 --- a/other/java/hdfs3/src/main/java/seaweed/hdfs/SeaweedFileSystem.java +++ b/other/java/hdfs3/src/main/java/seaweed/hdfs/SeaweedFileSystem.java @@ -116,12 +116,12 @@ public class SeaweedFileSystem extends FileSystem { overwrite, permission, seaweedBufferSize, replicaPlacement); // Use custom FSDataOutputStream that delegates getPos() to our stream - LOG.info("[DEBUG-2024] Creating FSDataOutputStream with custom getPos() override for path: {}", finalPath); + LOG.warn("[DEBUG-2024] Creating FSDataOutputStream with custom getPos() override for path: {}", finalPath); return new FSDataOutputStream(outputStream, statistics) { @Override public long getPos() { long pos = outputStream.getPos(); - LOG.info("[DEBUG-2024] FSDataOutputStream.getPos() override called! Returning: {} for path: {}", + LOG.warn("[DEBUG-2024] FSDataOutputStream.getPos() override called! Returning: {} for path: {}", pos, finalPath); return pos; } @@ -171,13 +171,13 @@ public class SeaweedFileSystem extends FileSystem { SeaweedHadoopOutputStream outputStream = (SeaweedHadoopOutputStream) seaweedFileSystemStore.createFile(path, false, null, seaweedBufferSize, ""); // Use custom FSDataOutputStream that delegates getPos() to our stream - LOG.info("[DEBUG-2024] Creating FSDataOutputStream (append) with custom getPos() override for path: {}", + LOG.warn("[DEBUG-2024] Creating FSDataOutputStream (append) with custom getPos() override for path: {}", finalPath); return new FSDataOutputStream(outputStream, statistics) { @Override public long getPos() { long pos = outputStream.getPos(); - LOG.info( + LOG.warn( "[DEBUG-2024] FSDataOutputStream.getPos() override called (append)! Returning: {} for path: {}", pos, finalPath); return pos; diff --git a/other/java/hdfs3/src/main/java/seaweed/hdfs/SeaweedHadoopOutputStream.java b/other/java/hdfs3/src/main/java/seaweed/hdfs/SeaweedHadoopOutputStream.java index 414d520ab..e36618aa9 100644 --- a/other/java/hdfs3/src/main/java/seaweed/hdfs/SeaweedHadoopOutputStream.java +++ b/other/java/hdfs3/src/main/java/seaweed/hdfs/SeaweedHadoopOutputStream.java @@ -20,7 +20,7 @@ public class SeaweedHadoopOutputStream extends SeaweedOutputStream implements Sy public SeaweedHadoopOutputStream(FilerClient filerClient, final String path, FilerProto.Entry.Builder entry, final long position, final int bufferSize, final String replication) { super(filerClient, path, entry, position, bufferSize, replication); - LOG.info("[DEBUG-2024] SeaweedHadoopOutputStream created: path={} position={} bufferSize={} replication={}", + LOG.warn("[DEBUG-2024] SeaweedHadoopOutputStream created: path={} position={} bufferSize={} replication={}", path, position, bufferSize, replication); }