use of org.finra.herd.model.api.xml.EmrHadoopJarStepAddRequest in project herd by FINRAOS.
the class EmrHadoopJarStepHelper method buildResponseFromRequest.
@Override
public Object buildResponseFromRequest(Object stepRequest) {
EmrHadoopJarStepAddRequest emrHadoopJarStepAddRequest = (EmrHadoopJarStepAddRequest) stepRequest;
EmrHadoopJarStep step = new EmrHadoopJarStep();
step.setNamespace(emrHadoopJarStepAddRequest.getNamespace());
step.setEmrClusterDefinitionName(emrHadoopJarStepAddRequest.getEmrClusterDefinitionName());
step.setEmrClusterName(emrHadoopJarStepAddRequest.getEmrClusterName());
step.setStepName(emrHadoopJarStepAddRequest.getStepName().trim());
step.setJarLocation(emrHadoopJarStepAddRequest.getJarLocation().trim().replaceAll(getS3ManagedReplaceString(), emrHelper.getS3StagingLocation()));
if (emrHadoopJarStepAddRequest.getMainClass() != null) {
step.setMainClass(emrHadoopJarStepAddRequest.getMainClass().trim());
}
// Add the script arguments
if (!CollectionUtils.isEmpty(emrHadoopJarStepAddRequest.getScriptArguments())) {
List<String> scriptArguments = new ArrayList<>();
step.setScriptArguments(scriptArguments);
for (String argument : emrHadoopJarStepAddRequest.getScriptArguments()) {
scriptArguments.add(argument.trim());
}
}
step.setContinueOnError(emrHadoopJarStepAddRequest.isContinueOnError());
return step;
}
use of org.finra.herd.model.api.xml.EmrHadoopJarStepAddRequest in project herd by FINRAOS.
the class EmrHadoopJarStepHelper method validateAddStepRequest.
@Override
public void validateAddStepRequest(Object step) {
EmrHadoopJarStepAddRequest hadoopJarStep = (EmrHadoopJarStepAddRequest) step;
validateStepName(hadoopJarStep.getStepName());
validateJarLocation(hadoopJarStep.getJarLocation());
}
Aggregations