Package org.apache.ambari.server.configuration

Examples of org.apache.ambari.server.configuration.Configuration


    if (args != null && args.length > 0) {
      String action = args[0];
      String alias = null;
      String masterKey = null;
      CredentialProvider credentialProvider = null;
      Configuration configuration = new Configuration();
      if (args.length > 1 && !args[1].isEmpty()) {
        alias = args[1];
      } else {
        LOG.error("No valid arguments provided.");
        System.exit(1);
      }
      // None - To avoid incorrectly assuming redirection as argument
      if (args.length > 3 && !args[3].isEmpty() && !args[3].equalsIgnoreCase
        ("None")) {
        masterKey = args[3];
        LOG.debug("Master key provided as an argument.");
      }
      try {
        credentialProvider = new CredentialProvider(masterKey,
          configuration.getMasterKeyLocation(),
          configuration.isMasterKeyPersisted());
      } catch (Exception ex) {
        ex.printStackTrace();
        System.exit(1);
      }
      LOG.info("action => " + action + ", alias => " + alias);
View Full Code Here


  public static SinkConnectionFactory getFactory(String url, String driver) {
    Properties ambariProperties = new Properties();
    ambariProperties.setProperty(SinkConnectionFactory.SCOM_SINK_DB_URL, url);
    ambariProperties.setProperty(SinkConnectionFactory.SCOM_SINK_DB_DRIVER, driver);

    Configuration configuration =  new TestConfiguration(ambariProperties);

    SinkConnectionFactory connectionFactory = new SinkConnectionFactory();

    connectionFactory.init(configuration);
View Full Code Here

  private final Configuration configuration;
  private final HostsMap hostsMap;

  public ControllerModule() throws Exception {
    configuration = new Configuration();
    hostsMap = new HostsMap(configuration);
  }
View Full Code Here

    configuration = new Configuration();
    hostsMap = new HostsMap(configuration);
  }

  public ControllerModule(Properties properties) throws Exception {
    configuration = new Configuration(properties);
    hostsMap = new HostsMap(configuration);
  }
View Full Code Here

    Properties ambariProperties = new Properties();
    ambariProperties.setProperty(ClusterDefinitionProvider.SCOM_CLUSTER_DEFINITION_FILENAME, filename);
    ambariProperties.setProperty(ClusterDefinitionProvider.SCOM_CLUSTER_NAME, clusterName);
    ambariProperties.setProperty(ClusterDefinitionProvider.SCOM_VERSION_ID, versionId);

    Configuration configuration =  new TestConfiguration(ambariProperties);

    ClusterDefinitionProvider streamProvider = new ClusterDefinitionProvider();

    streamProvider.init(configuration);
View Full Code Here

              + ", serviceName=" + serviceName
              + ", clientHost=" + clientHost
              + ", serviceCheckRole=" + smokeTestRole);
          continue;
        }
        Configuration configuration = injector.getInstance(Configuration.class);
        customCommandExecutionHelper.addServiceCheckActionImpl(stage, clientHost,
                smokeTestRole, nowTimestamp, serviceName,
                null, null, hostsMap, null);

      }
View Full Code Here

    /**
     * Construct a controller module.
     */
    public ControllerModule(){
      configuration = new Configuration();
      hostsMap      = new HostsMap(configuration);
    }
View Full Code Here

       bootdir);
    properties.setProperty(Configuration.BOOTSTRAP_SCRIPT, "echo");
    properties.setProperty(Configuration.SRVR_KSTR_DIR_KEY, "target" + File.separator + "classes");
    properties.setProperty(Configuration.METADETA_DIR_PATH, metadetadir);
    properties.setProperty(Configuration.SERVER_VERSION_FILE, serverVersionFilePath);
    Configuration conf = new Configuration(properties);
    AmbariMetaInfo ambariMetaInfo = new AmbariMetaInfo(conf);
    BootStrapImpl impl = new BootStrapImpl(conf, ambariMetaInfo);
    impl.init();
    SshHostInfo info = new SshHostInfo();
    info.setSshKey("xyz");
View Full Code Here

    private Properties properties = new Properties();
   
    @Override
    public void configure(Binder binder) {
     binder.bind(Clusters.class).toInstance(createMock(Clusters.class));
     binder.bind(Configuration.class).toInstance(new Configuration(properties));
    }
View Full Code Here

    Properties properties = new Properties();
    properties.put("p1", "v1");
    properties.put("p2", "v2");
    properties.put("p3", "v3");

    Configuration ambariConfig = new Configuration(properties);
    return new ViewDefinition(viewConfig, ambariConfig, ViewDefinitionTest.class.getClassLoader(), "view.jar");
  }
View Full Code Here

TOP

Related Classes of org.apache.ambari.server.configuration.Configuration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.