public static DatanodeInfo[] getLocatedBlockLocations(LocatedBlock block) {
    try {
      // DatanodeInfoWithStorage[] can be casted to DatanodeInfo[] directly
      return (DatanodeInfo[]) GET_LOCATED_BLOCK_LOCATIONS_METHOD.invoke(block);
    } catch (IllegalAccessException | InvocationTargetException e) {
      throw new RuntimeException(e);
    }
  }
hadoop 3.3.1 changed the return value of this method from {@code DatanodeInfo[]} to
{@code 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...
hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/util/LocatedBlockHelper.java