saintstack commented on a change in pull request #832: HBASE-23298 Refactor
LogRecoveredEditsOutputSink and BoundedLogWriter…
URL: https://github.com/apache/hbase/pull/832#discussion_r350895391
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALSplitter.java
##########
@@ -128,19 +123,18 @@
this.walFactory = factory;
PipelineController controller = new PipelineController();
- this.splitWriterCreationBounded =
conf.getBoolean(SPLIT_WRITER_CREATION_BOUNDED, false);
-
- entryBuffers = new EntryBuffers(controller,
- this.conf.getLong("hbase.regionserver.hlog.splitlog.buffersize", 128 *
1024 * 1024),
- splitWriterCreationBounded);
-
- int numWriterThreads =
this.conf.getInt("hbase.regionserver.hlog.splitlog.writer.threads", 3);
+ // if we limit the number of writers opened for sinking recovered edits
+ boolean splitWriterCreationBounded =
conf.getBoolean(SPLIT_WRITER_CREATION_BOUNDED, false);
+ long bufferSize = this.conf.getLong(SPLIT_WAL_BUFFER_SIZE, 128 * 1024 *
1024);
+ int numWriterThreads = this.conf.getInt(SPLIT_WAL_WRITER_THREADS, 3);
if (splitWriterCreationBounded) {
+ entryBuffers = new BoundedEntryBuffers(controller, bufferSize);
outputSink =
- new BoundedLogWriterCreationOutputSink(this, controller,
entryBuffers, numWriterThreads);
+ new BoundedOpeningWriterOutputSink(this, controller, entryBuffers,
numWriterThreads);
} else {
+ entryBuffers = new EntryBuffers(controller, bufferSize);
outputSink =
- new LogRecoveredEditsOutputSink(this, controller, entryBuffers,
numWriterThreads);
+ new RecoveredEditsOutputSink(this, controller, entryBuffers,
numWriterThreads);
Review comment:
Good
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services