|
@@ -33,7 +33,6 @@ import org.apache.ambari.server.orm.PersistenceType;
|
|
|
import org.apache.ambari.server.security.ClientSecurityType;
|
|
|
import org.apache.ambari.server.security.authorization.LdapServerProperties;
|
|
|
import org.apache.ambari.server.security.encryption.CredentialProvider;
|
|
|
-import org.apache.ambari.server.state.stack.OsFamily;
|
|
|
import org.apache.ambari.server.utils.ShellCommandUtil;
|
|
|
import org.apache.commons.io.FileUtils;
|
|
|
import org.apache.commons.lang.RandomStringUtils;
|
|
@@ -41,7 +40,6 @@ import org.apache.commons.lang.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
|
-import com.google.inject.Inject;
|
|
|
import com.google.inject.Singleton;
|
|
|
|
|
|
|
|
@@ -51,9 +49,6 @@ import com.google.inject.Singleton;
|
|
|
*/
|
|
|
@Singleton
|
|
|
public class Configuration {
|
|
|
-
|
|
|
- @Inject
|
|
|
- private OsFamily osFamily;
|
|
|
|
|
|
public static final String CONFIG_FILE = "ambari.properties";
|
|
|
public static final String BOOTSTRAP_DIR = "bootstrap.dir";
|
|
@@ -303,6 +298,8 @@ public class Configuration {
|
|
|
private static final String SERVER_PERSISTENCE_TYPE_DEFAULT = "local";
|
|
|
private static final String SERVER_CONNECTION_MAX_IDLE_TIME = "server.connection.max.idle.millis";
|
|
|
|
|
|
+ private static final String UBUNTU_OS = "ubuntu12";
|
|
|
+
|
|
|
/**
|
|
|
* Default for repo validation suffixes.
|
|
|
*/
|
|
@@ -1142,11 +1139,10 @@ public class Configuration {
|
|
|
/**
|
|
|
* @return a string array of suffixes used to validate repo URLs.
|
|
|
*/
|
|
|
- public String[] getRepoValidationSuffixes(String osType) {
|
|
|
- String osFamily = this.osFamily.find_family(osType);
|
|
|
+ public String[] getRepoValidationSuffixes(String osFamily) {
|
|
|
String repoSuffixes;
|
|
|
|
|
|
- if(osFamily.equals(OsFamily.UBUNTU_FAMILY)) {
|
|
|
+ if(osFamily.equals(UBUNTU_OS)) {
|
|
|
repoSuffixes = properties.getProperty(REPO_SUFFIX_KEY_UBUNTU,
|
|
|
REPO_SUFFIX_UBUNTU);
|
|
|
} else {
|