public void setSystemProperties() {
    System.setProperty(MetastoreConf.ConfVars.CONNECT_URL_KEY.getVarname(), rule.getJdbcUrl());
    System.setProperty(MetastoreConf.ConfVars.CONNECTION_DRIVER.getVarname(), rule.getJdbcDriver());
    System.setProperty(MetastoreConf.ConfVars.CONNECTION_USER_NAME.getVarname(), rule.getHiveUser());
    System.setProperty(MetastoreConf.ConfVars.PWD.getVarname(), rule.getHivePassword());
    System.setProperty(MetastoreConf.ConfVars.AUTO_CREATE_ALL.getVarname(), "false");
  }
QTestMetaStoreHandler is responsible for wrapping the logic of handling different metastore
databases in qtests.
itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestMetaStoreHandler.java