public static int ceilingDiv(int x, int y) {
    if (x < 0 || y <= 0)
      throw new IllegalArgumentException();

    return x / y + (x % y == 0 ? 0 : 1);
  }
Convenient utility class with static methods.
samza-sql-shell/src/main/java/org/apache/samza/sql/client/util/CliUtil.java