List of usage examples for com.amazonaws.services.ec2.model InstanceType M24xlarge
InstanceType M24xlarge
To view the source code for com.amazonaws.services.ec2.model InstanceType M24xlarge.
Click Source Link
From source file:awswc.AwsConsoleApp.java
License:Open Source License
static void runJobFlow() throws InterruptedException { // Configure instances to use JobFlowInstancesConfig instances = new JobFlowInstancesConfig(); //********************************************************************// instances.setHadoopVersion(HADOOP_VERSION); instances.withEc2KeyName("ayuda-vp1"); instances.setInstanceCount(MASTER_INSTANCE_COUNT); //instances.setInstanceGroups(instanceGroups) instances.setMasterInstanceType(InstanceType.M24xlarge.toString()); instances.setSlaveInstanceType(InstanceType.M24xlarge.toString()); //********************************************************************// HadoopJarStepConfig hadoopJarStep1 = new HadoopJarStepConfig().withJar(S3N_WORD_COUNT_JAR_) // This should be a full map reduce application. .withArgs(BUCKET_NAME + "inWC", BUCKET_NAME + "outWC"); StepConfig stepConfig1 = new StepConfig().withName("wordcount").withHadoopJarStep(hadoopJarStep1) .withActionOnFailure("TERMINATE_JOB_FLOW"); //********************************************************************// //********************************************************************// HadoopJarStepConfig hadoopJarStep2 = new HadoopJarStepConfig().withJar(S3N_MAX_WORD_COUNT_JAR) // This should be a full map reduce application. .withArgs(BUCKET_NAME + "outWC", BUCKET_NAME + "outXWC", "hate", "10"); StepConfig stepConfig2 = new StepConfig().withName("maxwordcount").withHadoopJarStep(hadoopJarStep2) .withActionOnFailure("TERMINATE_JOB_FLOW"); //********************************************************************// Collection<StepConfig> csc = new ArrayList<StepConfig>(); csc.add(stepConfig1);//from www. j a va 2 s . c om csc.add(stepConfig2); // BootstrapActions bootstrapActions = new BootstrapActions(); RunJobFlowRequest runFlowRequest = new RunJobFlowRequest().withName(FLOW_NAME).withInstances(instances) .withSteps(csc).withLogUri(BUCKET_NAME + "debug") /*.withBootstrapActions( bootstrapActions.newRunIf( "instance.isMaster=true", bootstrapActions.newConfigureDaemons() .withHeapSize(Daemon.JobTracker, 4096) .build()), bootstrapActions.newRunIf( "instance.isRunningNameNode=true", bootstrapActions.newConfigureDaemons() .withHeapSize(Daemon.NameNode, 4096).build()), bootstrapActions.newRunIf( "instance.isRunningDataNode=true", bootstrapActions.newConfigureDaemons() .withHeapSize(Daemon.DataNode, 4096).build()), bootstrapActions.newRunIf( "instance.isRunningJobTracker=true", bootstrapActions.newConfigureDaemons() .withHeapSize(Daemon.JobTracker, 4096).build()), bootstrapActions.newRunIf( "instance.isRunningTaskTracker=true", bootstrapActions.newConfigureDaemons() .withHeapSize(Daemon.TaskTracker, 4096).build()) /*, bootstrapActions.newRunIf( "instance.isSlave=true", bootstrapActions.newConfigureHadoop() .withKeyValue(ConfigFile.Site,"mapred.tasktracker.map.tasks.maximum", "4")) )*/; RunJobFlowResult runJobFlowResult = emr.runJobFlow(runFlowRequest); String jobFlowId = runJobFlowResult.getJobFlowId(); System.out.println("Ran job flow with id: " + jobFlowId); //wasFinished(runJobFlowResult); }
From source file:jp.primecloud.auto.process.aws.AwsInstanceTypeDefinition.java
License:Open Source License
private static void initInstanceStoreCounts() { // http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html // ?/*from w w w . j ava2 s . c o m*/ // M3 addInstanceStoreCount(InstanceType.M3Medium, 1); addInstanceStoreCount(InstanceType.M3Large, 1); addInstanceStoreCount(InstanceType.M3Xlarge, 2); addInstanceStoreCount(InstanceType.M32xlarge, 2); // C3 addInstanceStoreCount(InstanceType.C3Large, 2); addInstanceStoreCount(InstanceType.C3Xlarge, 2); addInstanceStoreCount(InstanceType.C32xlarge, 2); addInstanceStoreCount(InstanceType.C34xlarge, 2); addInstanceStoreCount(InstanceType.C38xlarge, 2); // G2 addInstanceStoreCount(InstanceType.G22xlarge, 1); addInstanceStoreCount(InstanceType.G28xlarge, 2); // X1 addInstanceStoreCount(InstanceType.X116xlarge, 1); addInstanceStoreCount(InstanceType.X132xlarge, 2); // R3 addInstanceStoreCount(InstanceType.R3Large, 1); addInstanceStoreCount(InstanceType.R3Xlarge, 1); addInstanceStoreCount(InstanceType.R32xlarge, 1); addInstanceStoreCount(InstanceType.R34xlarge, 1); addInstanceStoreCount(InstanceType.R38xlarge, 2); // I2 addInstanceStoreCount(InstanceType.I2Xlarge, 1); addInstanceStoreCount(InstanceType.I22xlarge, 2); addInstanceStoreCount(InstanceType.I24xlarge, 4); addInstanceStoreCount(InstanceType.I28xlarge, 8); // D2 addInstanceStoreCount(InstanceType.D2Xlarge, 3); addInstanceStoreCount(InstanceType.D22xlarge, 6); addInstanceStoreCount(InstanceType.D24xlarge, 12); addInstanceStoreCount(InstanceType.D28xlarge, 24); // // M1 addInstanceStoreCount(InstanceType.M1Small, 1); addInstanceStoreCount(InstanceType.M1Medium, 1); addInstanceStoreCount(InstanceType.M1Large, 2); addInstanceStoreCount(InstanceType.M1Xlarge, 4); // M2 addInstanceStoreCount(InstanceType.M2Xlarge, 1); addInstanceStoreCount(InstanceType.M22xlarge, 1); addInstanceStoreCount(InstanceType.M24xlarge, 2); // C1 addInstanceStoreCount(InstanceType.C1Medium, 1); addInstanceStoreCount(InstanceType.C1Xlarge, 4); // CC2 addInstanceStoreCount(InstanceType.Cc28xlarge, 4); // CG1 addInstanceStoreCount(InstanceType.Cg14xlarge, 2); // CR1 addInstanceStoreCount(InstanceType.Cr18xlarge, 2); // HI1 addInstanceStoreCount(InstanceType.Hi14xlarge, 2); // HS1 addInstanceStoreCount(InstanceType.Hs18xlarge, 24); }