saintstack commented on a change in pull request #832: HBASE-23298 Refactor
LogRecoveredEditsOutputSink and BoundedLogWriter…
URL: https://github.com/apache/hbase/pull/832#discussion_r350891562
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/EntryBuffers.java
##########
@@ -40,36 +45,29 @@
public class EntryBuffers {
private static final Logger LOG =
LoggerFactory.getLogger(EntryBuffers.class);
- PipelineController controller;
+ private final PipelineController controller;
- Map<byte[], RegionEntryBuffer> buffers = new
TreeMap<>(Bytes.BYTES_COMPARATOR);
+ final Map<byte[], RegionEntryBuffer> buffers = new
TreeMap<>(Bytes.BYTES_COMPARATOR);
/*
* Track which regions are currently in the middle of writing. We don't
allow an IO thread to pick
* up bytes from a region if we're already writing data for that region in a
different IO thread.
*/
- Set<byte[]> currentlyWriting = new TreeSet<>(Bytes.BYTES_COMPARATOR);
+ private final Set<byte[]> currentlyWriting = new
TreeSet<>(Bytes.BYTES_COMPARATOR);
- long totalBuffered = 0;
- long maxHeapUsage;
- boolean splitWriterCreationBounded;
+ protected long totalBuffered = 0;
+ protected final long maxHeapUsage;
public EntryBuffers(PipelineController controller, long maxHeapUsage) {
- this(controller, maxHeapUsage, false);
- }
-
- public EntryBuffers(PipelineController controller, long maxHeapUsage,
- boolean splitWriterCreationBounded) {
this.controller = controller;
this.maxHeapUsage = maxHeapUsage;
- this.splitWriterCreationBounded = splitWriterCreationBounded;
}
/**
* Append a log entry into the corresponding region buffer. Blocks if the
total heap usage has
* crossed the specified threshold.
*/
- public void appendEntry(WAL.Entry entry) throws InterruptedException,
IOException {
+ void appendEntry(WAL.Entry entry) throws InterruptedException, IOException {
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