private static long roundUpToMultiple(long num, int n) {
    if (n == 0) {
      throw new IllegalArgumentException("The multiple n must be greater than 0");
    }
    // Calculate the rounded up value to the nearest multiple of n
    return ((num + n - 1) / n) * n;
  }
Rounds up the given integer num to the nearest multiple of n.

@param num The integer to be rounded up.
@param n The specified multiple.
@return The nearest multiple of n greater than or equal to num.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/memory/PipeMemoryWeightUtil.java