sguggilam commented on a change in pull request #2627:
URL: https://github.com/apache/hbase/pull/2627#discussion_r521105633
##########
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:
@Apache9 Yes that is definitely a good idea and in fact we have started
the change with having a configuration parameter that can be set to false for
disabling the Unsafe usage which would be read in the static block ( of
UnsafeAvailChecker) for not having the clients to explicitly call a method to
disable the Unsafe availability
@apurtell
But one thing that we observed is that not all clients have the hbase-site
or hbase-default xml in the classpaths where they can set this flag . Hence we
thought of having a util method (in addition to the configuration way of
disabling it) for helping those clients to disable the Unsafe usage . Please
provide your thoughts on any other way that we can help achieve this.
##########
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:
@Apache9 Yes that is definitely a good idea and in fact we have started
the change with having a configuration parameter that can be set to false for
disabling the Unsafe usage which would be read in the static block ( of
UnsafeAvailChecker) for not having the clients to explicitly call a method to
disable the Unsafe availability
But one thing that we observed is that not all clients have the hbase-site
or hbase-default xml in the classpaths where they can set this flag . Hence we
thought of having a util method (in addition to the configuration way of
disabling it) for helping those clients to disable the Unsafe usage . Please
provide your thoughts on any other way that we can help achieve this.
@apurtell
----------------------------------------------------------------
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]