Package org.apache.hadoop.hbase.util
Class LocatedBlockHelper
java.lang.Object
org.apache.hadoop.hbase.util.LocatedBlockHelper
hadoop 3.3.1 changed the return value of this method from
DatanodeInfo[]
to
DatanodeInfoWithStorage[]
, which causes the JVM can not locate the method if we are
compiled with hadoop 3.2 and then link with hadoop 3.3+, so here we need to use reflection to
make it work for both hadoop versions, otherwise we need to publish more artifacts for different
hadoop versions...-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.hadoop.hdfs.protocol.DatanodeInfo[]
getLocatedBlockLocations
(org.apache.hadoop.hdfs.protocol.LocatedBlock block)
-
Field Details
-
GET_LOCATED_BLOCK_LOCATIONS_METHOD
-
-
Constructor Details
-
LocatedBlockHelper
private LocatedBlockHelper()
-
-
Method Details
-
getLocatedBlockLocations
public static org.apache.hadoop.hdfs.protocol.DatanodeInfo[] getLocatedBlockLocations(org.apache.hadoop.hdfs.protocol.LocatedBlock block)
-