Examples of TestStreamProvider


Examples of org.apache.ambari.server.controller.ganglia.TestStreamProvider

    Cluster cluster = clusters.getCluster("c1");
    reset(cluster); // simulate an error that NAGIOS not with the cluster
    expect(cluster.getService("NAGIOS")).andThrow(new AmbariException("No Service"));
    replay(cluster);
   
    TestStreamProvider streamProvider = new TestStreamProvider("nagios_alerts.txt");

    NagiosPropertyProvider npp = new NagiosPropertyProvider(Resource.Type.Service,
        streamProvider,
        "ServiceInfo/cluster_name",
        "ServiceInfo/service_name");
View Full Code Here

Examples of org.apache.ambari.server.controller.ganglia.TestStreamProvider

  }


  @Test
  public void testClusterDoesNotExistNPE() throws Exception {
    TestStreamProvider streamProvider = new TestStreamProvider("nagios_alerts.txt");

    NagiosPropertyProvider npp = new NagiosPropertyProvider(Resource.Type.Service,
        streamProvider,
        "ServiceInfo/cluster_name",
        "ServiceInfo/service_name");
View Full Code Here

Examples of org.apache.ambari.server.controller.ganglia.TestStreamProvider

  }

  @Test
  public void testNagiosClusterAlerts() throws Exception {

    TestStreamProvider streamProvider = new TestStreamProvider("nagios_alerts.txt");

    NagiosPropertyProvider npp = new NagiosPropertyProvider(Resource.Type.Cluster,
      streamProvider,
      "Clusters/cluster_name",
      "Clusters/version");
View Full Code Here

Examples of org.apache.ambari.server.controller.ganglia.TestStreamProvider

    ServiceComponent nagiosServiceComponent = createMock(ServiceComponent.class);
    expect(nagiosService.getServiceComponent("NAGIOS_SERVER")).andThrow(new AmbariException("No Component"));

    replay(cluster, nagiosService);

    TestStreamProvider streamProvider = new TestStreamProvider("nagios_alerts.txt");

    NagiosPropertyProvider npp = new NagiosPropertyProvider(Resource.Type.Service,
        streamProvider,
        "ServiceInfo/cluster_name",
        "ServiceInfo/service_name");
View Full Code Here

Examples of org.apache.ambari.server.controller.ganglia.TestStreamProvider

  }
 
  @Test
  public void testNagiosServiceAlerts() throws Exception {

    TestStreamProvider streamProvider = new TestStreamProvider("nagios_alerts.txt");

    NagiosPropertyProvider npp = new NagiosPropertyProvider(Resource.Type.Service,
        streamProvider,
        "ServiceInfo/cluster_name",
        "ServiceInfo/service_name");
View Full Code Here

Examples of org.apache.ambari.server.controller.ganglia.TestStreamProvider

 
 

  @Test
  public void testNagiosHostAlerts() throws Exception {   
    TestStreamProvider streamProvider = new TestStreamProvider("nagios_alerts.txt");

    NagiosPropertyProvider npp = new NagiosPropertyProvider(Resource.Type.Host,
        streamProvider,
        "Hosts/cluster_name",
        "Hosts/host_name");
View Full Code Here

Examples of org.apache.ambari.server.controller.ganglia.TestStreamProvider

  }
 
  @Test
  public void testNagiosHostAlertsWithIgnore() throws Exception {
   
    TestStreamProvider streamProvider = new TestStreamProvider("nagios_alerts.txt");

    NagiosPropertyProvider npp = new NagiosPropertyProvider(Resource.Type.Host,
        streamProvider,
        "Hosts/cluster_name",
        "Hosts/host_name");
View Full Code Here

Examples of org.apache.ambari.server.controller.ganglia.TestStreamProvider

  @Test
  public void testNagiosServiceAlertsAddIgnore() throws Exception {
    module.properties.setProperty(Configuration.NAGIOS_IGNORE_FOR_SERVICES_KEY,
        "HBase Master process on c6401.ambari.apache.org");
   
    TestStreamProvider streamProvider = new TestStreamProvider("nagios_alerts.txt");

    NagiosPropertyProvider npp = new NagiosPropertyProvider(Resource.Type.Service,
        streamProvider,
        "ServiceInfo/cluster_name",
        "ServiceInfo/service_name");
View Full Code Here

Examples of org.apache.ambari.server.controller.ganglia.TestStreamProvider

    expect(nagiosServiceComponent.getServiceComponentHosts()).andReturn(map1);
   
    replay(clusters, cluster, nagiosService, nagiosServiceComponent);

   
    TestStreamProvider streamProvider = new TestStreamProvider("nagios_alerts.txt");

    NagiosPropertyProvider npp = new NagiosPropertyProvider(Resource.Type.Service,
        streamProvider,
        "ServiceInfo/cluster_name",
        "ServiceInfo/service_name");
View Full Code Here

Examples of org.apache.ambari.server.controller.ganglia.TestStreamProvider

  }
 
  @Test
  public void testNagiosHostAlertsSubstringPassiveMarker() throws Exception {
   
    TestStreamProvider streamProvider = new TestStreamProvider("nagios_alerts.txt");

    NagiosPropertyProvider npp = new NagiosPropertyProvider(Resource.Type.Host,
        streamProvider,
        "Hosts/cluster_name",
        "Hosts/host_name");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.