public static boolean isDbTargetOfFailover(String dbName, Hive hive) throws HiveException {
    Database database = hive.getDatabase(dbName);
    return database != null ? MetaStoreUtils.isTargetOfReplication(database) : false;
  }
Gets &amp; checks whether the database is target of replication.
@param dbName name of database
@param hive hive object
@return true, if the database has repl.target.for property set.
@throws HiveException
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/OptimisedBootstrapUtils.java