Package org.apache.ambari.server.state

Examples of org.apache.ambari.server.state.Host.convertToResponse()


    expect(host2.getHostName()).andReturn("Host101").anyTimes();
    expect(host3.getHostName()).andReturn("Host102").anyTimes();

    expect(host1.convertToResponse()).andReturn(hostResponse1);
    expect(host2.convertToResponse()).andReturn(hostResponse2);
    expect(host3.convertToResponse()).andReturn(hostResponse3);

    expect(hostResponse1.getClusterName()).andReturn("Cluster100").anyTimes();
    expect(hostResponse2.getClusterName()).andReturn("Cluster100").anyTimes();
    expect(hostResponse3.getClusterName()).andReturn("Cluster100").anyTimes();
    expect(hostResponse1.getHostname()).andReturn("Host100").anyTimes();
View Full Code Here


    expect(clusters.getClustersForHost("Host100")).andReturn(clusterSet).anyTimes();

    expect(host1.getHostName()).andReturn("Host100").anyTimes();

    expect(host1.convertToResponse()).andReturn(hostResponse1);

    expect(hostResponse1.getClusterName()).andReturn("").anyTimes();
    expect(hostResponse1.getHostname()).andReturn("Host100").anyTimes();
    expect(hostResponse1.getHealthStatus()).andReturn(healthStatus).anyTimes();
View Full Code Here

    expect(cluster.getDesiredStackVersion()).andReturn(stackId);

    expect(host1.getHostName()).andReturn("Host100").anyTimes();

    expect(host1.convertToResponse()).andReturn(hostResponse1);

    expect(hostResponse1.getClusterName()).andReturn("Cluster100").anyTimes();
    expect(hostResponse1.getHostname()).andReturn("Host100").anyTimes();
    expect(hostResponse1.getHealthStatus()).andReturn(healthStatus).anyTimes();
View Full Code Here

    expect(cluster.getDesiredStackVersion()).andReturn(stackId);

    expect(host1.getHostName()).andReturn("Host100").anyTimes();

    expect(host1.convertToResponse()).andReturn(hostResponse1);

    expect(hostResponse1.getClusterName()).andReturn("Cluster100").anyTimes();
    expect(hostResponse1.getHostname()).andReturn("Host100").anyTimes();
    expect(hostResponse1.getHealthStatus()).andReturn(healthStatus).anyTimes();
View Full Code Here

    expect(clusters.getClustersForHost("Host100")).andReturn(clusterSet).anyTimes();

    expect(host1.getHostName()).andReturn("Host100").anyTimes();

    expect(host1.convertToResponse()).andReturn(hostResponse1);

    expect(hostResponse1.getClusterName()).andReturn("Cluster100").anyTimes();
    expect(hostResponse1.getHostname()).andReturn("Host100").anyTimes();
    expect(hostResponse1.getHealthStatus()).andReturn(healthStatus).anyTimes();
View Full Code Here

    expect(cluster.getDesiredStackVersion()).andReturn(stackId);

    expect(host1.getHostName()).andReturn("Host100").anyTimes();

    expect(host1.convertToResponse()).andReturn(hostResponse1);

    expect(hostResponse1.getClusterName()).andReturn("Cluster100").anyTimes();
    expect(hostResponse1.getHostname()).andReturn("Host100").anyTimes();
    expect(hostResponse1.getHealthStatus()).andReturn(healthStatus).anyTimes();
View Full Code Here

    expect(clusters.getClustersForHost("Host100")).andReturn(clusterSet).anyTimes();

    expect(host1.getHostName()).andReturn("Host100").anyTimes();

    expect(host1.convertToResponse()).andReturn(hostResponse1);

    expect(hostResponse1.getClusterName()).andReturn("Cluster100").anyTimes();
    expect(hostResponse1.getHostname()).andReturn("Host100").anyTimes();
    expect(hostResponse1.getHealthStatus()).andReturn(healthStatus).anyTimes();
View Full Code Here

    expect(clusters.getClustersForHost("Host100")).andReturn(clusterSet).anyTimes();

    expect(host1.getHostName()).andReturn("Host100").anyTimes();

    expect(host1.convertToResponse()).andReturn(hostResponse1);

    expect(hostResponse1.getClusterName()).andReturn("Cluster100").anyTimes();
    expect(hostResponse1.getHostname()).andReturn("Host100").anyTimes();
    expect(hostResponse1.getHealthStatus()).andReturn(healthStatus).anyTimes();
View Full Code Here

    // getHosts
    expect(clusters.getCluster("cluster1")).andReturn(cluster);
    expect(clusters.getHost("host1")).andReturn(host);
    expect(host.getHostName()).andReturn("host1").anyTimes();
    expect(clusters.getClustersForHost("host1")).andReturn(setCluster);
    expect(host.convertToResponse()).andReturn(response);
    response.setClusterName("cluster1");

    // replay mocks
    replay(injector, clusters, cluster, host, response);
View Full Code Here

    response.setClusterName("cluster1");

    expect(clusters.getHost("host2")).andReturn(host2);
    expect(host2.getHostName()).andReturn("host2").anyTimes();
    expect(clusters.getClustersForHost("host2")).andReturn(Collections.singleton(cluster));
    expect(host2.convertToResponse()).andReturn(response2);
    response2.setClusterName("cluster1");

    expect(clusters.getHost("host3")).andThrow(new HostNotFoundException("host3"));
    expect(clusters.getHost("host4")).andThrow(new HostNotFoundException("host4"));
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.