Search in sources :

Example 1 with YarnDistroXV1Parameters

use of com.sequenceiq.distrox.api.v1.distrox.model.YarnDistroXV1Parameters in project cloudbreak by hortonworks.

the class DistroXParameterConverterTest method testYarnStackV4ParametersToYarnDistroXV1Parameters.

@Test
void testYarnStackV4ParametersToYarnDistroXV1Parameters() {
    YarnStackV4Parameters input = new YarnStackV4Parameters();
    input.setYarnQueue("queue");
    input.setLifetime(10);
    YarnDistroXV1Parameters result = underTest.convert(input);
    assertNotNull(result);
    assertEquals(input.getLifetime(), result.getLifetime());
    assertEquals(input.getYarnQueue(), result.getYarnQueue());
}
Also used : YarnDistroXV1Parameters(com.sequenceiq.distrox.api.v1.distrox.model.YarnDistroXV1Parameters) YarnStackV4Parameters(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.parameter.stack.YarnStackV4Parameters) Test(org.junit.jupiter.api.Test)

Example 2 with YarnDistroXV1Parameters

use of com.sequenceiq.distrox.api.v1.distrox.model.YarnDistroXV1Parameters in project cloudbreak by hortonworks.

the class DistroXParameterConverterTest method testYarnDistroXV1ParametersToYarnStackV4Parameters.

@Test
void testYarnDistroXV1ParametersToYarnStackV4Parameters() {
    YarnDistroXV1Parameters input = new YarnDistroXV1Parameters();
    input.setYarnQueue("queue");
    input.setLifetime(10);
    YarnStackV4Parameters result = underTest.convert(input);
    assertNotNull(result);
    assertEquals(input.getLifetime(), result.getLifetime());
    assertEquals(input.getYarnQueue(), result.getYarnQueue());
}
Also used : YarnDistroXV1Parameters(com.sequenceiq.distrox.api.v1.distrox.model.YarnDistroXV1Parameters) YarnStackV4Parameters(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.parameter.stack.YarnStackV4Parameters) Test(org.junit.jupiter.api.Test)

Example 3 with YarnDistroXV1Parameters

use of com.sequenceiq.distrox.api.v1.distrox.model.YarnDistroXV1Parameters in project cloudbreak by hortonworks.

the class DistroXParameterConverter method convert.

public YarnDistroXV1Parameters convert(YarnStackV4Parameters source) {
    YarnDistroXV1Parameters response = new YarnDistroXV1Parameters();
    response.setYarnQueue(source.getYarnQueue());
    response.setLifetime(source.getLifetime());
    return response;
}
Also used : YarnDistroXV1Parameters(com.sequenceiq.distrox.api.v1.distrox.model.YarnDistroXV1Parameters)

Aggregations

YarnDistroXV1Parameters (com.sequenceiq.distrox.api.v1.distrox.model.YarnDistroXV1Parameters)3 YarnStackV4Parameters (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.parameter.stack.YarnStackV4Parameters)2 Test (org.junit.jupiter.api.Test)2