test_class.declarator: emrClusterCacheMap
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Map<String, Map<EmrClusterCacheKey, String>> emrClusterCacheMap;
test_class.type: Map<String, Map<EmrClusterCacheKey, String>>
test_class.var_name: emrClusterCacheMap
test_class.declarator: emrClusterCacheTimestampsMap
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Map<String, EmrClusterCacheTimestamps> emrClusterCacheTimestampsMap;
test_class.type: Map<String, EmrClusterCacheTimestamps>
test_class.var_name: emrClusterCacheTimestampsMap
test_class.declarator: awsClientFactory
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private AwsClientFactory awsClientFactory;
test_class.type: AwsClientFactory
test_class.var_name: awsClientFactory
test_class.declarator: configurationHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ConfigurationHelper configurationHelper;
test_class.type: ConfigurationHelper
test_class.var_name: configurationHelper
test_class.declarator: ec2Dao
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Ec2Dao ec2Dao;
test_class.type: Ec2Dao
test_class.var_name: ec2Dao
test_class.declarator: emrDaoImpl
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private EmrDaoImpl emrDaoImpl;
test_class.type: EmrDaoImpl
test_class.var_name: emrDaoImpl
test_class.declarator: emrHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private EmrHelper emrHelper;
test_class.type: EmrHelper
test_class.var_name: emrHelper
test_class.declarator: emrOperations
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private EmrOperations emrOperations;
test_class.type: EmrOperations
test_class.var_name: emrOperations
test_class.declarator: herdStringHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private HerdStringHelper herdStringHelper;
test_class.type: HerdStringHelper
test_class.var_name: herdStringHelper
test_class.declarator: jsonHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private JsonHelper jsonHelper;
test_class.type: JsonHelper
test_class.var_name: jsonHelper
test_class.declarator: amazonElasticMapReduceClientArgumentCaptor
test_class.modifier: @Captor
      private
test_class.original_string: @Captor
      private ArgumentCaptor<AmazonElasticMapReduceClient> amazonElasticMapReduceClientArgumentCaptor;
test_class.type: ArgumentCaptor<AmazonElasticMapReduceClient>
test_class.var_name: amazonElasticMapReduceClientArgumentCaptor
test_class.declarator: runJobFlowRequestArgumentCaptor
test_class.modifier: @Captor
      private
test_class.original_string: @Captor
      private ArgumentCaptor<RunJobFlowRequest> runJobFlowRequestArgumentCaptor;
test_class.type: ArgumentCaptor<RunJobFlowRequest>
test_class.var_name: runJobFlowRequestArgumentCaptor
test_class.file: herd-code/herd-dao/src/test/java/org/finra/herd/dao/impl/EmrDaoImplTest.java
test_class.identifier: EmrDaoImplTest
test_class.superclass: extends AbstractDaoTest
test_case.body: @Test
      public void testGetActiveEmrClusterByNameWhenClusterNameIsBlank()
      {
          // Create an AWS parameters DTO.
          AwsParamsDto awsParamsDto =
              new AwsParamsDto(AWS_ASSUMED_ROLE_ACCESS_KEY, AWS_ASSUMED_ROLE_SECRET_KEY, AWS_ASSUMED_ROLE_SESSION_TOKEN, HTTP_PROXY_HOST, HTTP_PROXY_PORT,
                  AWS_REGION_NAME_US_EAST_1);
  
          // Call the method under test.
          ClusterSummary result = emrDaoImpl.getActiveEmrClusterByNameAndAccountId(BLANK_TEXT, null, awsParamsDto);
  
          // Verify the external calls.
          verifyNoMoreInteractionsHelper();
  
          // Validate the results.
          assertNull(result);
      }
