test_class.declarator: emrHelper
test_class.modifier: @Autowired
test_class.original_string: @Autowired
      EmrHelper emrHelper;
test_class.type: EmrHelper
test_class.var_name: emrHelper
test_class.file: herd-code/herd-dao/src/test/java/org/finra/herd/dao/helper/EmrHelperTest.java
test_class.identifier: EmrHelperTest
test_class.superclass: extends AbstractDaoTest
test_case.body: @Test
      public void testEmrHadoopJarStepConfigWithArguments()
      {
          List<String> arguments = new ArrayList<>();
          arguments.add("arg1");
  
          StepConfig stepConfig = emrHelper.getEmrHadoopJarStepConfig("step_name", "jar_location", null, arguments, false);
  
          assertNotNull("step not returned", stepConfig);
  
          assertEquals("name not found", "step_name", stepConfig.getName());
          assertEquals("jar not found", "jar_location", stepConfig.getHadoopJarStep().getJar());
          assertNotNull("arguments not found", stepConfig.getHadoopJarStep().getArgs());
      }
test_case.class_method_signature: EmrHelperTest.testEmrHadoopJarStepConfigWithArguments()
test_case.full_signature: @Test public void testEmrHadoopJarStepConfigWithArguments()
test_case.identifier: testEmrHadoopJarStepConfigWithArguments
test_case.invocations: add getEmrHadoopJarStepConfig assertNotNull assertEquals getName assertEquals getJar getHadoopJarStep assertNotNull getArgs getHadoopJarStep
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEmrHadoopJarStepConfigWithArguments()
focal_class.declarator: emrDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private EmrDao emrDao;
focal_class.type: EmrDao
focal_class.var_name: emrDao
focal_class.declarator: stsDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StsDao stsDao;
focal_class.type: StsDao
focal_class.var_name: stsDao
focal_class.declarator: trustingAccountDaoHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private TrustingAccountDaoHelper trustingAccountDaoHelper;
focal_class.type: TrustingAccountDaoHelper
focal_class.var_name: trustingAccountDaoHelper
focal_class.file: herd-code/herd-dao/src/main/java/org/finra/herd/dao/helper/EmrHelper.java
focal_class.identifier: EmrHelper
focal_class.class_method_signature: EmrHelper.buildEmrClusterName(String namespaceCd, String emrDefinitionName, String clusterName)
focal_class.full_signature: public String buildEmrClusterName(String namespaceCd, String emrDefinitionName, String clusterName)
focal_class.identifier: buildEmrClusterName
focal_class.modifiers: public
focal_class.parameters: (String namespaceCd, String emrDefinitionName, String clusterName)
focal_class.return: String
focal_class.signature: String buildEmrClusterName(String namespaceCd, String emrDefinitionName, String clusterName)
focal_class.class_method_signature: EmrHelper.getActiveEmrClusterId(String emrClusterId, String emrClusterName, String accountId)
focal_class.full_signature: public String getActiveEmrClusterId(String emrClusterId, String emrClusterName, String accountId)
focal_class.identifier: getActiveEmrClusterId
focal_class.modifiers: public
focal_class.parameters: (String emrClusterId, String emrClusterName, String accountId)
focal_class.return: String
focal_class.signature: String getActiveEmrClusterId(String emrClusterId, String emrClusterName, String accountId)
focal_class.class_method_signature: EmrHelper.getEmrParamsDtoByAccountId(String accountId)
focal_class.full_signature: public EmrParamsDto getEmrParamsDtoByAccountId(String accountId)
focal_class.identifier: getEmrParamsDtoByAccountId
focal_class.modifiers: public
focal_class.parameters: (String accountId)
focal_class.return: EmrParamsDto
focal_class.signature: EmrParamsDto getEmrParamsDtoByAccountId(String accountId)
focal_class.class_method_signature: EmrHelper.getEmrDao()
focal_class.full_signature: public EmrDao getEmrDao()
focal_class.identifier: getEmrDao
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: EmrDao
focal_class.signature: EmrDao getEmrDao()
focal_class.class_method_signature: EmrHelper.setEmrDao(EmrDao emrDao)
focal_class.full_signature: public void setEmrDao(EmrDao emrDao)
focal_class.identifier: setEmrDao
focal_class.modifiers: public
focal_class.parameters: (EmrDao emrDao)
focal_class.return: void
focal_class.signature: void setEmrDao(EmrDao emrDao)
focal_class.class_method_signature: EmrHelper.getEmrHadoopJarStepConfig(String stepName, String jarLocation, String mainClass, List<String> scriptArguments, Boolean isContinueOnError)
focal_class.full_signature: public StepConfig getEmrHadoopJarStepConfig(String stepName, String jarLocation, String mainClass, List<String> scriptArguments, Boolean isContinueOnError)
focal_class.identifier: getEmrHadoopJarStepConfig
focal_class.modifiers: public
focal_class.parameters: (String stepName, String jarLocation, String mainClass, List<String> scriptArguments, Boolean isContinueOnError)
focal_class.return: StepConfig
focal_class.signature: StepConfig getEmrHadoopJarStepConfig(String stepName, String jarLocation, String mainClass, List<String> scriptArguments, Boolean isContinueOnError)
focal_class.class_method_signature: EmrHelper.getS3StagingLocation(String trustingAccountStagingBucketName)
focal_class.full_signature: public String getS3StagingLocation(String trustingAccountStagingBucketName)
focal_class.identifier: getS3StagingLocation
focal_class.modifiers: public
focal_class.parameters: (String trustingAccountStagingBucketName)
focal_class.return: String
focal_class.signature: String getS3StagingLocation(String trustingAccountStagingBucketName)
focal_class.class_method_signature: EmrHelper.isActiveEmrState(String status)
focal_class.full_signature: public boolean isActiveEmrState(String status)
focal_class.identifier: isActiveEmrState
focal_class.modifiers: public
focal_class.parameters: (String status)
focal_class.return: boolean
focal_class.signature: boolean isActiveEmrState(String status)
focal_class.class_method_signature: EmrHelper.isInstanceDefinitionsEmpty(InstanceDefinitions instanceDefinitions)
focal_class.full_signature: public boolean isInstanceDefinitionsEmpty(InstanceDefinitions instanceDefinitions)
focal_class.identifier: isInstanceDefinitionsEmpty
focal_class.modifiers: public
focal_class.parameters: (InstanceDefinitions instanceDefinitions)
focal_class.return: boolean
focal_class.signature: boolean isInstanceDefinitionsEmpty(InstanceDefinitions instanceDefinitions)
focal_class.class_method_signature: EmrHelper.getActiveEmrClusterStates()
focal_class.full_signature: private String[] getActiveEmrClusterStates()
focal_class.identifier: getActiveEmrClusterStates
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: String[]
focal_class.signature: String[] getActiveEmrClusterStates()
focal_class.class_method_signature: EmrHelper.updateEmrParamsForCrossAccountAccess(EmrParamsDto emrParamsDto, String accountId)
focal_class.full_signature: private void updateEmrParamsForCrossAccountAccess(EmrParamsDto emrParamsDto, String accountId)
focal_class.identifier: updateEmrParamsForCrossAccountAccess
focal_class.modifiers: private
focal_class.parameters: (EmrParamsDto emrParamsDto, String accountId)
focal_class.return: void
focal_class.signature: void updateEmrParamsForCrossAccountAccess(EmrParamsDto emrParamsDto, String accountId)
focal_class.class_method_signature: EmrHelper.buildEmrClusterInstanceFleetFromAwsResult(ListInstanceFleetsResult awsInstanceFleetsResult)
focal_class.full_signature: public List<EmrClusterInstanceFleet> buildEmrClusterInstanceFleetFromAwsResult(ListInstanceFleetsResult awsInstanceFleetsResult)
focal_class.identifier: buildEmrClusterInstanceFleetFromAwsResult
focal_class.modifiers: public
focal_class.parameters: (ListInstanceFleetsResult awsInstanceFleetsResult)
focal_class.return: List<EmrClusterInstanceFleet>
focal_class.signature: List<EmrClusterInstanceFleet> buildEmrClusterInstanceFleetFromAwsResult(ListInstanceFleetsResult awsInstanceFleetsResult)
focal_class.class_method_signature: EmrHelper.getEmrClusterInstanceFleetStatus(InstanceFleetStatus instanceFleetStatus)
focal_class.full_signature: protected EmrClusterInstanceFleetStatus getEmrClusterInstanceFleetStatus(InstanceFleetStatus instanceFleetStatus)
focal_class.identifier: getEmrClusterInstanceFleetStatus
focal_class.modifiers: protected
focal_class.parameters: (InstanceFleetStatus instanceFleetStatus)
focal_class.return: EmrClusterInstanceFleetStatus
focal_class.signature: EmrClusterInstanceFleetStatus getEmrClusterInstanceFleetStatus(InstanceFleetStatus instanceFleetStatus)
focal_class.class_method_signature: EmrHelper.getLaunchSpecifications(
          InstanceFleetProvisioningSpecifications instanceFleetProvisioningSpecifications)
