private static boolean matchesAny(String str, MemoryUnit unit) {
    for (String s : unit.getUnits()) {
      if (s.equals(str)) {
        return true;
      }
    }
    return false;
  }
Parses the given string as bytes. The supported expressions are listed under {@link
MemorySize}.

@param text The string to parse
@return The parsed size, in bytes.
@throws IllegalArgumentException Thrown, if the expression cannot be parsed.
amoro-common/src/main/java/org/apache/amoro/utils/MemorySize.java