1

I have an EMR cluster that runs a single step - custom JAR. I need to create a second step from the first step at runtime, how can I do it? I know I can do it using the CLI but how can I accomplish it using java?

Thanks

user1452132
  • 1,758
  • 11
  • 21
Eitan Illuz
  • 323
  • 2
  • 7

1 Answers1

0

For this you need to use AWS SDK for Java http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/calling-emr-with-java-sdk.html

Please refer to this API reference - especially the addJobFlowSteps method http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/elasticmapreduce/AmazonElasticMapReduce.html

user1452132
  • 1,758
  • 11
  • 21
  • First thanks for the quick reply. Second as i see it this class is used for creating new cluster while i want to create new step from a jar running in an existing cluster. – Eitan Illuz Aug 28 '14 at 04:47
  • This class is a wrapper around their EMR Webservice interface. I dont think this interface lets you create a new cluster. You should however be able add a step using this interface using the addJobFlowSteps method. The webservice api reference may be a bit more helpful - http://docs.aws.amazon.com/ElasticMapReduce/latest/API/API_AddJobFlowSteps.html – user1452132 Aug 28 '14 at 11:12