public MemorySize multiply(double multiplier) {
    checkArgument(multiplier >= 0, "multiplier must be >= 0");

    BigDecimal product = BigDecimal.valueOf(this.bytes).multiply(BigDecimal.valueOf(multiplier));
    if (product.compareTo(BigDecimal.valueOf(Long.MAX_VALUE)) > 0) {
      throw new ArithmeticException("long overflow");
    }
    return new MemorySize(product.longValue());
  }
Gets the memory size in Tebibytes (= 1024 Gibibytes).
amoro-common/src/main/java/org/apache/amoro/utils/MemorySize.java