@Override public StepConfig getEmrStepConfig(Object step) { EmrPigStep pigStep = (EmrPigStep) step; // Default ActionOnFailure is to cancel the execution and wait ActionOnFailure actionOnFailure = ActionOnFailure.CANCEL_AND_WAIT; if (pigStep.isContinueOnError() != null && pigStep.isContinueOnError()) { // Override based on user input actionOnFailure = ActionOnFailure.CONTINUE; } // If there are no arguments to hive script if (CollectionUtils.isEmpty(pigStep.getScriptArguments())) { // Just build the StepConfig object and return return new StepConfig().withName(pigStep.getStepName().trim()).withActionOnFailure(actionOnFailure) .withHadoopJarStep(new StepFactory().newRunPigScriptStep(pigStep.getScriptLocation().trim())); } // If there are arguments specified else { return new StepConfig().withName(pigStep.getStepName().trim()).withActionOnFailure(actionOnFailure).withHadoopJarStep(new StepFactory() .newRunPigScriptStep(pigStep.getScriptLocation().trim(), pigStep.getScriptArguments().toArray(new String[pigStep.getScriptArguments().size()]))); } }
@Override public StepConfig getEmrStepConfig(Object step) { EmrPigStep pigStep = (EmrPigStep) step; // Default ActionOnFailure is to cancel the execution and wait ActionOnFailure actionOnFailure = ActionOnFailure.CANCEL_AND_WAIT; if (pigStep.isContinueOnError() != null && pigStep.isContinueOnError()) { // Override based on user input actionOnFailure = ActionOnFailure.CONTINUE; } // If there are no arguments to hive script if (CollectionUtils.isEmpty(pigStep.getScriptArguments())) { // Just build the StepConfig object and return return new StepConfig().withName(pigStep.getStepName().trim()).withActionOnFailure(actionOnFailure) .withHadoopJarStep(new StepFactory().newRunPigScriptStep(pigStep.getScriptLocation().trim())); } // If there are arguments specified else { return new StepConfig().withName(pigStep.getStepName().trim()).withActionOnFailure(actionOnFailure).withHadoopJarStep(new StepFactory() .newRunPigScriptStep(pigStep.getScriptLocation().trim(), pigStep.getScriptArguments().toArray(new String[pigStep.getScriptArguments().size()]))); } }
theScriptArguments = ((this.scriptArguments!= null)?this.getScriptArguments():null); strategy.appendField(locator, this, "scriptArguments", buffer, theScriptArguments, (this.scriptArguments!= null));
lhsScriptArguments = ((this.scriptArguments!= null)?this.getScriptArguments():null); List<String> rhsScriptArguments; rhsScriptArguments = ((that.scriptArguments!= null)?that.getScriptArguments():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "scriptArguments", lhsScriptArguments), LocatorUtils.property(thatLocator, "scriptArguments", rhsScriptArguments), lhsScriptArguments, rhsScriptArguments, (this.scriptArguments!= null), (that.scriptArguments!= null))) { return false;
lhsScriptArguments = ((this.scriptArguments!= null)?this.getScriptArguments():null); List<String> rhsScriptArguments; rhsScriptArguments = ((that.scriptArguments!= null)?that.getScriptArguments():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "scriptArguments", lhsScriptArguments), LocatorUtils.property(thatLocator, "scriptArguments", rhsScriptArguments), lhsScriptArguments, rhsScriptArguments, (this.scriptArguments!= null), (that.scriptArguments!= null))) { return false;
theScriptArguments = ((this.scriptArguments!= null)?this.getScriptArguments():null); strategy.appendField(locator, this, "scriptArguments", buffer, theScriptArguments, (this.scriptArguments!= null));
theScriptArguments = ((this.scriptArguments!= null)?this.getScriptArguments():null); strategy.appendField(locator, this, "scriptArguments", buffer, theScriptArguments, (this.scriptArguments!= null));
lhsScriptArguments = ((this.scriptArguments!= null)?this.getScriptArguments():null); List<String> rhsScriptArguments; rhsScriptArguments = ((that.scriptArguments!= null)?that.getScriptArguments():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "scriptArguments", lhsScriptArguments), LocatorUtils.property(thatLocator, "scriptArguments", rhsScriptArguments), lhsScriptArguments, rhsScriptArguments, (this.scriptArguments!= null), (that.scriptArguments!= null))) { return false;
theScriptArguments = ((this.scriptArguments!= null)?this.getScriptArguments():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "scriptArguments", theScriptArguments), currentHashCode, theScriptArguments, (this.scriptArguments!= null));
theScriptArguments = ((this.scriptArguments!= null)?this.getScriptArguments():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "scriptArguments", theScriptArguments), currentHashCode, theScriptArguments, (this.scriptArguments!= null));
theScriptArguments = ((this.scriptArguments!= null)?this.getScriptArguments():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "scriptArguments", theScriptArguments), currentHashCode, theScriptArguments, (this.scriptArguments!= null));
if (scriptArgumentsShouldBeCopiedAndSet == Boolean.TRUE) { List<String> sourceScriptArguments; sourceScriptArguments = ((this.scriptArguments!= null)?this.getScriptArguments():null); @SuppressWarnings("unchecked") List<String> copyScriptArguments = ((List<String> ) strategy.copy(LocatorUtils.property(locator, "scriptArguments", sourceScriptArguments), sourceScriptArguments, (this.scriptArguments!= null)));
if (scriptArgumentsShouldBeCopiedAndSet == Boolean.TRUE) { List<String> sourceScriptArguments; sourceScriptArguments = ((this.scriptArguments!= null)?this.getScriptArguments():null); @SuppressWarnings("unchecked") List<String> copyScriptArguments = ((List<String> ) strategy.copy(LocatorUtils.property(locator, "scriptArguments", sourceScriptArguments), sourceScriptArguments, (this.scriptArguments!= null)));
if (scriptArgumentsShouldBeCopiedAndSet == Boolean.TRUE) { List<String> sourceScriptArguments; sourceScriptArguments = ((this.scriptArguments!= null)?this.getScriptArguments():null); @SuppressWarnings("unchecked") List<String> copyScriptArguments = ((List<String> ) strategy.copy(LocatorUtils.property(locator, "scriptArguments", sourceScriptArguments), sourceScriptArguments, (this.scriptArguments!= null)));