Browse Source

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
pull/7526/head
chrislu 1 week ago
parent
commit
6fe5c372ee
  1. 8
      other/java/hdfs3/src/main/java/seaweed/hdfs/SeaweedFileSystem.java
  2. 2
      other/java/hdfs3/src/main/java/seaweed/hdfs/SeaweedHadoopOutputStream.java

8
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;

2
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);
}

Loading…
Cancel
Save