Statistic AVERAGE Threshold 15 Unit PERCENT The

Statistic average threshold 15 unit percent the

This preview shows page 337 - 340 out of 395 pages.

,Statistic= AVERAGE ,Threshold= 15 ,Unit= PERCENT ,Dimensions=[{Key=JobFlowId,Valu The following command illustrates using the command line to provide the automatic scaling policy definition as part of an instance group configuration file named instancegroupconfig.json . 331
Image of page 337
Amazon EMR Management Guide Using Automatic Scaling in Amazon EMR aws emr create-cluster --release-label emr-5.2.0 --service-role EMR_DefaultRole --ec2- attributes InstanceProfile=EMR_EC2_DefaultRole --instance-groups file:// your/path/to/ instancegroupconfig.json --auto-scaling-role EMR_AutoScaling_DefaultRole With the contents of the configuration file as follows: [ { "InstanceCount": 1, "Name": "MyMasterIG", "InstanceGroupType": "MASTER", "InstanceType": "m5.xlarge" }, { "InstanceCount": 2, "Name": "MyCoreIG", "InstanceGroupType": "CORE", "InstanceType": "m5.xlarge", "AutoScalingPolicy": { "Constraints": { "MinCapacity": 2, "MaxCapacity": 10 }, "Rules": [ { "Name": "Default-scale-out", "Description": "Replicates the default scale-out rule in the console for YARN memory.", "Action":{ "SimpleScalingPolicyConfiguration":{ "AdjustmentType": "CHANGE_IN_CAPACITY", "ScalingAdjustment": 1, "CoolDown": 300 } }, "Trigger":{ "CloudWatchAlarmDefinition":{ "ComparisonOperator": "LESS_THAN", "EvaluationPeriods": 1, "MetricName": "YARNMemoryAvailablePercentage", "Namespace": "AWS/ElasticMapReduce", "Period": 300, "Threshold": 15, "Statistic": "AVERAGE", "Unit": "PERCENT", "Dimensions":[ { "Key" : "JobFlowId", "Value" : "${emr.clusterId}" } ] } } } ] } } ] 332
Image of page 338
Amazon EMR Management Guide Using Automatic Scaling in Amazon EMR Adding an Instance Group with an Automatic Scaling Policy to a Cluster You can specify a scaling policy configuration using the --instance-groups option with the add- instance-groups command in the same way you can when you use create-cluster . The following example uses a reference to a JSON file, instancegroupconfig.json , with the instance group configuration. aws emr add-instance-groups --cluster-id j-1EKZ3TYEVF1S2 --instance-groups file:// your/ path/to/instancegroupconfig.json Applying an Automatic Scaling Policy to an Existing Instance Group or Modifying an Applied Policy Use the aws emr put-auto-scaling-policy command to apply an automatic scaling policy to an existing instance group. The instance group must be part of a cluster that uses the automatic scaling IAM role. The following example uses a reference to a JSON file, autoscaleconfig.json , that specifies the automatic scaling policy configuration. aws emr put-auto-scaling-policy --cluster-id j-1EKZ3TYEVF1S2 --instance-group- id ig-3PLUZBA6WLS07 --auto-scaling-policy The contents of the autoscaleconfig.json file, which defines the same scale-out rule as shown in the previous example, is shown below. [{ "AutoScalingPolicy": { "Constraints": { "MinCapacity": 2, "MaxCapacity": 10 }, "Rules": [{ "Name": "Default-scale-out", "Description": "Replicates the default scale-out rule in the console for YARN memory.", "Action": { "SimpleScalingPolicyConfiguration": { "AdjustmentType": "CHANGE_IN_CAPACITY", "ScalingAdjustment": 1, "CoolDown": 300 } }, "Trigger": { "CloudWatchAlarmDefinition": { "ComparisonOperator": "LESS_THAN", "EvaluationPeriods": 1, "MetricName": "YARNMemoryAvailablePercentage", "Namespace": "AWS/ElasticMapReduce", "Period": 300, "Threshold": 15,
Image of page 339
Image of page 340

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

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors