public static Map<String, String> getNotDeprecatedAndNotInternalStaticFields(Class<?> clazz)
      throws IllegalAccessException {

    List<Field> fields =
        Arrays.stream(clazz.getDeclaredFields())
            // filter out the non-static fields
            .filter(f -> Modifier.isStatic(f.getModifiers()))
            .filter(f -> f.getAnnotation(Deprecated.class) == null)
            // collect to list
            .collect(Collectors.toList());

    Map<String, String> result = new HashMap<>();
    for (Field field : fields) {
      result.put(field.getName(), field.get(null) + "");
    }
    return result;
  }
Convert size to a different unit, ensuring that the converted value is > 1
amoro-ams/src/main/java/org/apache/amoro/server/dashboard/utils/AmsUtil.java