Examples of ClusterResourceDefinition


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

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

    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

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

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

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

    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

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

*/
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

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

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