You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/08/03 11:05:30 UTC

[GitHub] [hbase] anoopsjohn commented on a change in pull request #2189: HBASE-24811 Use class access static filed or method

anoopsjohn commented on a change in pull request #2189:
URL: https://github.com/apache/hbase/pull/2189#discussion_r464344846



##########
File path: hbase-common/src/main/java/org/apache/hadoop/hbase/util/ClassSize.java
##########
@@ -29,7 +29,7 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting;
-
+import sun.misc.Unsafe;

Review comment:
       Can not do this change and below in this file.  We dont want to directly refer Unsafe class.  This can cause ClassNotFoundError for some JVMs.  That is why we hide the usage under UnsafeAccess and there via reflection we load and catch Exception also.




----------------------------------------------------------------
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:
users@infra.apache.org