@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()]))); } }
theScriptLocation = this.getScriptLocation(); strategy.appendField(locator, this, "scriptLocation", buffer, theScriptLocation, (this.scriptLocation!= null));
lhsScriptLocation = this.getScriptLocation(); String rhsScriptLocation; rhsScriptLocation = that.getScriptLocation(); if (!strategy.equals(LocatorUtils.property(thisLocator, "scriptLocation", lhsScriptLocation), LocatorUtils.property(thatLocator, "scriptLocation", rhsScriptLocation), lhsScriptLocation, rhsScriptLocation, (this.scriptLocation!= null), (that.scriptLocation!= null))) { return false;
lhsScriptLocation = this.getScriptLocation(); String rhsScriptLocation; rhsScriptLocation = that.getScriptLocation(); if (!strategy.equals(LocatorUtils.property(thisLocator, "scriptLocation", lhsScriptLocation), LocatorUtils.property(thatLocator, "scriptLocation", rhsScriptLocation), lhsScriptLocation, rhsScriptLocation, (this.scriptLocation!= null), (that.scriptLocation!= null))) { return false;
theScriptLocation = this.getScriptLocation(); strategy.appendField(locator, this, "scriptLocation", buffer, theScriptLocation, (this.scriptLocation!= null));
theScriptLocation = this.getScriptLocation(); strategy.appendField(locator, this, "scriptLocation", buffer, theScriptLocation, (this.scriptLocation!= null));
lhsScriptLocation = this.getScriptLocation(); String rhsScriptLocation; rhsScriptLocation = that.getScriptLocation(); if (!strategy.equals(LocatorUtils.property(thisLocator, "scriptLocation", lhsScriptLocation), LocatorUtils.property(thatLocator, "scriptLocation", rhsScriptLocation), lhsScriptLocation, rhsScriptLocation, (this.scriptLocation!= null), (that.scriptLocation!= null))) { return false;
theScriptLocation = this.getScriptLocation(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "scriptLocation", theScriptLocation), currentHashCode, theScriptLocation, (this.scriptLocation!= null));
theScriptLocation = this.getScriptLocation(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "scriptLocation", theScriptLocation), currentHashCode, theScriptLocation, (this.scriptLocation!= null));
theScriptLocation = this.getScriptLocation(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "scriptLocation", theScriptLocation), currentHashCode, theScriptLocation, (this.scriptLocation!= null));
if (scriptLocationShouldBeCopiedAndSet == Boolean.TRUE) { String sourceScriptLocation; sourceScriptLocation = this.getScriptLocation(); String copyScriptLocation = ((String) strategy.copy(LocatorUtils.property(locator, "scriptLocation", sourceScriptLocation), sourceScriptLocation, (this.scriptLocation!= null))); copy.setScriptLocation(copyScriptLocation);
if (scriptLocationShouldBeCopiedAndSet == Boolean.TRUE) { String sourceScriptLocation; sourceScriptLocation = this.getScriptLocation(); String copyScriptLocation = ((String) strategy.copy(LocatorUtils.property(locator, "scriptLocation", sourceScriptLocation), sourceScriptLocation, (this.scriptLocation!= null))); copy.setScriptLocation(copyScriptLocation);
if (scriptLocationShouldBeCopiedAndSet == Boolean.TRUE) { String sourceScriptLocation; sourceScriptLocation = this.getScriptLocation(); String copyScriptLocation = ((String) strategy.copy(LocatorUtils.property(locator, "scriptLocation", sourceScriptLocation), sourceScriptLocation, (this.scriptLocation!= null))); copy.setScriptLocation(copyScriptLocation);