Apache9 commented on code in PR #7267:
URL: https://github.com/apache/hbase/pull/7267#discussion_r2315788980
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java:
##########
@@ -1867,8 +1867,16 @@ public void abortProcess() {
configurationManager.registerObserver(procEnv);
int cpus = Runtime.getRuntime().availableProcessors();
- final int numThreads =
conf.getInt(MasterProcedureConstants.MASTER_PROCEDURE_THREADS, Math.max(
- (cpus > 0 ? cpus / 4 : 0),
MasterProcedureConstants.DEFAULT_MIN_MASTER_PROCEDURE_THREADS));
+ int defaultNumThreads = Math.max((cpus > 0 ? cpus / 4 : 0),
+ MasterProcedureConstants.DEFAULT_MIN_MASTER_PROCEDURE_THREADS);
+ int numThreads =
+ conf.getInt(MasterProcedureConstants.MASTER_PROCEDURE_THREADS,
defaultNumThreads);
+ if (numThreads <= 0) {
+ LOG.warn(MasterProcedureConstants.MASTER_PROCEDURE_THREADS
+ + " is set to {}, which is invalid, " + "using default value {}
instead", numThreads,
+ defaultNumThreads);
Review Comment:
@Ariadne-team See this comment? Otherwise LGTM.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]