private void validateAddStepToClusterRequest(Object request,EmrStepHelper stepHelper) throws IllegalArgumentException {
  String namespace=stepHelper.getRequestNamespace(request);
  String clusterDefinitionName=stepHelper.getRequestEmrClusterDefinitionName(request);
  String clusterName=stepHelper.getRequestEmrClusterName(request);
  Assert.hasText(namespace,"A namespace must be specified.");
  Assert.hasText(clusterDefinitionName,"An EMR cluster definition name must be specified.");
  Assert.hasText(clusterName,"An EMR cluster name must be specified.");
  stepHelper.setRequestNamespace(request,namespace.trim());
  stepHelper.setRequestEmrClusterDefinitionName(request,clusterDefinitionName.trim());
  stepHelper.setRequestEmrClusterName(request,clusterName.trim());
}

private void validateAddStepToClusterRequest ( Object request , EmrStepHelper stepHelper ) throws IllegalArgumentException { String namespace = stepHelper . getRequestNamespace ( request ) ; String clusterDefinitionName = stepHelper . getRequestEmrClusterDefinitionName ( request ) ; String clusterName = stepHelper . getRequestEmrClusterName ( request ) ; Assert . hasText ( namespace , "A namespace must be specified." ) ; Assert . hasText ( clusterDefinitionName , "An EMR cluster definition name must be specified." ) ; Assert . hasText ( clusterName , "An EMR cluster name must be specified." ) ; stepHelper . setRequestNamespace ( request , namespace . trim ( ) ) ; stepHelper . setRequestEmrClusterDefinitionName ( request , clusterDefinitionName . trim ( ) ) ; stepHelper . setRequestEmrClusterName ( request , clusterName . trim ( ) ) ; }
validates the add steps to emr cluster create request . this method also trims request parameters .
