private static long multiplierFor()

in kyuubi-relocated-hive-metastore-client/src/main/java/org/apache/kyuubi/shaded/hive/metastore/conf/SizeValidator.java [99:115]


  private static long multiplierFor(String unit) {
    unit = unit.trim().toLowerCase();
    if (unit.isEmpty() || unit.equals("b") || unit.equals("bytes")) {
      return 1;
    } else if (unit.equals("kb")) {
      return 1024;
    } else if (unit.equals("mb")) {
      return 1024 * 1024;
    } else if (unit.equals("gb")) {
      return 1024 * 1024 * 1024;
    } else if (unit.equals("tb")) {
      return 1024L * 1024 * 1024 * 1024;
    } else if (unit.equals("pb")) {
      return 1024L * 1024 * 1024 * 1024 * 1024;
    }
    throw new IllegalArgumentException("Invalid size unit " + unit);
  }