protected OozieWorkflowJob runOozieWorkflowImpl(RunOozieWorkflowRequest request) throws Exception {
  validateRunOozieWorkflowRequest(request);
  String namespace=request.getNamespace();
  String emrClusterDefinitionName=request.getEmrClusterDefinitionName();
  String emrClusterName=request.getEmrClusterName();
  String emrClusterId=request.getEmrClusterId();
  String clusterId=getRunningOrWaitingEmrCluster(namespace,emrClusterDefinitionName,emrClusterName,emrClusterId);
  String emrClusterPrivateIpAddress=getEmrClusterMasterIpAddress(clusterId);
  String jobId=oozieDao.runOozieWorkflow(emrClusterPrivateIpAddress,request.getWorkflowLocation(),request.getParameters());
  OozieWorkflowJob oozieWorkflowJob=new OozieWorkflowJob();
  oozieWorkflowJob.setId(jobId);
  oozieWorkflowJob.setNamespace(namespace);
  oozieWorkflowJob.setEmrClusterDefinitionName(emrClusterDefinitionName);
  oozieWorkflowJob.setEmrClusterName(emrClusterName);
  return oozieWorkflowJob;
}

protected OozieWorkflowJob runOozieWorkflowImpl ( RunOozieWorkflowRequest request ) throws Exception { validateRunOozieWorkflowRequest ( request ) ; String namespace = request . getNamespace ( ) ; String emrClusterDefinitionName = request . getEmrClusterDefinitionName ( ) ; String emrClusterName = request . getEmrClusterName ( ) ; String emrClusterId = request . getEmrClusterId ( ) ; String clusterId = getRunningOrWaitingEmrCluster ( namespace , emrClusterDefinitionName , emrClusterName , emrClusterId ) ; String emrClusterPrivateIpAddress = getEmrClusterMasterIpAddress ( clusterId ) ; String jobId = oozieDao . runOozieWorkflow ( emrClusterPrivateIpAddress , request . getWorkflowLocation ( ) , request . getParameters ( ) ) ; OozieWorkflowJob oozieWorkflowJob = new OozieWorkflowJob ( ) ; oozieWorkflowJob . setId ( jobId ) ; oozieWorkflowJob . setNamespace ( namespace ) ; oozieWorkflowJob . setEmrClusterDefinitionName ( emrClusterDefinitionName ) ; oozieWorkflowJob . setEmrClusterName ( emrClusterName ) ; return oozieWorkflowJob ; }
runs oozie job on an existing emr cluster .
