@Override public void executeImpl(DelegateExecution execution) throws Exception { // Create the request. EmrHadoopJarStepAddRequest request = new EmrHadoopJarStepAddRequest(); populateCommonParams(request, execution); request.setJarLocation(getJarLocation(execution)); request.setMainClass(getMainClass(execution)); request.setScriptArguments(getScriptArguments(execution)); addEmrStepAndSetWorkflowVariables(request, execution); }
@Override public void executeImpl(DelegateExecution execution) throws Exception { // Create the request. EmrHadoopJarStepAddRequest request = new EmrHadoopJarStepAddRequest(); populateCommonParams(request, execution); request.setJarLocation(getJarLocation(execution)); request.setMainClass(getMainClass(execution)); request.setScriptArguments(getScriptArguments(execution)); addEmrStepAndSetWorkflowVariables(request, execution); }
scriptArgs2.add("wordcountOutput"); hadoopJarStepRequest.setStepName("Hadoop Jar"); hadoopJarStepRequest.setJarLocation("s3://test-bucket-managed/app-a/test/hadoop-mapreduce-examples-2.4.0.jar"); hadoopJarStepRequest.setMainClass("wordcount"); hadoopJarStepRequest.setScriptArguments(scriptArgs2);
scriptArgs2.add("wordcountOutput"); hadoopJarStepRequest.setStepName("Hadoop Jar"); hadoopJarStepRequest.setJarLocation("s3://test-bucket-managed/app-a/test/hadoop-mapreduce-examples-2.4.0.jar"); hadoopJarStepRequest.setMainClass("wordcount"); hadoopJarStepRequest.setScriptArguments(scriptArgs2);
/** * This method tests the happy path scenario by testing all the step types */ @Test public void testEmrAddStepsHadoopNoMainClass() throws Exception { // Create the namespace entity. NamespaceEntity namespaceEntity = namespaceDaoTestHelper.createNamespaceEntity(NAMESPACE); emrClusterDefinitionDaoTestHelper.createEmrClusterDefinitionEntity(namespaceEntity, EMR_CLUSTER_DEFINITION_NAME, IOUtils.toString(resourceLoader.getResource(EMR_CLUSTER_DEFINITION_XML_FILE_WITH_CLASSPATH).getInputStream())); EmrClusterCreateRequest request = getNewEmrClusterCreateRequest(); emrService.createCluster(request); // TODO: Why are we adding EMR steps to a list, but not doing anything with them once they're added? List<Serializable> emrSteps = new ArrayList<>(); EmrHadoopJarStepAddRequest hadoopJarStepRequest = new EmrHadoopJarStepAddRequest(); hadoopJarStepRequest.setNamespace(request.getNamespace()); hadoopJarStepRequest.setEmrClusterDefinitionName(request.getEmrClusterDefinitionName()); hadoopJarStepRequest.setEmrClusterName(request.getEmrClusterName()); hadoopJarStepRequest.setStepName("Hadoop Jar"); hadoopJarStepRequest.setJarLocation("s3://test-bucket-managed/app-a/test/hadoop-mapreduce-examples-2.4.0.jar"); emrSteps.add(hadoopJarStepRequest); EmrHadoopJarStep emrHadoopJarStep = (EmrHadoopJarStep) emrService.addStepToCluster(hadoopJarStepRequest); assertNotNull(emrHadoopJarStep); assertNotNull(emrHadoopJarStep.getId()); }
sourceJarLocation = this.getJarLocation(); String copyJarLocation = ((String) strategy.copy(LocatorUtils.property(locator, "jarLocation", sourceJarLocation), sourceJarLocation, (this.jarLocation!= null))); copy.setJarLocation(copyJarLocation); } else { if (jarLocationShouldBeCopiedAndSet == Boolean.FALSE) {
sourceJarLocation = this.getJarLocation(); String copyJarLocation = ((String) strategy.copy(LocatorUtils.property(locator, "jarLocation", sourceJarLocation), sourceJarLocation, (this.jarLocation!= null))); copy.setJarLocation(copyJarLocation); } else { if (jarLocationShouldBeCopiedAndSet == Boolean.FALSE) {
sourceJarLocation = this.getJarLocation(); String copyJarLocation = ((String) strategy.copy(LocatorUtils.property(locator, "jarLocation", sourceJarLocation), sourceJarLocation, (this.jarLocation!= null))); copy.setJarLocation(copyJarLocation); } else { if (jarLocationShouldBeCopiedAndSet == Boolean.FALSE) {