@SuppressWarnings("nls")
  private void initialize() {
    LOG.debug("ObjectStore, initialize called");
    // if this method fails, PersistenceManagerProvider will retry for the configured number of times
    // before giving up
    boolean isForCompactor = MetastoreConf.getBoolVar(conf, COMPACTOR_USE_CUSTOM_POOL);
    pm = PersistenceManagerProvider.getPersistenceManager(isForCompactor);
    LOG.info("RawStore: {}, with PersistenceManager: {}" +
        " created in the thread with id: {}", this, pm, Thread.currentThread().getId());

    isInitialized = pm != null;
    if (isInitialized) {
      dbType = PersistenceManagerProvider.getDatabaseProduct();
      sqlGenerator = new SQLGenerator(dbType, conf);
      expressionProxy = PartFilterExprUtil.createExpressionProxy(conf);
      if (MetastoreConf.getBoolVar(getConf(), ConfVars.TRY_DIRECT_SQL)) {
        String schema = PersistenceManagerProvider.getProperty("javax.jdo.mapping.Schema");
        schema = org.apache.commons.lang3.StringUtils.defaultIfBlank(schema, null);
        directSql = new MetaStoreDirectSql(pm, conf, schema);
      }
    }
    if (propertyStore == null) {
      propertyStore = new CachingPropertyStore(new JdoPropertyStore(this), conf);
    }
  }
Called whenever this object is instantiated using ReflectionUtils, and also
on connection retries. In cases of connection retries, conf will usually
contain modified values.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java