Package org.apache.ambari.server.state

Examples of org.apache.ambari.server.state.ServiceInfo


      SystemException, UnsupportedPropertyException, NoSuchParentResourceException
  {
    Request request = createMock(Request.class);

    Map<String, ServiceInfo> services = new HashMap<String, ServiceInfo>();
    ServiceInfo service = new ServiceInfo();
    service.setName("test-service");
    services.put("test-service", service);

    List<ComponentInfo> serviceComponents = new ArrayList<ComponentInfo>();
    ComponentInfo component1 = new ComponentInfo();
    // change component1->foo which results in a validation failure for bad component name
View Full Code Here


    Set<StackServiceComponentResponse> setServiceComponents = new HashSet<StackServiceComponentResponse>();
    setServiceComponents.add(stackServiceComponentResponse);
    setServiceComponents.add(stackServiceComponentResponse2);

    Map<String, ServiceInfo> services = new HashMap<String, ServiceInfo>();
    ServiceInfo service = new ServiceInfo();
    service.setName("test-service");
    services.put("test-service", service);

    List<ComponentInfo> serviceComponents = new ArrayList<ComponentInfo>();
    ComponentInfo component1 = new ComponentInfo();
    component1.setName("component1");
View Full Code Here

    dependencyInfo.setAutoDeploy(autoDeployInfo);
    dependencyInfo.setScope("cluster");
    dependencyInfo.setName("test-service/component1");

    Map<String, ServiceInfo> services = new HashMap<String, ServiceInfo>();
    ServiceInfo service = new ServiceInfo();
    service.setName("test-service");
    services.put("test-service", service);

    List<ComponentInfo> serviceComponents = new ArrayList<ComponentInfo>();
    ComponentInfo component1 = new ComponentInfo();
    component1.setName("component1");
View Full Code Here

    dependencyInfo.setAutoDeploy(autoDeployInfo);
    dependencyInfo.setScope("cluster");
    dependencyInfo.setName("test-service/component2");

    Map<String, ServiceInfo> services = new HashMap<String, ServiceInfo>();
    ServiceInfo service = new ServiceInfo();
    service.setName("test-service");
    services.put("test-service", service);

    List<ComponentInfo> serviceComponents = new ArrayList<ComponentInfo>();
    ComponentInfo component1 = new ComponentInfo();
    component1.setName("component1");
View Full Code Here

    Set<StackServiceComponentResponse> setServiceComponents = new HashSet<StackServiceComponentResponse>();
    setServiceComponents.add(stackServiceComponentResponse);
    setServiceComponents.add(stackServiceComponentResponse2);

    Map<String, ServiceInfo> services = new HashMap<String, ServiceInfo>();
    ServiceInfo service = new ServiceInfo();
    service.setName("test-service");
    services.put("test-service", service);

    List<ComponentInfo> serviceComponents = new ArrayList<ComponentInfo>();
    ComponentInfo component1 = new ComponentInfo();
    component1.setName("component1");
View Full Code Here

    Request request = createMock(Request.class);
    AmbariManagementController managementController = createMock(AmbariManagementController.class);
    Capture<Set<StackServiceRequest>> stackServiceRequestCapture = new Capture<Set<StackServiceRequest>>();

    Map<String, ServiceInfo> services = new HashMap<String, ServiceInfo>();
    ServiceInfo service = new ServiceInfo();
    service.setName("test-service");
    services.put("test-service", service);

    List<ComponentInfo> serviceComponents = new ArrayList<ComponentInfo>();
    ComponentInfo component1 = new ComponentInfo();
    component1.setName("component1");
View Full Code Here

   * Method: getServiceInfo(String stackName, String version, String
   * serviceName)
   */
  @Test
  public void getServiceInfo() throws Exception {
    ServiceInfo si = metaInfo.getServiceInfo(STACK_NAME_HDP, STACK_VERSION_HDP,
        SERVICE_NAME_HDFS);
    assertNotNull(si);
  }
View Full Code Here

    assertNotNull(si);
  }

  @Test
  public void testConfigDependencies() throws Exception {
    ServiceInfo serviceInfo = metaInfo.getServiceInfo(STACK_NAME_HDP, EXT_STACK_NAME,
      SERVICE_NAME_MAPRED2);
    assertNotNull(serviceInfo);
    assertTrue(!serviceInfo.getConfigDependencies().isEmpty());
  }
View Full Code Here

   * Make sure global mapping is avaliable when global.xml is
   * in the path.
   * @throws Exception
   */
  public void testGlobalMapping() throws Exception {
    ServiceInfo sinfo = metaInfo.getServiceInfo("HDP",
        "0.2", "HDFS");
    List<PropertyInfo> pinfo = sinfo.getProperties();
    /** check all the config knobs and make sure the global one is there **/
    boolean checkforglobal = false;

    for (PropertyInfo pinfol: pinfo) {
      if ("global.xml".equals(pinfol.getFilename())) {
        checkforglobal = true;
      }
    }
    Assert.assertTrue(checkforglobal);
    sinfo = metaInfo.getServiceInfo("HDP",
        "0.2", "MAPREDUCE");
    boolean checkforhadoopheapsize = false;
    pinfo = sinfo.getProperties();
    for (PropertyInfo pinfol: pinfo) {
      if ("global.xml".equals(pinfol.getFilename())) {
        if ("hadoop_heapsize".equals(pinfol.getName()))
          checkforhadoopheapsize = true;
      }
View Full Code Here

    }
  }

  @Test
  public void testGetService() throws Exception {
    ServiceInfo service = metaInfo.getService(STACK_NAME_HDP, STACK_VERSION_HDP, SERVICE_NAME_HDFS);
    Assert.assertEquals(service.getName(), SERVICE_NAME_HDFS);
    try {
      metaInfo.getService(STACK_NAME_HDP, STACK_VERSION_HDP, NON_EXT_VALUE);
    } catch (StackAccessException e) {
      Assert.assertTrue(e instanceof StackAccessException);
    }
View Full Code Here

TOP

Related Classes of org.apache.ambari.server.state.ServiceInfo

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.