focal_class.full_signature: protected EmrClusterInstanceFleetProvisioningSpecifications getLaunchSpecifications(
          InstanceFleetProvisioningSpecifications instanceFleetProvisioningSpecifications)
focal_class.identifier: getLaunchSpecifications
focal_class.modifiers: protected
focal_class.parameters: (
          InstanceFleetProvisioningSpecifications instanceFleetProvisioningSpecifications)
focal_class.return: EmrClusterInstanceFleetProvisioningSpecifications
focal_class.signature: EmrClusterInstanceFleetProvisioningSpecifications getLaunchSpecifications(
          InstanceFleetProvisioningSpecifications instanceFleetProvisioningSpecifications)
focal_class.class_method_signature: EmrHelper.getSpotSpecification(SpotProvisioningSpecification spotProvisioningSpecification)
focal_class.full_signature: protected EmrClusterSpotProvisioningSpecification getSpotSpecification(SpotProvisioningSpecification spotProvisioningSpecification)
focal_class.identifier: getSpotSpecification
focal_class.modifiers: protected
focal_class.parameters: (SpotProvisioningSpecification spotProvisioningSpecification)
focal_class.return: EmrClusterSpotProvisioningSpecification
focal_class.signature: EmrClusterSpotProvisioningSpecification getSpotSpecification(SpotProvisioningSpecification spotProvisioningSpecification)
focal_class.class_method_signature: EmrHelper.getEbsBlockDevices(List<EbsBlockDevice> ebsBlockDevices)
focal_class.full_signature: protected List<EmrClusterEbsBlockDevice> getEbsBlockDevices(List<EbsBlockDevice> ebsBlockDevices)
focal_class.identifier: getEbsBlockDevices
focal_class.modifiers: protected
focal_class.parameters: (List<EbsBlockDevice> ebsBlockDevices)
focal_class.return: List<EmrClusterEbsBlockDevice>
focal_class.signature: List<EmrClusterEbsBlockDevice> getEbsBlockDevices(List<EbsBlockDevice> ebsBlockDevices)
focal_class.class_method_signature: EmrHelper.getVolumeSpecification(VolumeSpecification volumeSpecification)
focal_class.full_signature: protected EmrClusterVolumeSpecification getVolumeSpecification(VolumeSpecification volumeSpecification)
focal_class.identifier: getVolumeSpecification
focal_class.modifiers: protected
focal_class.parameters: (VolumeSpecification volumeSpecification)
focal_class.return: EmrClusterVolumeSpecification
focal_class.signature: EmrClusterVolumeSpecification getVolumeSpecification(VolumeSpecification volumeSpecification)
focal_class.class_method_signature: EmrHelper.getInstanceTypeSpecifications(List<InstanceTypeSpecification> awsInstanceTypeConfigs)
focal_class.full_signature: protected List<EmrClusterInstanceTypeSpecification> getInstanceTypeSpecifications(List<InstanceTypeSpecification> awsInstanceTypeConfigs)
focal_class.identifier: getInstanceTypeSpecifications
focal_class.modifiers: protected
focal_class.parameters: (List<InstanceTypeSpecification> awsInstanceTypeConfigs)
focal_class.return: List<EmrClusterInstanceTypeSpecification>
focal_class.signature: List<EmrClusterInstanceTypeSpecification> getInstanceTypeSpecifications(List<InstanceTypeSpecification> awsInstanceTypeConfigs)
focal_class.class_method_signature: EmrHelper.getConfigurations(List<Configuration> configurations)
focal_class.full_signature: protected List<EmrClusterInstanceTypeConfiguration> getConfigurations(List<Configuration> configurations)
focal_class.identifier: getConfigurations
focal_class.modifiers: protected
focal_class.parameters: (List<Configuration> configurations)
focal_class.return: List<EmrClusterInstanceTypeConfiguration>
focal_class.signature: List<EmrClusterInstanceTypeConfiguration> getConfigurations(List<Configuration> configurations)
focal_class.class_method_signature: EmrHelper.getParameterList(Map<String, String> properties)
focal_class.full_signature: protected List<Parameter> getParameterList(Map<String, String> properties)
focal_class.identifier: getParameterList
focal_class.modifiers: protected
focal_class.parameters: (Map<String, String> properties)
focal_class.return: List<Parameter>
focal_class.signature: List<Parameter> getParameterList(Map<String, String> properties)
focal_class.superclass: extends AwsHelper
focal_method.body: public StepConfig getEmrHadoopJarStepConfig(String stepName, String jarLocation, String mainClass, List<String> scriptArguments, Boolean isContinueOnError)
      {
          // Default ActionOnFailure is to cancel the execution and wait
          ActionOnFailure actionOnFailure = ActionOnFailure.CANCEL_AND_WAIT;
  
          if (isContinueOnError != null && isContinueOnError)
          {
              // Override based on user input
              actionOnFailure = ActionOnFailure.CONTINUE;
          }
  
          // If there are no arguments
          if (CollectionUtils.isEmpty(scriptArguments))
          {
              // Build the StepConfig object and return
              return new StepConfig().withName(stepName.trim()).withActionOnFailure(actionOnFailure)
                  .withHadoopJarStep(new HadoopJarStepConfig().withJar(jarLocation.trim()).withMainClass(mainClass));
          }
          else
          {
              // If there are arguments, include the arguments in the StepConfig object
              return new StepConfig().withName(stepName.trim()).withActionOnFailure(actionOnFailure).withHadoopJarStep(
                  new HadoopJarStepConfig().withJar(jarLocation.trim()).withMainClass(mainClass)
                      .withArgs(scriptArguments.toArray(new String[scriptArguments.size()])));
          }
      }
focal_method.class_method_signature: EmrHelper.getEmrHadoopJarStepConfig(String stepName, String jarLocation, String mainClass, List<String> scriptArguments, Boolean isContinueOnError)
focal_method.full_signature: public StepConfig getEmrHadoopJarStepConfig(String stepName, String jarLocation, String mainClass, List<String> scriptArguments, Boolean isContinueOnError)
focal_method.identifier: getEmrHadoopJarStepConfig
focal_method.invocations: isEmpty withHadoopJarStep withActionOnFailure withName trim withMainClass withJar trim withHadoopJarStep withActionOnFailure withName trim withArgs withMainClass withJar trim toArray size
focal_method.modifiers: public
focal_method.parameters: (String stepName, String jarLocation, String mainClass, List<String> scriptArguments, Boolean isContinueOnError)
focal_method.return: StepConfig
focal_method.signature: StepConfig getEmrHadoopJarStepConfig(String stepName, String jarLocation, String mainClass, List<String> scriptArguments, Boolean isContinueOnError)