@Component public class EmrHelper extends AwsHelper
configurationHelper, herdStringHelper| Constructor and Description |
|---|
EmrHelper() |
| Modifier and Type | Method and Description |
|---|---|
String |
buildEmrClusterName(String namespaceCd,
String emrDefinitionName,
String clusterName)
Returns EMR cluster name constructed according to the template defined.
|
String |
getActiveEmrClusterId(String emrClusterId,
String emrClusterName,
String accountId)
Gets the ID of an active EMR cluster which matches the given criteria.
|
AwsParamsDto |
getAwsparamsDtoByAcccountId(String accountId)
Get the AWS Params DTO for the account Id
if no account id is specified, use the default
|
org.apache.oozie.client.WorkflowAction |
getClientWorkflowAction(org.apache.oozie.client.WorkflowJob wrapperWorkflowJob)
Retrieves the workflow action for the client workflow.
|
EmrDao |
getEmrDao() |
com.amazonaws.services.elasticmapreduce.model.StepConfig |
getEmrHadoopJarStepConfig(String stepName,
String jarLocation,
String mainClass,
List<String> scriptArguments,
Boolean isContinueOnError)
Builds the StepConfig for the Hadoop jar step.
|
ConfigurationValue |
getEmrOozieHerdWorkflowS3LocationConfiguration()
Gets the Oozie herd wrapper Workflow S3 Location ConfigurationValue.
|
org.apache.oozie.client.WorkflowAction |
getFirstWorkflowActionInError(org.apache.oozie.client.WorkflowJob workflowJob)
Retrieves the first workflow action that is in error.
|
String |
getS3HdfsCopyScriptName()
Gets the S3 to HDFS copy script name.
|
String |
getS3StagingLocation()
Get the S3_STAGING_RESOURCE full path from the bucket name as well as other details.
|
boolean |
isActiveEmrState(String status) |
void |
setEmrDao(EmrDao emrDao) |
getAwsParamsDto, getClientConfiguration, getTransferRateInKilobytesPerSecond, getTransferRateInMegabitsPerSecondpublic String buildEmrClusterName(String namespaceCd, String emrDefinitionName, String clusterName)
namespaceCd - the namespace code value.emrDefinitionName - the EMR definition name value.clusterName - the cluster name value.public String getS3StagingLocation()
public String getS3HdfsCopyScriptName() throws IllegalStateException
IllegalStateException - if the S3 to HDGFS copy script name is not configured.public ConfigurationValue getEmrOozieHerdWorkflowS3LocationConfiguration() throws IllegalStateException
IllegalStateException - if the S3 location of herd wrapper workflow is not configured.public org.apache.oozie.client.WorkflowAction getClientWorkflowAction(org.apache.oozie.client.WorkflowJob wrapperWorkflowJob)
wrapperWorkflowJob - the herd wrapper workflow job.public org.apache.oozie.client.WorkflowAction getFirstWorkflowActionInError(org.apache.oozie.client.WorkflowJob workflowJob)
workflowJob - the oozie workflow job.public boolean isActiveEmrState(String status)
public com.amazonaws.services.elasticmapreduce.model.StepConfig getEmrHadoopJarStepConfig(String stepName, String jarLocation, String mainClass, List<String> scriptArguments, Boolean isContinueOnError)
stepName - the step name.jarLocation - the location of jar.mainClass - the main class.scriptArguments - the arguments.isContinueOnError - indicate what to do on error.public String getActiveEmrClusterId(String emrClusterId, String emrClusterName, String accountId)
emrClusterId - EMR cluster IDemrClusterName - EMR cluster nameaccountId - the account Id that EMR cluster is running underpublic EmrDao getEmrDao()
public void setEmrDao(EmrDao emrDao)
public AwsParamsDto getAwsparamsDtoByAcccountId(String accountId)
accountId - account IdCopyright © 2017. All rights reserved.