To enable debugging using the AWS CLI type the following command and replace

To enable debugging using the aws cli type the

This preview shows page 145 - 147 out of 395 pages.

To enable debugging using the AWS CLI, type the following command and replace myKey with the name of your EC2 key pair. aws emr create-cluster --name " Test cluster " --release-label emr-4.1.0 --log-uri s3:// mybucket/logs/ --enable-debugging --applications Name= Hadoop Name= Hive Name= Pig --use-default-roles --ec2-attributes KeyName= myKey --instance-type m5.xlarge -- instance-count 3 When you specify the instance count without using the --instance-groups parameter, a single Master node is launched, and the remaining instances are launched as core nodes. All nodes will use the instance type specified in the command. Note If you have not previously created the default EMR service role and EC2 instance profile, type aws emr create-default-roles to create them before typing the create- cluster subcommand. For more information on using Amazon EMR commands in the AWS CLI, see https:// docs.aws.amazon.com/cli/latest/reference/emr . Example Enabling debugging using the Java SDK Enable debugging using the following StepConfig: StepFactory stepFactory = new StepFactory(); StepConfig enabledebugging = new StepConfig() .withName("Enable debugging") .withActionOnFailure("TERMINATE_JOB_FLOW") .withHadoopJarStep(stepFactory.newEnableDebuggingStep()); 139
Image of page 145
Amazon EMR Management Guide Debugging Option Information In this example, new StepFactory() uses us-east-1 as the default region. If your cluster is launched in a different region, you need to specify the region by using new StepFactory(" region_name .elasticmapreduce") , such as new StepFactory("ap- northeast-2.elasticmapreduce") . Debugging Option Information Amazon EMR release 4.1 or later supports debugging in all regions. The Amazon EMR creates an Amazon SQS queue to process debugging data. Message charges may apply. However, Amazon SQS does have Free Tier of up to 1,000,000 requests available. For more information, see the Amazon SQS detail page . Debugging requires the use of roles; your service role and instance profile must allow you to use all Amazon SQS API operations. If your roles are attached to Amazon EMR managed policies, you do not need to do anything to modify your roles. If you have custom roles, you need to add sqs:* permissions. For more information, see Configure IAM Service Roles for Amazon EMR Permissions to AWS Services and Resources (p. 177) . Tag Clusters It can be convenient to categorize your AWS resources in different ways; for example, by purpose, owner, or environment. You can achieve this in Amazon EMR by assigning custom metadata to your Amazon EMR clusters using tags. A tag consists of a key and a value, both of which you define. For Amazon EMR, the cluster is the resource-level that you can tag. For example, you could define a set of tags for your account's clusters that helps you track each cluster's owner or identify a production cluster versus a testing cluster. We recommend that you create a consistent set of tags to meet your organization requirements.
Image of page 146
Image of page 147

You've reached the end of your free preview.

Want to read all 395 pages?

  • Spring '12
  • LauraParker
  • Amazon Web Services, Amazon Elastic Compute Cloud

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes