if (getSteps() != null) sb.append("Steps: ").append(getSteps()).append(","); if (getBootstrapActions() != null) sb.append("BootstrapActions: ").append(getBootstrapActions()).append(","); if (getSupportedProducts() != null) sb.append("SupportedProducts: ").append(getSupportedProducts()).append(",");
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getLogUri() == null) ? 0 : getLogUri().hashCode()); hashCode = prime * hashCode + ((getAdditionalInfo() == null) ? 0 : getAdditionalInfo().hashCode()); hashCode = prime * hashCode + ((getAmiVersion() == null) ? 0 : getAmiVersion().hashCode()); hashCode = prime * hashCode + ((getReleaseLabel() == null) ? 0 : getReleaseLabel().hashCode()); hashCode = prime * hashCode + ((getInstances() == null) ? 0 : getInstances().hashCode()); hashCode = prime * hashCode + ((getSteps() == null) ? 0 : getSteps().hashCode()); hashCode = prime * hashCode + ((getBootstrapActions() == null) ? 0 : getBootstrapActions().hashCode()); hashCode = prime * hashCode + ((getSupportedProducts() == null) ? 0 : getSupportedProducts().hashCode()); hashCode = prime * hashCode + ((getNewSupportedProducts() == null) ? 0 : getNewSupportedProducts().hashCode()); hashCode = prime * hashCode + ((getApplications() == null) ? 0 : getApplications().hashCode()); hashCode = prime * hashCode + ((getConfigurations() == null) ? 0 : getConfigurations().hashCode()); hashCode = prime * hashCode + ((getVisibleToAllUsers() == null) ? 0 : getVisibleToAllUsers().hashCode()); hashCode = prime * hashCode + ((getJobFlowRole() == null) ? 0 : getJobFlowRole().hashCode()); hashCode = prime * hashCode + ((getServiceRole() == null) ? 0 : getServiceRole().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getSecurityConfiguration() == null) ? 0 : getSecurityConfiguration().hashCode()); hashCode = prime * hashCode + ((getAutoScalingRole() == null) ? 0 : getAutoScalingRole().hashCode()); hashCode = prime * hashCode + ((getScaleDownBehavior() == null) ? 0 : getScaleDownBehavior().hashCode()); hashCode = prime * hashCode + ((getCustomAmiId() == null) ? 0 : getCustomAmiId().hashCode()); hashCode = prime * hashCode + ((getEbsRootVolumeSize() == null) ? 0 : getEbsRootVolumeSize().hashCode()); hashCode = prime * hashCode + ((getRepoUpgradeOnBoot() == null) ? 0 : getRepoUpgradeOnBoot().hashCode()); hashCode = prime * hashCode + ((getKerberosAttributes() == null) ? 0 : getKerberosAttributes().hashCode()); return hashCode; }
if (other.getSteps() != null && other.getSteps().equals(this.getSteps()) == false) return false; if (other.getBootstrapActions() == null ^ this.getBootstrapActions() == null) return false; if (other.getBootstrapActions() != null && other.getBootstrapActions().equals(this.getBootstrapActions()) == false) return false; if (other.getSupportedProducts() == null ^ this.getSupportedProducts() == null)
protocolMarshaller.marshall(runJobFlowRequest.getInstances(), INSTANCES_BINDING); protocolMarshaller.marshall(runJobFlowRequest.getSteps(), STEPS_BINDING); protocolMarshaller.marshall(runJobFlowRequest.getBootstrapActions(), BOOTSTRAPACTIONS_BINDING); protocolMarshaller.marshall(runJobFlowRequest.getSupportedProducts(), SUPPORTEDPRODUCTS_BINDING); protocolMarshaller.marshall(runJobFlowRequest.getNewSupportedProducts(), NEWSUPPORTEDPRODUCTS_BINDING);
@Override public String answer(InvocationOnMock invocation) throws Throwable { RunJobFlowRequest runJobFlowRequest = invocation.getArgument(1); // No bootstrap action should be added assertEquals(0, runJobFlowRequest.getBootstrapActions().size()); return clusterId; } });
if (getSteps() != null) sb.append("Steps: ").append(getSteps()).append(","); if (getBootstrapActions() != null) sb.append("BootstrapActions: ").append(getBootstrapActions()).append(","); if (getSupportedProducts() != null) sb.append("SupportedProducts: ").append(getSupportedProducts()).append(",");
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getLogUri() == null) ? 0 : getLogUri().hashCode()); hashCode = prime * hashCode + ((getAdditionalInfo() == null) ? 0 : getAdditionalInfo().hashCode()); hashCode = prime * hashCode + ((getAmiVersion() == null) ? 0 : getAmiVersion().hashCode()); hashCode = prime * hashCode + ((getReleaseLabel() == null) ? 0 : getReleaseLabel().hashCode()); hashCode = prime * hashCode + ((getInstances() == null) ? 0 : getInstances().hashCode()); hashCode = prime * hashCode + ((getSteps() == null) ? 0 : getSteps().hashCode()); hashCode = prime * hashCode + ((getBootstrapActions() == null) ? 0 : getBootstrapActions().hashCode()); hashCode = prime * hashCode + ((getSupportedProducts() == null) ? 0 : getSupportedProducts().hashCode()); hashCode = prime * hashCode + ((getNewSupportedProducts() == null) ? 0 : getNewSupportedProducts().hashCode()); hashCode = prime * hashCode + ((getApplications() == null) ? 0 : getApplications().hashCode()); hashCode = prime * hashCode + ((getConfigurations() == null) ? 0 : getConfigurations().hashCode()); hashCode = prime * hashCode + ((getVisibleToAllUsers() == null) ? 0 : getVisibleToAllUsers().hashCode()); hashCode = prime * hashCode + ((getJobFlowRole() == null) ? 0 : getJobFlowRole().hashCode()); hashCode = prime * hashCode + ((getServiceRole() == null) ? 0 : getServiceRole().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getSecurityConfiguration() == null) ? 0 : getSecurityConfiguration().hashCode()); hashCode = prime * hashCode + ((getAutoScalingRole() == null) ? 0 : getAutoScalingRole().hashCode()); hashCode = prime * hashCode + ((getScaleDownBehavior() == null) ? 0 : getScaleDownBehavior().hashCode()); hashCode = prime * hashCode + ((getCustomAmiId() == null) ? 0 : getCustomAmiId().hashCode()); hashCode = prime * hashCode + ((getEbsRootVolumeSize() == null) ? 0 : getEbsRootVolumeSize().hashCode()); hashCode = prime * hashCode + ((getRepoUpgradeOnBoot() == null) ? 0 : getRepoUpgradeOnBoot().hashCode()); hashCode = prime * hashCode + ((getKerberosAttributes() == null) ? 0 : getKerberosAttributes().hashCode()); return hashCode; }
if (other.getSteps() != null && other.getSteps().equals(this.getSteps()) == false) return false; if (other.getBootstrapActions() == null ^ this.getBootstrapActions() == null) return false; if (other.getBootstrapActions() != null && other.getBootstrapActions().equals(this.getBootstrapActions()) == false) return false; if (other.getSupportedProducts() == null ^ this.getSupportedProducts() == null)
assertEquals("amiVersion", runJobFlowRequest.getAmiVersion()); assertEquals("additionalInfo", runJobFlowRequest.getAdditionalInfo()); assertEquals(7, runJobFlowRequest.getBootstrapActions().size()); BootstrapActionConfig bootstrapActionConfig = runJobFlowRequest.getBootstrapActions().get(0); assertEquals("emr.encryption.script", bootstrapActionConfig.getName()); ScriptBootstrapActionConfig scriptBootstrapAction = bootstrapActionConfig.getScriptBootstrapAction(); BootstrapActionConfig bootstrapActionConfig = runJobFlowRequest.getBootstrapActions().get(1); assertEquals("emr.aws.configure.daemon", bootstrapActionConfig.getName()); ScriptBootstrapActionConfig scriptBootstrapAction = bootstrapActionConfig.getScriptBootstrapAction(); BootstrapActionConfig bootstrapActionConfig = runJobFlowRequest.getBootstrapActions().get(2); assertEquals("emr.aws.configure.hadoop", bootstrapActionConfig.getName()); ScriptBootstrapActionConfig scriptBootstrapAction = bootstrapActionConfig.getScriptBootstrapAction(); BootstrapActionConfig bootstrapActionConfig = runJobFlowRequest.getBootstrapActions().get(3); assertEquals("scriptDefinitionAllName1", bootstrapActionConfig.getName()); ScriptBootstrapActionConfig scriptBootstrapAction = bootstrapActionConfig.getScriptBootstrapAction(); BootstrapActionConfig bootstrapActionConfig = runJobFlowRequest.getBootstrapActions().get(4); ScriptBootstrapActionConfig scriptBootstrapAction = bootstrapActionConfig.getScriptBootstrapAction(); assertEquals(0, scriptBootstrapAction.getArgs().size()); BootstrapActionConfig bootstrapActionConfig = runJobFlowRequest.getBootstrapActions().get(5); assertEquals("scriptDefinitionMasterName1", bootstrapActionConfig.getName()); ScriptBootstrapActionConfig scriptBootstrapAction = bootstrapActionConfig.getScriptBootstrapAction(); BootstrapActionConfig bootstrapActionConfig = runJobFlowRequest.getBootstrapActions().get(6);
protocolMarshaller.marshall(runJobFlowRequest.getInstances(), INSTANCES_BINDING); protocolMarshaller.marshall(runJobFlowRequest.getSteps(), STEPS_BINDING); protocolMarshaller.marshall(runJobFlowRequest.getBootstrapActions(), BOOTSTRAPACTIONS_BINDING); protocolMarshaller.marshall(runJobFlowRequest.getSupportedProducts(), SUPPORTEDPRODUCTS_BINDING); protocolMarshaller.marshall(runJobFlowRequest.getNewSupportedProducts(), NEWSUPPORTEDPRODUCTS_BINDING);