Package org.apache.ambari.server.api.resources

Examples of org.apache.ambari.server.api.resources.ClusterResourceDefinition


* ClusterBlueprintRenderer unit tests.
*/
public class ClusterBlueprintRendererTest {
  @Test
  public void testFinalizeProperties__instance() {
    QueryInfo rootQuery = new QueryInfo(new ClusterResourceDefinition(), new HashSet<String>());
    TreeNode<QueryInfo> queryTree = new TreeNodeImpl<QueryInfo>(null, rootQuery, "Cluster");
    rootQuery.getProperties().add("foo/bar");
    rootQuery.getProperties().add("prop1");

    QueryInfo hostInfo = new QueryInfo(new HostResourceDefinition(), new HashSet<String>());
View Full Code Here


    assertTrue(propertyTree.getChild("Host/HostComponent").getObject().contains("HostRoles/component_name"));
  }

  @Test
  public void testFinalizeProperties__instance_noComponentNode() {
    QueryInfo rootQuery = new QueryInfo(new ClusterResourceDefinition(), new HashSet<String>());
    TreeNode<QueryInfo> queryTree = new TreeNodeImpl<QueryInfo>(null, rootQuery, "Cluster");
    rootQuery.getProperties().add("foo/bar");
    rootQuery.getProperties().add("prop1");

    ClusterBlueprintRenderer renderer = new ClusterBlueprintRenderer();
View Full Code Here

  //todo: BaseResourceDefinition.BaseHrefPostProcessor calls static ClusterControllerHelper.getClusterController().


  private TreeNode<QueryInfo> createPropertyTree() {
    TreeNode<QueryInfo> propertyTree = new TreeNodeImpl<QueryInfo>(null, new QueryInfo(
        new ClusterResourceDefinition(), new HashSet<String>()), "Cluster");
    Set<String> clusterProperties = propertyTree.getObject().getProperties();
    clusterProperties.add("Clusters/cluster_name");
    clusterProperties.add("Clusters/version");
    clusterProperties.add("Clusters/prop1");
    clusterProperties.add("foo");
View Full Code Here

    return propertyTree;
  }

  private TreeNode<QueryInfo> createPropertyTreeWithSubProps() {
    TreeNode<QueryInfo> propertyTree = new TreeNodeImpl<QueryInfo>(null, new QueryInfo(
        new ClusterResourceDefinition(), new HashSet<String>()), "Cluster");
    Set<String> clusterProperties = propertyTree.getObject().getProperties();
    clusterProperties.add("Clusters/cluster_name");
    clusterProperties.add("Clusters/version");
    clusterProperties.add("Clusters/prop1");
    clusterProperties.add("foo");
View Full Code Here

*/
public class QueryInfoTest {
  @Test
  public void testGetProperties() {
    Set<String> properties = new HashSet<String>();
    QueryInfo info = new QueryInfo(new ClusterResourceDefinition(), properties);

    assertEquals(properties, info.getProperties());
  }
View Full Code Here

    assertEquals(properties, info.getProperties());
  }

  @Test
  public void testGetResource() {
    ResourceDefinition resource = new ClusterResourceDefinition();
    QueryInfo info = new QueryInfo(resource, new HashSet<String>());

    assertSame(resource, info.getResource());
  }
View Full Code Here

TOP

Related Classes of org.apache.ambari.server.api.resources.ClusterResourceDefinition

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.