Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,13 @@ protected void initOutput(FileSystem fs, Path path, boolean overwritable, int bu
FSDataOutputStreamBuilder<?, ?> builder = fs.createFile(path).overwrite(overwritable)
.bufferSize(bufferSize).replication(replication).blockSize(blockSize);
if (builder instanceof DistributedFileSystem.HdfsDataOutputStreamBuilder) {
this.output =
((DistributedFileSystem.HdfsDataOutputStreamBuilder) builder).replicate().build();
DistributedFileSystem.HdfsDataOutputStreamBuilder dfsBuilder =
(DistributedFileSystem.HdfsDataOutputStreamBuilder) builder;
if (fs.getConf().getBoolean("hbase.regionserver.wal.avoid-local-writes", false)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better declare a String constants for this config.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

dfsBuilder.replicate();
}
dfsBuilder.noLocalWrite();
Copy link
Contributor

@jojochuang jojochuang Feb 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be like the following?

Suggested change
dfsBuilder.replicate();
}
dfsBuilder.noLocalWrite();
dfsBuilder.noLocalWrite();
}
dfsBuilder.replicate();

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, my bad

this.output = dfsBuilder.build();
} else {
this.output = builder.build();
}
Expand Down