saintstack commented on a change in pull request #3049:
URL: https://github.com/apache/hbase/pull/3049#discussion_r595446538
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java
##########
@@ -127,20 +127,22 @@ public MemStoreFlusher(final Configuration conf,
this.blockingWaitTime = conf.getInt("hbase.hstore.blockingWaitTime",
90000);
int handlerCount = conf.getInt("hbase.hstore.flusher.count", 2);
- if (handlerCount < 1) {
- LOG.warn("hbase.hstore.flusher.count was configed to {} which is less
than 1, corrected to 1",
- handlerCount);
- handlerCount = 1;
+ if (server != null) {
+ if (handlerCount < 1) {
+ LOG.warn("hbase.hstore.flusher.count was configed to {} which is less
than 1, "
+ + "corrected to 1", handlerCount);
+ handlerCount = 1;
+ }
+ LOG.info("globalMemStoreLimit="
+ + TraditionalBinaryPrefix
+
.long2String(this.server.getRegionServerAccounting().getGlobalMemStoreLimit(),
"", 1)
+ + ", globalMemStoreLimitLowMark="
+ + TraditionalBinaryPrefix.long2String(
+
this.server.getRegionServerAccounting().getGlobalMemStoreLimitLowMark(), "", 1)
+ + ", Offheap="
+ + (this.server.getRegionServerAccounting().isOffheap()));
}
this.flushHandlers = new FlushHandler[handlerCount];
Review comment:
If making a new PR, do you want to move the handlerCount check for < 1
outside of the if server != null paren? Seems like a generally applicable good
test... no need to keep it exclusive to when the server is non-null?
----------------------------------------------------------------
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]