@Override
  public int getId() {

    NumberFormat numberFormat = NumberFormat.getInstance();
    numberFormat.setMinimumIntegerDigits(5);
    numberFormat.setGroupingUsed(false);
    return Integer
      .parseInt(numberFormat.format(Math.abs(new Random().nextInt())));
  }
Default implementation. Here, ids are generated randomly.
hcatalog/core/src/main/java/org/apache/hive/hcatalog/data/transfer/state/DefaultStateProvider.java