runJobFlowRequest.setKerberosAttributes(getKerberosAttributes(emrClusterDefinition.getKerberosAttributes()));
runJobFlowRequest.setKerberosAttributes(getKerberosAttributes(emrClusterDefinition.getKerberosAttributes()));
/** * This method tests the happy path scenario by providing all the parameters */ @Test public void testCreateEmrCluster() throws Exception { // Create the namespace entity. NamespaceEntity namespaceEntity = namespaceDaoTestHelper.createNamespaceEntity(NAMESPACE); String definitionXml = IOUtils.toString(resourceLoader.getResource(EMR_CLUSTER_DEFINITION_XML_FILE_WITH_CLASSPATH).getInputStream()); EmrClusterDefinition expectedEmrClusterDefinition = xmlHelper.unmarshallXmlToObject(EmrClusterDefinition.class, definitionXml); assertEquals("scaleDownBehavior", expectedEmrClusterDefinition.getScaleDownBehavior()); assertNotNull(expectedEmrClusterDefinition.getKerberosAttributes()); emrClusterDefinitionDaoTestHelper.createEmrClusterDefinitionEntity(namespaceEntity, EMR_CLUSTER_DEFINITION_NAME, definitionXml); // Create a new EMR cluster create request EmrClusterCreateRequest request = getNewEmrClusterCreateRequest(); EmrCluster emrCluster = emrService.createCluster(request); // Validate the returned object against the input. assertNotNull(emrCluster); assertTrue(emrCluster.getNamespace().equals(request.getNamespace())); assertTrue(emrCluster.getEmrClusterDefinitionName().equals(request.getEmrClusterDefinitionName())); assertTrue(emrCluster.getEmrClusterName().equals(request.getEmrClusterName())); assertNull(emrCluster.getAccountId()); assertNotNull(emrCluster.getId()); assertNull(emrCluster.isDryRun()); assertNotNull(emrCluster.getEmrClusterDefinition()); assertTrue(emrCluster.isEmrClusterCreated()); assertEquals(expectedEmrClusterDefinition, emrCluster.getEmrClusterDefinition()); validateEmrClusterCreationLogUnique(emrCluster, expectedEmrClusterDefinition); }
new EmrClusterDefinitionKerberosAttributes("test" + Math.random(), "test" + Math.random(), "test" + Math.random(), "test" + Math.random(), "test" + Math.random())); expectedEmrClusterDefinition.setKerberosAttributes(emrClusterDefinitionOverride.getKerberosAttributes()); request.setEmrClusterDefinitionOverride(emrClusterDefinitionOverride);
if (emrClusterDefinitionOverride.getKerberosAttributes() != null) emrClusterDefinition.setKerberosAttributes(emrClusterDefinitionOverride.getKerberosAttributes());
if (emrClusterDefinitionOverride.getKerberosAttributes() != null) emrClusterDefinition.setKerberosAttributes(emrClusterDefinitionOverride.getKerberosAttributes());
lhsKerberosAttributes = this.getKerberosAttributes(); EmrClusterDefinitionKerberosAttributes rhsKerberosAttributes; rhsKerberosAttributes = that.getKerberosAttributes(); if (!strategy.equals(LocatorUtils.property(thisLocator, "kerberosAttributes", lhsKerberosAttributes), LocatorUtils.property(thatLocator, "kerberosAttributes", rhsKerberosAttributes), lhsKerberosAttributes, rhsKerberosAttributes, (this.kerberosAttributes!= null), (that.kerberosAttributes!= null))) { return false;
lhsKerberosAttributes = this.getKerberosAttributes(); EmrClusterDefinitionKerberosAttributes rhsKerberosAttributes; rhsKerberosAttributes = that.getKerberosAttributes(); if (!strategy.equals(LocatorUtils.property(thisLocator, "kerberosAttributes", lhsKerberosAttributes), LocatorUtils.property(thatLocator, "kerberosAttributes", rhsKerberosAttributes), lhsKerberosAttributes, rhsKerberosAttributes, (this.kerberosAttributes!= null), (that.kerberosAttributes!= null))) { return false;
lhsKerberosAttributes = this.getKerberosAttributes(); EmrClusterDefinitionKerberosAttributes rhsKerberosAttributes; rhsKerberosAttributes = that.getKerberosAttributes(); if (!strategy.equals(LocatorUtils.property(thisLocator, "kerberosAttributes", lhsKerberosAttributes), LocatorUtils.property(thatLocator, "kerberosAttributes", rhsKerberosAttributes), lhsKerberosAttributes, rhsKerberosAttributes, (this.kerberosAttributes!= null), (that.kerberosAttributes!= null))) { return false;
theKerberosAttributes = this.getKerberosAttributes(); strategy.appendField(locator, this, "kerberosAttributes", buffer, theKerberosAttributes, (this.kerberosAttributes!= null));
theKerberosAttributes = this.getKerberosAttributes(); strategy.appendField(locator, this, "kerberosAttributes", buffer, theKerberosAttributes, (this.kerberosAttributes!= null));
theKerberosAttributes = this.getKerberosAttributes(); strategy.appendField(locator, this, "kerberosAttributes", buffer, theKerberosAttributes, (this.kerberosAttributes!= null));
theKerberosAttributes = this.getKerberosAttributes(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "kerberosAttributes", theKerberosAttributes), currentHashCode, theKerberosAttributes, (this.kerberosAttributes!= null));
theKerberosAttributes = this.getKerberosAttributes(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "kerberosAttributes", theKerberosAttributes), currentHashCode, theKerberosAttributes, (this.kerberosAttributes!= null));
theKerberosAttributes = this.getKerberosAttributes(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "kerberosAttributes", theKerberosAttributes), currentHashCode, theKerberosAttributes, (this.kerberosAttributes!= null));
if (kerberosAttributesShouldBeCopiedAndSet == Boolean.TRUE) { EmrClusterDefinitionKerberosAttributes sourceKerberosAttributes; sourceKerberosAttributes = this.getKerberosAttributes(); EmrClusterDefinitionKerberosAttributes copyKerberosAttributes = ((EmrClusterDefinitionKerberosAttributes) strategy.copy(LocatorUtils.property(locator, "kerberosAttributes", sourceKerberosAttributes), sourceKerberosAttributes, (this.kerberosAttributes!= null))); copy.setKerberosAttributes(copyKerberosAttributes);
if (kerberosAttributesShouldBeCopiedAndSet == Boolean.TRUE) { EmrClusterDefinitionKerberosAttributes sourceKerberosAttributes; sourceKerberosAttributes = this.getKerberosAttributes(); EmrClusterDefinitionKerberosAttributes copyKerberosAttributes = ((EmrClusterDefinitionKerberosAttributes) strategy.copy(LocatorUtils.property(locator, "kerberosAttributes", sourceKerberosAttributes), sourceKerberosAttributes, (this.kerberosAttributes!= null))); copy.setKerberosAttributes(copyKerberosAttributes);
if (kerberosAttributesShouldBeCopiedAndSet == Boolean.TRUE) { EmrClusterDefinitionKerberosAttributes sourceKerberosAttributes; sourceKerberosAttributes = this.getKerberosAttributes(); EmrClusterDefinitionKerberosAttributes copyKerberosAttributes = ((EmrClusterDefinitionKerberosAttributes) strategy.copy(LocatorUtils.property(locator, "kerberosAttributes", sourceKerberosAttributes), sourceKerberosAttributes, (this.kerberosAttributes!= null))); copy.setKerberosAttributes(copyKerberosAttributes);