use of com.sequenceiq.environment.api.v1.environment.model.EnvironmentNetworkYarnParams in project cloudbreak by hortonworks.
the class NetworkRequestToDtoConverterTest method createYarnParams.
private EnvironmentNetworkYarnParams createYarnParams() {
EnvironmentNetworkYarnParams yarnParams = new EnvironmentNetworkYarnParams();
yarnParams.setQueue("yarn-queue");
yarnParams.setLifetime(1000);
return yarnParams;
}
use of com.sequenceiq.environment.api.v1.environment.model.EnvironmentNetworkYarnParams 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.environment.api.v1.environment.model.EnvironmentNetworkYarnParams 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.environment.api.v1.environment.model.EnvironmentNetworkYarnParams in project cloudbreak by hortonworks.
the class NetworkV1ToNetworkV4ConverterTest method yarnEnvironmentNetwork.
private DetailedEnvironmentResponse yarnEnvironmentNetwork() {
DetailedEnvironmentResponse der = new DetailedEnvironmentResponse();
der.setCloudPlatform("YARN");
EnvironmentNetworkResponse environmentNetworkResponse = new EnvironmentNetworkResponse();
EnvironmentNetworkYarnParams environmentNetwork = new EnvironmentNetworkYarnParams();
environmentNetwork.setQueue("default");
environmentNetworkResponse.setYarn(environmentNetwork);
der.setNetwork(environmentNetworkResponse);
return der;
}
use of com.sequenceiq.environment.api.v1.environment.model.EnvironmentNetworkYarnParams in project cloudbreak by hortonworks.
the class YarnCloudProvider method environmentNetworkParameters.
private EnvironmentNetworkYarnParams environmentNetworkParameters() {
EnvironmentNetworkYarnParams environmentNetworkYarnParams = new EnvironmentNetworkYarnParams();
environmentNetworkYarnParams.setQueue(getQueue());
return environmentNetworkYarnParams;
}
Aggregations