test_case.class_method_signature: EmrDaoImplTest.testGetActiveEmrClusterByNameWhenClusterNameIsBlank()
test_case.full_signature: @Test public void testGetActiveEmrClusterByNameWhenClusterNameIsBlank()
test_case.identifier: testGetActiveEmrClusterByNameWhenClusterNameIsBlank
test_case.invocations: getActiveEmrClusterByNameAndAccountId verifyNoMoreInteractionsHelper assertNull
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetActiveEmrClusterByNameWhenClusterNameIsBlank()
focal_class.declarator: DELTA_UPDATE_BUFFER_IN_MINUTES = 1
focal_class.modifier: private static final
focal_class.original_string: private static final int DELTA_UPDATE_BUFFER_IN_MINUTES = 1;
focal_class.type: int
focal_class.var_name: DELTA_UPDATE_BUFFER_IN_MINUTES
focal_class.declarator: FULL_RELOAD_CACHE_TIME_PERIOD_IN_MINUTES = 10
focal_class.modifier: private static final
focal_class.original_string: private static final int FULL_RELOAD_CACHE_TIME_PERIOD_IN_MINUTES = 10;
focal_class.type: int
focal_class.var_name: FULL_RELOAD_CACHE_TIME_PERIOD_IN_MINUTES
focal_class.declarator: LOGGER = LoggerFactory.getLogger(EmrDaoImpl.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(EmrDaoImpl.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: awsClientFactory
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private AwsClientFactory awsClientFactory;
focal_class.type: AwsClientFactory
focal_class.var_name: awsClientFactory
focal_class.declarator: configurationHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private ConfigurationHelper configurationHelper;
focal_class.type: ConfigurationHelper
focal_class.var_name: configurationHelper
focal_class.declarator: ec2Dao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private Ec2Dao ec2Dao;
focal_class.type: Ec2Dao
focal_class.var_name: ec2Dao
focal_class.declarator: emrClusterCacheMap
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private Map<String, Map<EmrClusterCacheKey, String>> emrClusterCacheMap;
focal_class.type: Map<String, Map<EmrClusterCacheKey, String>>
focal_class.var_name: emrClusterCacheMap
focal_class.declarator: emrClusterCacheTimestampsMap
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private Map<String, EmrClusterCacheTimestamps> emrClusterCacheTimestampsMap;
focal_class.type: Map<String, EmrClusterCacheTimestamps>
focal_class.var_name: emrClusterCacheTimestampsMap
focal_class.declarator: emrHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private EmrHelper emrHelper;
focal_class.type: EmrHelper
focal_class.var_name: emrHelper
focal_class.declarator: emrOperations
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private EmrOperations emrOperations;
focal_class.type: EmrOperations
focal_class.var_name: emrOperations
focal_class.declarator: herdStringHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private HerdStringHelper herdStringHelper;
focal_class.type: HerdStringHelper
focal_class.var_name: herdStringHelper
focal_class.declarator: jsonHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private JsonHelper jsonHelper;
focal_class.type: JsonHelper
focal_class.var_name: jsonHelper
focal_class.file: herd-code/herd-dao/src/main/java/org/finra/herd/dao/impl/EmrDaoImpl.java
focal_class.identifier: EmrDaoImpl
focal_class.interfaces: implements EmrDao
focal_class.class_method_signature: EmrDaoImpl.addEmrStep(String clusterId, StepConfig emrStepConfig, AwsParamsDto awsParamsDto)
focal_class.full_signature: @Override public String addEmrStep(String clusterId, StepConfig emrStepConfig, AwsParamsDto awsParamsDto)
focal_class.identifier: addEmrStep
focal_class.modifiers: @Override public
focal_class.parameters: (String clusterId, StepConfig emrStepConfig, AwsParamsDto awsParamsDto)
focal_class.return: String
focal_class.signature: String addEmrStep(String clusterId, StepConfig emrStepConfig, AwsParamsDto awsParamsDto)
focal_class.class_method_signature: EmrDaoImpl.createEmrCluster(String clusterName, EmrClusterDefinition emrClusterDefinition, EmrParamsDto emrParamsDto)
focal_class.full_signature: @Override public String createEmrCluster(String clusterName, EmrClusterDefinition emrClusterDefinition, EmrParamsDto emrParamsDto)
focal_class.identifier: createEmrCluster
focal_class.modifiers: @Override public
focal_class.parameters: (String clusterName, EmrClusterDefinition emrClusterDefinition, EmrParamsDto emrParamsDto)
focal_class.return: String
focal_class.signature: String createEmrCluster(String clusterName, EmrClusterDefinition emrClusterDefinition, EmrParamsDto emrParamsDto)
focal_class.class_method_signature: EmrDaoImpl.getActiveEmrClusterByNameAndAccountId(String clusterName, String accountId, AwsParamsDto awsParams)
focal_class.full_signature: @Override public synchronized ClusterSummary getActiveEmrClusterByNameAndAccountId(String clusterName, String accountId, AwsParamsDto awsParams)
focal_class.identifier: getActiveEmrClusterByNameAndAccountId
focal_class.modifiers: @Override public synchronized
focal_class.parameters: (String clusterName, String accountId, AwsParamsDto awsParams)
focal_class.return: ClusterSummary
focal_class.signature: ClusterSummary getActiveEmrClusterByNameAndAccountId(String clusterName, String accountId, AwsParamsDto awsParams)
focal_class.class_method_signature: EmrDaoImpl.getApplications(List<EmrClusterDefinitionApplication> emrClusterDefinitionApplications)
focal_class.full_signature: public List<Application> getApplications(List<EmrClusterDefinitionApplication> emrClusterDefinitionApplications)
focal_class.identifier: getApplications
focal_class.modifiers: public
focal_class.parameters: (List<EmrClusterDefinitionApplication> emrClusterDefinitionApplications)
focal_class.return: List<Application>
focal_class.signature: List<Application> getApplications(List<EmrClusterDefinitionApplication> emrClusterDefinitionApplications)
focal_class.class_method_signature: EmrDaoImpl.getClusterActiveStep(String clusterId, AwsParamsDto awsParamsDto)
focal_class.full_signature: @Override public StepSummary getClusterActiveStep(String clusterId, AwsParamsDto awsParamsDto)
focal_class.identifier: getClusterActiveStep
focal_class.modifiers: @Override public
focal_class.parameters: (String clusterId, AwsParamsDto awsParamsDto)
focal_class.return: StepSummary
focal_class.signature: StepSummary getClusterActiveStep(String clusterId, AwsParamsDto awsParamsDto)
focal_class.class_method_signature: EmrDaoImpl.getClusterStep(String clusterId, String stepId, AwsParamsDto awsParamsDto)
focal_class.full_signature: @Override public Step getClusterStep(String clusterId, String stepId, AwsParamsDto awsParamsDto)
focal_class.identifier: getClusterStep
focal_class.modifiers: @Override public
focal_class.parameters: (String clusterId, String stepId, AwsParamsDto awsParamsDto)
focal_class.return: Step
focal_class.signature: Step getClusterStep(String clusterId, String stepId, AwsParamsDto awsParamsDto)
focal_class.class_method_signature: EmrDaoImpl.getEmrClient(AwsParamsDto awsParamsDto)
focal_class.full_signature: @Override public AmazonElasticMapReduceClient getEmrClient(AwsParamsDto awsParamsDto)
focal_class.identifier: getEmrClient
focal_class.modifiers: @Override public
focal_class.parameters: (AwsParamsDto awsParamsDto)
focal_class.return: AmazonElasticMapReduceClient
focal_class.signature: AmazonElasticMapReduceClient getEmrClient(AwsParamsDto awsParamsDto)
focal_class.class_method_signature: EmrDaoImpl.getEmrClusterById(String clusterId, AwsParamsDto awsParams)
focal_class.full_signature: @Override public Cluster getEmrClusterById(String clusterId, AwsParamsDto awsParams)
focal_class.identifier: getEmrClusterById
focal_class.modifiers: @Override public
focal_class.parameters: (String clusterId, AwsParamsDto awsParams)
focal_class.return: Cluster
focal_class.signature: Cluster getEmrClusterById(String clusterId, AwsParamsDto awsParams)
focal_class.class_method_signature: EmrDaoImpl.getEmrClusterStatusById(String clusterId, AwsParamsDto awsParams)
focal_class.full_signature: @Override public String getEmrClusterStatusById(String clusterId, AwsParamsDto awsParams)
focal_class.identifier: getEmrClusterStatusById
focal_class.modifiers: @Override public
focal_class.parameters: (String clusterId, AwsParamsDto awsParams)
focal_class.return: String
focal_class.signature: String getEmrClusterStatusById(String clusterId, AwsParamsDto awsParams)
focal_class.class_method_signature: EmrDaoImpl.getEmrMasterInstance(String clusterId, AwsParamsDto awsParams)
focal_class.full_signature: @Override public Instance getEmrMasterInstance(String clusterId, AwsParamsDto awsParams)
focal_class.identifier: getEmrMasterInstance
focal_class.modifiers: @Override public
focal_class.parameters: (String clusterId, AwsParamsDto awsParams)
focal_class.return: Instance
focal_class.signature: Instance getEmrMasterInstance(String clusterId, AwsParamsDto awsParams)
focal_class.class_method_signature: EmrDaoImpl.getListInstanceFleetsResult(String clusterId, AwsParamsDto awsParams)
focal_class.full_signature: @Override public ListInstanceFleetsResult getListInstanceFleetsResult(String clusterId, AwsParamsDto awsParams)
focal_class.identifier: getListInstanceFleetsResult
focal_class.modifiers: @Override public
focal_class.parameters: (String clusterId, AwsParamsDto awsParams)
focal_class.return: ListInstanceFleetsResult
focal_class.signature: ListInstanceFleetsResult getListInstanceFleetsResult(String clusterId, AwsParamsDto awsParams)
focal_class.class_method_signature: EmrDaoImpl.terminateEmrCluster(String clusterId, boolean overrideTerminationProtection, AwsParamsDto awsParams)
focal_class.full_signature: @Override public void terminateEmrCluster(String clusterId, boolean overrideTerminationProtection, AwsParamsDto awsParams)
focal_class.identifier: terminateEmrCluster
focal_class.modifiers: @Override public
focal_class.parameters: (String clusterId, boolean overrideTerminationProtection, AwsParamsDto awsParams)
focal_class.return: void
focal_class.signature: void terminateEmrCluster(String clusterId, boolean overrideTerminationProtection, AwsParamsDto awsParams)
focal_class.class_method_signature: EmrDaoImpl.getConfigurations(List<EmrClusterDefinitionConfiguration> emrClusterDefinitionConfigurations)
focal_class.full_signature: protected List<Configuration> getConfigurations(List<EmrClusterDefinitionConfiguration> emrClusterDefinitionConfigurations)
focal_class.identifier: getConfigurations
focal_class.modifiers: protected
focal_class.parameters: (List<EmrClusterDefinitionConfiguration> emrClusterDefinitionConfigurations)
focal_class.return: List<Configuration>
focal_class.signature: List<Configuration> getConfigurations(List<EmrClusterDefinitionConfiguration> emrClusterDefinitionConfigurations)
focal_class.class_method_signature: EmrDaoImpl.getEbsBlockDeviceConfigs(List<EmrClusterDefinitionEbsBlockDeviceConfig> emrClusterDefinitionEbsBlockDeviceConfigs)
focal_class.full_signature: protected List<EbsBlockDeviceConfig> getEbsBlockDeviceConfigs(List<EmrClusterDefinitionEbsBlockDeviceConfig> emrClusterDefinitionEbsBlockDeviceConfigs)
focal_class.identifier: getEbsBlockDeviceConfigs
focal_class.modifiers: protected
focal_class.parameters: (List<EmrClusterDefinitionEbsBlockDeviceConfig> emrClusterDefinitionEbsBlockDeviceConfigs)
focal_class.return: List<EbsBlockDeviceConfig>
focal_class.signature: List<EbsBlockDeviceConfig> getEbsBlockDeviceConfigs(List<EmrClusterDefinitionEbsBlockDeviceConfig> emrClusterDefinitionEbsBlockDeviceConfigs)
focal_class.class_method_signature: EmrDaoImpl.getEbsConfiguration(EmrClusterDefinitionEbsConfiguration emrClusterDefinitionEbsConfiguration)
focal_class.full_signature: protected EbsConfiguration getEbsConfiguration(EmrClusterDefinitionEbsConfiguration emrClusterDefinitionEbsConfiguration)
focal_class.identifier: getEbsConfiguration
focal_class.modifiers: protected
focal_class.parameters: (EmrClusterDefinitionEbsConfiguration emrClusterDefinitionEbsConfiguration)
focal_class.return: EbsConfiguration
focal_class.signature: EbsConfiguration getEbsConfiguration(EmrClusterDefinitionEbsConfiguration emrClusterDefinitionEbsConfiguration)
focal_class.class_method_signature: EmrDaoImpl.getEmrClusterCacheByAccountId(String accountId)
focal_class.full_signature: protected Map<EmrClusterCacheKey, String> getEmrClusterCacheByAccountId(String accountId)
focal_class.identifier: getEmrClusterCacheByAccountId
focal_class.modifiers: protected
focal_class.parameters: (String accountId)
focal_class.return: Map<EmrClusterCacheKey, String>
focal_class.signature: Map<EmrClusterCacheKey, String> getEmrClusterCacheByAccountId(String accountId)
focal_class.class_method_signature: EmrDaoImpl.getEmrClusterCacheTimestampsByAccountId(String accountId)
focal_class.full_signature: protected EmrClusterCacheTimestamps getEmrClusterCacheTimestampsByAccountId(String accountId)
focal_class.identifier: getEmrClusterCacheTimestampsByAccountId
focal_class.modifiers: protected
focal_class.parameters: (String accountId)
focal_class.return: EmrClusterCacheTimestamps
focal_class.signature: EmrClusterCacheTimestamps getEmrClusterCacheTimestampsByAccountId(String accountId)
focal_class.class_method_signature: EmrDaoImpl.getInstanceFleets(List<EmrClusterDefinitionInstanceFleet> emrClusterDefinitionInstanceFleets)
focal_class.full_signature: protected List<InstanceFleetConfig> getInstanceFleets(List<EmrClusterDefinitionInstanceFleet> emrClusterDefinitionInstanceFleets)
focal_class.identifier: getInstanceFleets
focal_class.modifiers: protected
focal_class.parameters: (List<EmrClusterDefinitionInstanceFleet> emrClusterDefinitionInstanceFleets)
focal_class.return: List<InstanceFleetConfig>
focal_class.signature: List<InstanceFleetConfig> getInstanceFleets(List<EmrClusterDefinitionInstanceFleet> emrClusterDefinitionInstanceFleets)
focal_class.class_method_signature: EmrDaoImpl.getInstanceGroupConfig(InstanceRoleType roleType, String instanceType, Integer instanceCount, BigDecimal bidPrice,
          EmrClusterDefinitionEbsConfiguration emrClusterDefinitionEbsConfiguration)
focal_class.full_signature: protected InstanceGroupConfig getInstanceGroupConfig(InstanceRoleType roleType, String instanceType, Integer instanceCount, BigDecimal bidPrice,
          EmrClusterDefinitionEbsConfiguration emrClusterDefinitionEbsConfiguration)
focal_class.identifier: getInstanceGroupConfig
focal_class.modifiers: protected
focal_class.parameters: (InstanceRoleType roleType, String instanceType, Integer instanceCount, BigDecimal bidPrice,
          EmrClusterDefinitionEbsConfiguration emrClusterDefinitionEbsConfiguration)
focal_class.return: InstanceGroupConfig
focal_class.signature: InstanceGroupConfig getInstanceGroupConfig(InstanceRoleType roleType, String instanceType, Integer instanceCount, BigDecimal bidPrice,
          EmrClusterDefinitionEbsConfiguration emrClusterDefinitionEbsConfiguration)
focal_class.class_method_signature: EmrDaoImpl.getInstanceGroupConfigs(InstanceDefinitions instanceDefinitions)
focal_class.full_signature: protected List<InstanceGroupConfig> getInstanceGroupConfigs(InstanceDefinitions instanceDefinitions)
focal_class.identifier: getInstanceGroupConfigs
focal_class.modifiers: protected
focal_class.parameters: (InstanceDefinitions instanceDefinitions)
focal_class.return: List<InstanceGroupConfig>
focal_class.signature: List<InstanceGroupConfig> getInstanceGroupConfigs(InstanceDefinitions instanceDefinitions)
focal_class.class_method_signature: EmrDaoImpl.getInstanceTypeConfigs(List<EmrClusterDefinitionInstanceTypeConfig> emrClusterDefinitionInstanceTypeConfigs)
focal_class.full_signature: protected List<InstanceTypeConfig> getInstanceTypeConfigs(List<EmrClusterDefinitionInstanceTypeConfig> emrClusterDefinitionInstanceTypeConfigs)
focal_class.identifier: getInstanceTypeConfigs
focal_class.modifiers: protected
focal_class.parameters: (List<EmrClusterDefinitionInstanceTypeConfig> emrClusterDefinitionInstanceTypeConfigs)
focal_class.return: List<InstanceTypeConfig>
focal_class.signature: List<InstanceTypeConfig> getInstanceTypeConfigs(List<EmrClusterDefinitionInstanceTypeConfig> emrClusterDefinitionInstanceTypeConfigs)
focal_class.class_method_signature: EmrDaoImpl.getKerberosAttributes(EmrClusterDefinitionKerberosAttributes emrClusterDefinitionKerberosAttributes)
focal_class.full_signature: protected KerberosAttributes getKerberosAttributes(EmrClusterDefinitionKerberosAttributes emrClusterDefinitionKerberosAttributes)
focal_class.identifier: getKerberosAttributes
focal_class.modifiers: protected
focal_class.parameters: (EmrClusterDefinitionKerberosAttributes emrClusterDefinitionKerberosAttributes)
focal_class.return: KerberosAttributes
focal_class.signature: KerberosAttributes getKerberosAttributes(EmrClusterDefinitionKerberosAttributes emrClusterDefinitionKerberosAttributes)
focal_class.class_method_signature: EmrDaoImpl.getLaunchSpecifications(EmrClusterDefinitionLaunchSpecifications emrClusterDefinitionLaunchSpecifications)
focal_class.full_signature: protected InstanceFleetProvisioningSpecifications getLaunchSpecifications(EmrClusterDefinitionLaunchSpecifications emrClusterDefinitionLaunchSpecifications)
focal_class.identifier: getLaunchSpecifications
focal_class.modifiers: protected
focal_class.parameters: (EmrClusterDefinitionLaunchSpecifications emrClusterDefinitionLaunchSpecifications)
focal_class.return: InstanceFleetProvisioningSpecifications
focal_class.signature: InstanceFleetProvisioningSpecifications getLaunchSpecifications(EmrClusterDefinitionLaunchSpecifications emrClusterDefinitionLaunchSpecifications)
focal_class.class_method_signature: EmrDaoImpl.getMap(List<Parameter> parameters)
focal_class.full_signature: protected Map<String, String> getMap(List<Parameter> parameters)
focal_class.identifier: getMap
focal_class.modifiers: protected
focal_class.parameters: (List<Parameter> parameters)
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> getMap(List<Parameter> parameters)
focal_class.class_method_signature: EmrDaoImpl.getOnDemandSpecification(EmrClusterDefinitionOnDemandSpecification emrClusterDefinitionOnDemandSpecification)
focal_class.full_signature: protected OnDemandProvisioningSpecification getOnDemandSpecification(EmrClusterDefinitionOnDemandSpecification emrClusterDefinitionOnDemandSpecification)
focal_class.identifier: getOnDemandSpecification
focal_class.modifiers: protected
focal_class.parameters: (EmrClusterDefinitionOnDemandSpecification emrClusterDefinitionOnDemandSpecification)
focal_class.return: OnDemandProvisioningSpecification
focal_class.signature: OnDemandProvisioningSpecification getOnDemandSpecification(EmrClusterDefinitionOnDemandSpecification emrClusterDefinitionOnDemandSpecification)
focal_class.class_method_signature: EmrDaoImpl.getSpotSpecification(EmrClusterDefinitionSpotSpecification emrClusterDefinitionSpotSpecification)
focal_class.full_signature: protected SpotProvisioningSpecification getSpotSpecification(EmrClusterDefinitionSpotSpecification emrClusterDefinitionSpotSpecification)
focal_class.identifier: getSpotSpecification
focal_class.modifiers: protected
focal_class.parameters: (EmrClusterDefinitionSpotSpecification emrClusterDefinitionSpotSpecification)
focal_class.return: SpotProvisioningSpecification
focal_class.signature: SpotProvisioningSpecification getSpotSpecification(EmrClusterDefinitionSpotSpecification emrClusterDefinitionSpotSpecification)
focal_class.class_method_signature: EmrDaoImpl.getVolumeSpecification(EmrClusterDefinitionVolumeSpecification emrClusterDefinitionVolumeSpecification)
focal_class.full_signature: protected VolumeSpecification getVolumeSpecification(EmrClusterDefinitionVolumeSpecification emrClusterDefinitionVolumeSpecification)
focal_class.identifier: getVolumeSpecification
focal_class.modifiers: protected
focal_class.parameters: (EmrClusterDefinitionVolumeSpecification emrClusterDefinitionVolumeSpecification)
focal_class.return: VolumeSpecification
focal_class.signature: VolumeSpecification getVolumeSpecification(EmrClusterDefinitionVolumeSpecification emrClusterDefinitionVolumeSpecification)
focal_class.class_method_signature: EmrDaoImpl.addCustomBootstrapActionConfig(EmrClusterDefinition emrClusterDefinition, ArrayList<BootstrapActionConfig> bootstrapActions)
focal_class.full_signature: private void addCustomBootstrapActionConfig(EmrClusterDefinition emrClusterDefinition, ArrayList<BootstrapActionConfig> bootstrapActions)
focal_class.identifier: addCustomBootstrapActionConfig
focal_class.modifiers: private
focal_class.parameters: (EmrClusterDefinition emrClusterDefinition, ArrayList<BootstrapActionConfig> bootstrapActions)
focal_class.return: void
focal_class.signature: void addCustomBootstrapActionConfig(EmrClusterDefinition emrClusterDefinition, ArrayList<BootstrapActionConfig> bootstrapActions)
focal_class.class_method_signature: EmrDaoImpl.addCustomMasterBootstrapActionConfig(EmrClusterDefinition emrClusterDefinition, ArrayList<BootstrapActionConfig> bootstrapActions)
focal_class.full_signature: private void addCustomMasterBootstrapActionConfig(EmrClusterDefinition emrClusterDefinition, ArrayList<BootstrapActionConfig> bootstrapActions)
focal_class.identifier: addCustomMasterBootstrapActionConfig
focal_class.modifiers: private
focal_class.parameters: (EmrClusterDefinition emrClusterDefinition, ArrayList<BootstrapActionConfig> bootstrapActions)
focal_class.return: void
focal_class.signature: void addCustomMasterBootstrapActionConfig(EmrClusterDefinition emrClusterDefinition, ArrayList<BootstrapActionConfig> bootstrapActions)
focal_class.class_method_signature: EmrDaoImpl.addDaemonBootstrapActionConfig(EmrClusterDefinition emrClusterDefinition, ArrayList<BootstrapActionConfig> bootstrapActions)
focal_class.full_signature: private void addDaemonBootstrapActionConfig(EmrClusterDefinition emrClusterDefinition, ArrayList<BootstrapActionConfig> bootstrapActions)
focal_class.identifier: addDaemonBootstrapActionConfig
focal_class.modifiers: private
focal_class.parameters: (EmrClusterDefinition emrClusterDefinition, ArrayList<BootstrapActionConfig> bootstrapActions)
focal_class.return: void
focal_class.signature: void addDaemonBootstrapActionConfig(EmrClusterDefinition emrClusterDefinition, ArrayList<BootstrapActionConfig> bootstrapActions)
focal_class.class_method_signature: EmrDaoImpl.addHadoopBootstrapActionConfig(EmrClusterDefinition emrClusterDefinition, ArrayList<BootstrapActionConfig> bootstrapActions)
focal_class.full_signature: private void addHadoopBootstrapActionConfig(EmrClusterDefinition emrClusterDefinition, ArrayList<BootstrapActionConfig> bootstrapActions)
focal_class.identifier: addHadoopBootstrapActionConfig
focal_class.modifiers: private
focal_class.parameters: (EmrClusterDefinition emrClusterDefinition, ArrayList<BootstrapActionConfig> bootstrapActions)
focal_class.return: void
focal_class.signature: void addHadoopBootstrapActionConfig(EmrClusterDefinition emrClusterDefinition, ArrayList<BootstrapActionConfig> bootstrapActions)
focal_class.class_method_signature: EmrDaoImpl.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: EmrDaoImpl.getBootstrapActionConfig(String scriptDescription, String bootstrapScript)
focal_class.full_signature: private BootstrapActionConfig getBootstrapActionConfig(String scriptDescription, String bootstrapScript)
focal_class.identifier: getBootstrapActionConfig
focal_class.modifiers: private
focal_class.parameters: (String scriptDescription, String bootstrapScript)
focal_class.return: BootstrapActionConfig
focal_class.signature: BootstrapActionConfig getBootstrapActionConfig(String scriptDescription, String bootstrapScript)
focal_class.class_method_signature: EmrDaoImpl.getBootstrapActionConfigList(EmrClusterDefinition emrClusterDefinition, String trustingAccountStagingBucketName)
focal_class.full_signature: private ArrayList<BootstrapActionConfig> getBootstrapActionConfigList(EmrClusterDefinition emrClusterDefinition, String trustingAccountStagingBucketName)
focal_class.identifier: getBootstrapActionConfigList
focal_class.modifiers: private
focal_class.parameters: (EmrClusterDefinition emrClusterDefinition, String trustingAccountStagingBucketName)
focal_class.return: ArrayList<BootstrapActionConfig>
focal_class.signature: ArrayList<BootstrapActionConfig> getBootstrapActionConfigList(EmrClusterDefinition emrClusterDefinition, String trustingAccountStagingBucketName)
focal_class.class_method_signature: EmrDaoImpl.getBootstrapScriptLocation(String bootstrapConfigurationValue, String trustingAccountStagingBucketName)
focal_class.full_signature: private String getBootstrapScriptLocation(String bootstrapConfigurationValue, String trustingAccountStagingBucketName)
focal_class.identifier: getBootstrapScriptLocation
focal_class.modifiers: private
focal_class.parameters: (String bootstrapConfigurationValue, String trustingAccountStagingBucketName)
focal_class.return: String
focal_class.signature: String getBootstrapScriptLocation(String bootstrapConfigurationValue, String trustingAccountStagingBucketName)
focal_class.class_method_signature: EmrDaoImpl.getEmrTags(EmrClusterDefinition emrClusterDefinition)
focal_class.full_signature: private List<Tag> getEmrTags(EmrClusterDefinition emrClusterDefinition)
focal_class.identifier: getEmrTags
focal_class.modifiers: private
focal_class.parameters: (EmrClusterDefinition emrClusterDefinition)
focal_class.return: List<Tag>
focal_class.signature: List<Tag> getEmrTags(EmrClusterDefinition emrClusterDefinition)
focal_class.class_method_signature: EmrDaoImpl.getJobFlowInstancesConfig(EmrClusterDefinition emrClusterDefinition)
focal_class.full_signature: private JobFlowInstancesConfig getJobFlowInstancesConfig(EmrClusterDefinition emrClusterDefinition)
focal_class.identifier: getJobFlowInstancesConfig
focal_class.modifiers: private
focal_class.parameters: (EmrClusterDefinition emrClusterDefinition)
focal_class.return: JobFlowInstancesConfig
focal_class.signature: JobFlowInstancesConfig getJobFlowInstancesConfig(EmrClusterDefinition emrClusterDefinition)
focal_class.class_method_signature: EmrDaoImpl.getRunJobFlowRequest(String clusterName, EmrClusterDefinition emrClusterDefinition, String trustingAccountStagingBucketName)
focal_class.full_signature: private RunJobFlowRequest getRunJobFlowRequest(String clusterName, EmrClusterDefinition emrClusterDefinition, String trustingAccountStagingBucketName)
focal_class.identifier: getRunJobFlowRequest
focal_class.modifiers: private
focal_class.parameters: (String clusterName, EmrClusterDefinition emrClusterDefinition, String trustingAccountStagingBucketName)
focal_class.return: RunJobFlowRequest
focal_class.signature: RunJobFlowRequest getRunJobFlowRequest(String clusterName, EmrClusterDefinition emrClusterDefinition, String trustingAccountStagingBucketName)
focal_class.class_method_signature: EmrDaoImpl.getStepConfig(EmrClusterDefinition emrClusterDefinition)
focal_class.full_signature: private List<StepConfig> getStepConfig(EmrClusterDefinition emrClusterDefinition)
focal_class.identifier: getStepConfig
focal_class.modifiers: private
focal_class.parameters: (EmrClusterDefinition emrClusterDefinition)
focal_class.return: List<StepConfig>
focal_class.signature: List<StepConfig> getStepConfig(EmrClusterDefinition emrClusterDefinition)
focal_method.body: @Override
      public synchronized ClusterSummary getActiveEmrClusterByNameAndAccountId(String clusterName, String accountId, AwsParamsDto awsParams)
      {
          LOGGER.info("Entering synchronized method.");
  
          // Initialize a cluster summary to null for the case that the cluster is not found in the list.
          ClusterSummary clusterSummary = null;
  
          // Get the cluster cache using the accountId.
          Map<EmrClusterCacheKey, String> emrClusterCache = getEmrClusterCacheByAccountId(accountId);
  
          LOGGER.debug("EMR cluster cache retrieved. emrClusterCache=\"{}\" emrClusterCacheContents=\"{}\"", System.identityHashCode(emrClusterCache),
              emrClusterCache.toString());
  
          if (StringUtils.isNotBlank(clusterName))
          {
              // Build the EMR cluster cache key
              EmrClusterCacheKey emrClusterCacheKey = new EmrClusterCacheKey(clusterName.toUpperCase(), accountId);
  
              LOGGER.info("EMR cluster cache key. emrClusterCacheKey=\"{}\"", emrClusterCacheKey.toString());
  
              // First check to see if this cluster id is stored locally in the EMR Cluster Cache.
              // If the EMR cluster cache does contain the cluster key use the id found in the EMR cluster cache.
              // Else the EMR cluster cache does not contain the cluster key then move on to do a list cluster.
              if (emrClusterCache.containsKey(emrClusterCacheKey))
              {
                  // Get the cluster id value from the EMR cluster cache with the cluster name key.
                  String clusterId = emrClusterCache.get(emrClusterCacheKey);
  
                  // Retrieve the cluster status to validate the cluster.
                  Cluster cluster = getEmrClusterById(clusterId, awsParams);
                  ClusterStatus clusterStatus = cluster == null ? null : cluster.getStatus();
                  String status = clusterStatus == null ? null : clusterStatus.getState();
                  LOGGER.info("Found the EMR cluster name in the EMR cluster cache. emrClusterName=\"{}\" emrClusterId=\"{}\" emrClusterStatus=\"{}\"",
                      clusterName.toUpperCase(), clusterId, status);
  
                  // If the status is not null and the status is in one of the active EMR cluster states,
                  // then return the cluster summary with the cluster id from the EMR cluster cache.
                  // Else remove the cluster from the EMR cluster cache and then move on to do a list cluster.
                  if (status != null && Arrays.asList(getActiveEmrClusterStates()).contains(status))
                  {
                      LOGGER.info("Exiting synchronized block.");
                      return new ClusterSummary().withId(clusterId).withName(clusterName).withStatus(clusterStatus);
                  }
                  else
                  {
                      LOGGER.info("Removing cluster from EMR cluster cache. emrClusterName=\"{}\" emrClusterId=\"{}\" emrClusterStatus=\"{}\"",
                          clusterName.toUpperCase(), clusterId, status);
  
                      // Remove the cluster from the cache.
                      emrClusterCache.remove(emrClusterCacheKey);
                  }
              }
  
              LOGGER.info("The cluster name was not in the cluster cache. Make a list cluster request to find the cluster id. emrClusterName=\"{}\"",
                  clusterName.toUpperCase());
  
              // Get the EMR cluster cache timeout values.
              EmrClusterCacheTimestamps emrClusterCacheTimestamps = getEmrClusterCacheTimestampsByAccountId(accountId);
              LocalDateTime lastFullReload = emrClusterCacheTimestamps.getLastFullReload();
              LocalDateTime lastDeltaUpdate = emrClusterCacheTimestamps.getLastDeltaUpdate();
  
              // New cache timeout values.
              LocalDateTime newLastFullReload;
              LocalDateTime newLastDeltaUpdate;
  
              // Default the created after date to null for the full update case.
              Date createdAfter = null;
  
              // If the last delta update is null, or the last full reload is null, or the if the difference between the current time and the lastFullReload is
              // greater than FULL_RELOAD_CACHE_TIME_PERIOD_IN_MINUTES, then do a full reload.
              if (lastDeltaUpdate == null || lastFullReload == null ||
                  Duration.between(lastFullReload, LocalDateTime.now(ZoneId.systemDefault())).toMinutes() > FULL_RELOAD_CACHE_TIME_PERIOD_IN_MINUTES)
              {
                  // Set the new last full reload time to the current time.
                  newLastFullReload = LocalDateTime.now(ZoneId.systemDefault());
  
                  // Clear the EMR cluster cache
                  emrClusterCache.clear();
  
                  LOGGER.info("EMR cluster cache cleared. Starting a full reload of the EMR cluster cache. " +
                          "newLastFullReload=\"{}\" lastFullReload=\"{}\" emrClusterCache=\"{}\"", newLastFullReload, lastFullReload,
                      System.identityHashCode(emrClusterCache));
              }
              else
              {
                  // Set the created after date to the last delta update minus the delta update safety buffer time.
                  createdAfter = Date.from(lastDeltaUpdate.minusMinutes(DELTA_UPDATE_BUFFER_IN_MINUTES).atZone(ZoneId.systemDefault()).toInstant());
  
                  // Keep the last full reload the same.
                  newLastFullReload = lastFullReload;
  
                  LOGGER.info("Beginning a delta reload of the EMR cluster cache. lastFullReload=\"{}\" lastDeltaUpdate=\"{}\"", lastFullReload, lastDeltaUpdate);
              }
  
              // Set the new last delta update to the current time.
              newLastDeltaUpdate = LocalDateTime.now(ZoneId.systemDefault());
  
              LOGGER
                  .info("The new last delta update is newLastDeltaUpdate=\"{}\" and the created after is createdAfter=\"{}\"", newLastDeltaUpdate, createdAfter);
  
              /**
               * Call AWSOperations for ListClusters API. Need to list all the active clusters that are in
               * BOOTSTRAPPING/RUNNING/STARTING/WAITING states
               */
              ListClustersRequest listClustersRequest = new ListClustersRequest().withClusterStates(getActiveEmrClusterStates());
  
              /**
               * ListClusterRequest returns only 50 clusters at a time. However, this returns a marker
               * that can be used for subsequent calls to listClusters to get all the clusters
               */
              String markerForListClusters = listClustersRequest.getMarker();
  
              // Loop through all the available clusters and look for the given cluster id
              do
              {
                  /**
                   * Call AWSOperations for ListClusters API.
                   * Need to include the Marker returned by the previous iteration
                   */
                  ListClustersResult clusterResult = emrOperations
                      .listEmrClusters(getEmrClient(awsParams), listClustersRequest.withMarker(markerForListClusters).withCreatedAfter(createdAfter));
  
                  // Loop through all the active clusters returned by AWS
                  for (ClusterSummary clusterInstance : clusterResult.getClusters())
                  {
                      LOGGER
                          .info("Adding EMR cluster to the EMR Cluster Cache. emrClusterName=\"{}\" emrClusterId=\"{}\"", clusterInstance.getName().toUpperCase(),
                              clusterInstance.getId());
  
                      // Add this cluster instance to the EMR cluster cache.
                      emrClusterCache.put(new EmrClusterCacheKey(clusterInstance.getName().toUpperCase(), accountId), clusterInstance.getId());
  
                      // If the cluster name matches, then set the clusterSummary to the clusterInstance
                      if (StringUtils.isNotBlank(clusterInstance.getName()) && clusterInstance.getName().equalsIgnoreCase(clusterName))
                      {
                          clusterSummary = clusterInstance;
                      }
                  }
                  markerForListClusters = clusterResult.getMarker();
              }
              while (markerForListClusters != null);
  
              // Update the cluster cache timestamps
              emrClusterCacheTimestamps.setLastFullReload(newLastFullReload);
              emrClusterCacheTimestamps.setLastDeltaUpdate(newLastDeltaUpdate);
          }
  
          LOGGER.info("Returning clusterSummary=\"{}\"", clusterSummary == null ? null : clusterSummary.toString());
  
          LOGGER.debug("State of cache after calling getActiveEmrClusterByNameAndAccountId. emrClusterCache=\"{}\" emrClusterCacheContents=\"{}\"",
              System.identityHashCode(emrClusterCache), emrClusterCache.toString());
  
          LOGGER.info("Exiting synchronized method.");
  
          return clusterSummary;
      }
focal_method.class_method_signature: EmrDaoImpl.getActiveEmrClusterByNameAndAccountId(String clusterName, String accountId, AwsParamsDto awsParams)
focal_method.full_signature: @Override public synchronized ClusterSummary getActiveEmrClusterByNameAndAccountId(String clusterName, String accountId, AwsParamsDto awsParams)
focal_method.identifier: getActiveEmrClusterByNameAndAccountId
focal_method.invocations: info getEmrClusterCacheByAccountId debug identityHashCode toString isNotBlank toUpperCase info toString containsKey get getEmrClusterById getStatus getState info toUpperCase contains asList getActiveEmrClusterStates info withStatus withName withId info toUpperCase remove info toUpperCase getEmrClusterCacheTimestampsByAccountId getLastFullReload getLastDeltaUpdate toMinutes between now systemDefault now systemDefault clear info identityHashCode from toInstant atZone minusMinutes systemDefault info now systemDefault info withClusterStates getActiveEmrClusterStates getMarker listEmrClusters getEmrClient withCreatedAfter withMarker getClusters info toUpperCase getName getId put toUpperCase getName getId isNotBlank getName equalsIgnoreCase getName getMarker setLastFullReload setLastDeltaUpdate info toString debug identityHashCode toString info
focal_method.modifiers: @Override public synchronized
focal_method.parameters: (String clusterName, String accountId, AwsParamsDto awsParams)
focal_method.return: ClusterSummary
focal_method.signature: ClusterSummary getActiveEmrClusterByNameAndAccountId(String clusterName, String accountId, AwsParamsDto awsParams)