public static void isFirstIncrementalPending(String dbName, Hive hiveDb) throws HiveException {
    Database database = hiveDb.getDatabase(dbName);
    if (database == null || ReplUtils.isFirstIncPending(database.getParameters()))
      throw new HiveException(
          "Replication dump not allowed for replicated database with first incremental dump pending : " + dbName);
  }
Validates if the first incremental is done before starting optimised bootstrap
@param dbName name of database
@param hiveDb the hive object
@throws HiveException
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/OptimisedBootstrapUtils.java