public static String getStackTrace(Throwable throwable) {
    StringWriter sw = new StringWriter();

    try (PrintWriter printWriter = new PrintWriter(sw)) {
      throwable.printStackTrace(printWriter);
      return sw.toString();
    }
  }
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