public Map<String, String> getPreviousDatabaseConnectorNames() {
    File file = getConfigFile();
    Long currentConfigLastModifiedDate = file.lastModified();
    if (currentConfigLastModifiedDate.longValue() != configLastModifiedDateForCustomJDBCToRemove.longValue()) {
      LOG.info("Ambari properties config file changed.");
      Properties properties = readConfigFile();

      for (String propertyName : dbConnectorPropertyNames) {
        propertyName = "previous." + propertyName;
        String propertyValue = properties.getProperty(propertyName);
        if (StringUtils.isNotEmpty(propertyValue)) {
          databasePreviousConnectorNames.put(propertyName.replace(".", "_"), propertyValue);
        }
      }

      configLastModifiedDateForCustomJDBCToRemove = currentConfigLastModifiedDate;
    }

    return databasePreviousConnectorNames;
  }
Find, read, and parse the log4j.properties file.
@return the properties that were found or empty if no file was found
ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java