Apache9 commented on a change in pull request #2627:
URL: https://github.com/apache/hbase/pull/2627#discussion_r522106617
##########
File path:
hbase-common/src/main/java/org/apache/hadoop/hbase/util/UnsafeAvailChecker.java
##########
@@ -33,12 +35,16 @@
private static final Logger LOG =
LoggerFactory.getLogger(UnsafeAvailChecker.class);
private static boolean avail = false;
private static boolean unaligned = false;
+ // Flag that can be set by clients to enable/disable Unsafe package usage
+ private static boolean useUnsafe;
Review comment:
I do not think adding configs to hbase-site.xml or hbase-default.xml can
help here, as if we want to make it final then we need to initialize these
flags in the static initialization section, where we do not pass in a
Configuration.
So I suggest we use a environment variable to control the behavior, i.e, add
`-Dorg.apache.hbase.unsafe=false` in the start command and we will test this
env variable in the static initialization section to determine whether to
disable unsafe.
----------------------------------------------------------------
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]