Skip to content
Merged
Changes from 2 commits
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;
dfsBuilder.replicate();
if (fs.getConf().getBoolean("hbase.regionserver.wal.avoid-local-writes", false)) {

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

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