Search in sources :

Example 6 with YarnComponent

use of com.sequenceiq.cloudbreak.orchestrator.yarn.model.core.YarnComponent in project cloudbreak by hortonworks.

the class ComponentTest method testName.

@Test
public void testName() {
    YarnComponent component = new YarnComponent();
    component.setName(NAME);
    assertEquals(NAME, component.getName());
}
Also used : YarnComponent(com.sequenceiq.cloudbreak.orchestrator.yarn.model.core.YarnComponent) Test(org.junit.Test)

Example 7 with YarnComponent

use of com.sequenceiq.cloudbreak.orchestrator.yarn.model.core.YarnComponent in project cloudbreak by hortonworks.

the class CreateApplicationRequestTest method testComponents.

@Test
public void testComponents() throws Exception {
    YarnComponent component = new YarnComponent();
    CreateApplicationRequest createApplicationRequest = new CreateApplicationRequest();
    List<YarnComponent> components = new ArrayList<>();
    components.add(component);
    createApplicationRequest.setComponents(components);
    assertEquals(1, createApplicationRequest.getComponents().size());
}
Also used : CreateApplicationRequest(com.sequenceiq.cloudbreak.orchestrator.yarn.model.request.CreateApplicationRequest) ArrayList(java.util.ArrayList) YarnComponent(com.sequenceiq.cloudbreak.orchestrator.yarn.model.core.YarnComponent) Test(org.junit.Test)

Aggregations

YarnComponent (com.sequenceiq.cloudbreak.orchestrator.yarn.model.core.YarnComponent)7 Test (org.junit.Test)6 CreateApplicationRequest (com.sequenceiq.cloudbreak.orchestrator.yarn.model.request.CreateApplicationRequest)3 ArrayList (java.util.ArrayList)3 Artifact (com.sequenceiq.cloudbreak.orchestrator.yarn.model.core.Artifact)2 Dependency (com.sequenceiq.cloudbreak.orchestrator.yarn.model.core.Dependency)2 Resource (com.sequenceiq.cloudbreak.orchestrator.yarn.model.core.Resource)2 CloudbreakOrchestratorFailedException (com.sequenceiq.cloudbreak.orchestrator.exception.CloudbreakOrchestratorFailedException)1 YarnClient (com.sequenceiq.cloudbreak.orchestrator.yarn.client.YarnClient)1 YarnHttpClient (com.sequenceiq.cloudbreak.orchestrator.yarn.client.YarnHttpClient)1 CreateApplicationRequestToJsonConverter (com.sequenceiq.cloudbreak.orchestrator.yarn.converter.request.CreateApplicationRequestToJsonConverter)1