use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.parameter.stack.YarnStackV4Parameters in project cloudbreak by hortonworks.
the class DistroXParameterConverterTest method testEnvironmentNetworkYarnParamsToYarnStackV4Parameters.
@Test
void testEnvironmentNetworkYarnParamsToYarnStackV4Parameters() {
EnvironmentNetworkYarnParams input = new EnvironmentNetworkYarnParams();
input.setLifetime(10);
input.setQueue("queue");
YarnStackV4Parameters result = underTest.convert(input);
assertNotNull(result);
assertEquals(input.getLifetime(), result.getLifetime());
assertEquals(input.getQueue(), result.getYarnQueue());
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.parameter.stack.YarnStackV4Parameters in project cloudbreak by hortonworks.
the class YarnCloudProvider method stackParameters.
@Override
public YarnStackV4Parameters stackParameters() {
YarnStackV4Parameters yarnStackV4Parameters = new YarnStackV4Parameters();
yarnStackV4Parameters.setYarnQueue(getQueue());
return yarnStackV4Parameters;
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.parameter.stack.YarnStackV4Parameters in project cloudbreak by hortonworks.
the class StackRequestManifester method setupYarnDetails.
private void setupYarnDetails(DetailedEnvironmentResponse environment, StackV4Request stackRequest) {
if (stackRequest.getYarn() == null || stackRequest.getYarn().getYarnQueue() == null) {
if (environment.getNetwork() == null || environment.getNetwork().getYarn() == null || environment.getNetwork().getYarn().getQueue() == null) {
throw new BadRequestException("There is no queue defined in your environment, please create a new yarn environment with queue");
} else {
EnvironmentNetworkYarnParams yarnParams = environment.getNetwork().getYarn();
YarnStackV4Parameters yarnStackV4Parameters = new YarnStackV4Parameters();
yarnStackV4Parameters.setYarnQueue(yarnParams.getQueue());
yarnStackV4Parameters.setLifetime(yarnParams.getLifetime());
stackRequest.setYarn(yarnStackV4Parameters);
}
}
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.parameter.stack.YarnStackV4Parameters 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());
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.parameter.stack.YarnStackV4Parameters 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());
}
Aggregations