Apache9 commented on a change in pull request #1335: HBASE-24000 Simplify 
CommonFSUtils after upgrading to hadoop 2.10.0
URL: https://github.com/apache/hbase/pull/1335#discussion_r397588653
 
 

 ##########
 File path: 
hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
 ##########
 @@ -759,200 +739,75 @@ public static void 
checkShortCircuitReadBufferSize(final Configuration conf) {
     conf.setIfUnset(dfsKey, Integer.toString(hbaseSize));
   }
 
-  private static class DfsBuilderUtility {
-    static Class<?> dfsClass = null;
-    static Method createMethod;
-    static Method overwriteMethod;
-    static Method bufferSizeMethod;
-    static Method blockSizeMethod;
-    static Method recursiveMethod;
-    static Method replicateMethod;
-    static Method replicationMethod;
-    static Method buildMethod;
-    static boolean allMethodsPresent = false;
+  private static final class DfsBuilderUtility {
+    private static final Class<?> BUILDER;
+    private static final Method REPLICATE;
 
     static {
-      String dfsName = "org.apache.hadoop.hdfs.DistributedFileSystem";
-      String builderName = dfsName + "$HdfsDataOutputStreamBuilder";
+      String builderName = 
"org.apache.hadoop.hdfs.DistributedFileSystem$HdfsDataOutputStreamBuilder";
 
 Review comment:
   Yes, hbase-common only depends on hadoop-common so we can only access 
FileSystem, not DistributedFileSystem. I tried to move this method to 
hbase-server but then I realized that we also use this method in 
hbase-procedure, so leave it as is for now. The WALProcedureStore is supposed 
to be removed in 4.0.0, let's revive this again at that time...

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


With regards,
Apache Git Services

Reply via email to