Package org.apache.ambari.server.configuration

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


  @Test
  public void testActionTimeoutForLostHost() throws Exception {
    ActionQueue aq = new ActionQueue();
    Properties properties = new Properties();
    Configuration conf = new Configuration(properties);
    Clusters fsm = mock(Clusters.class);
    Cluster oneClusterMock = mock(Cluster.class);
    Service serviceObj = mock(Service.class);
    ServiceComponent scomp = mock(ServiceComponent.class);
    ServiceComponentHost sch = mock(ServiceComponentHost.class);
View Full Code Here


  @Test
  public void testOpFailedEventRaisedForAbortedHostRole() throws Exception {
    ActionQueue aq = new ActionQueue();
    Properties properties = new Properties();
    Configuration conf = new Configuration(properties);
    Clusters fsm = mock(Clusters.class);
    Cluster oneClusterMock = mock(Cluster.class);
    Service serviceObj = mock(Service.class);
    ServiceComponent scomp = mock(ServiceComponent.class);
    ServiceComponentHost sch1 = mock(ServiceComponentHost.class);
View Full Code Here

   */
  @Test
  public void testServerAction() throws Exception {
    ActionQueue aq = new ActionQueue();
    Properties properties = new Properties();
    Configuration conf = new Configuration(properties);
    Clusters fsm = mock(Clusters.class);
    Cluster oneClusterMock = mock(Cluster.class);
    Service serviceObj = mock(Service.class);
    ServiceComponent scomp = mock(ServiceComponent.class);
    ServiceComponentHost sch = mock(ServiceComponentHost.class);
View Full Code Here

  @Test
  public void testServerActionFailed() throws Exception {
    ActionQueue aq = new ActionQueue();
    Properties properties = new Properties();
    Configuration conf = new Configuration(properties);
    Clusters fsm = mock(Clusters.class);
    Cluster oneClusterMock = mock(Cluster.class);
    Service serviceObj = mock(Service.class);
    ServiceComponent scomp = mock(ServiceComponent.class);
    ServiceComponentHost sch = mock(ServiceComponentHost.class);
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

  private StreamProvider urlStreamProvider;
 
  @Inject
  public static void init(Injector injector) {
    clusters = injector.getInstance(Clusters.class);
    Configuration config = injector.getInstance(Configuration.class);
   
    String ignores = config.getProperty(Configuration.NAGIOS_IGNORE_FOR_SERVICES_KEY);
    if (null != ignores) {
      for (String str : ignores.split(","))
        IGNORABLE_FOR_SERVICES.add(str);
    }

    ignores = config.getProperty(Configuration.NAGIOS_IGNORE_FOR_HOSTS_KEY);
    if (null != ignores) {
      for (String str : ignores.split(","))
        IGNORABLE_FOR_HOSTS.add(str);
    }
   
View Full Code Here

  @Test
  public void testExecuteDDLUpdates() throws Exception {

    final DBAccessor dbAccessor = createNiceMock(DBAccessor.class);

    Configuration configuration = createNiceMock(Configuration.class);
    expect(configuration.getDatabaseUrl()).andReturn(Configuration.JDBC_IN_MEMORY_URL).anyTimes();

    dbAccessor.createTable(eq("viewmain"), EasyMock.<List<DBAccessor.DBColumnInfo>>anyObject(), eq("view_name"));
    dbAccessor.createTable(eq("viewinstancedata"), EasyMock.<List<DBAccessor.DBColumnInfo>>anyObject(),
        eq("view_name"), eq("view_instance_name"), eq("name"));
    dbAccessor.createTable(eq("viewinstance"), EasyMock.<List<DBAccessor.DBColumnInfo>>anyObject(),
View Full Code Here

              }
              info.put(clusterInfoKey, hostList);
            }
            //Set up ambari-rca connection properties, is this a hack?
//            info.put("ambari_db_server_host", Arrays.asList(hostsMap.getHostMap(getHostName())));
            Configuration configuration = injector.getInstance(Configuration.class);
            String url = configuration.getRcaDatabaseUrl();
            if (url.contains(Configuration.HOSTNAME_MACRO)) {
              url = url.replace(Configuration.HOSTNAME_MACRO, hostsMap.getHostMap(hostName));
            }
            info.put("ambari_db_rca_url", Arrays.asList(url));
            info.put("ambari_db_rca_driver", Arrays.asList(configuration.getRcaDatabaseDriver()));
            info.put("ambari_db_rca_username", Arrays.asList(configuration.getRcaDatabaseUser()));
            info.put("ambari_db_rca_password", Arrays.asList(configuration.getRcaDatabasePassword()));

          }
        }
      }
    }
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

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.