Example usage for com.amazonaws.services.ec2.model CreatePlacementGroupRequest CreatePlacementGroupRequest

List of usage examples for com.amazonaws.services.ec2.model CreatePlacementGroupRequest CreatePlacementGroupRequest

Introduction

In this page you can find the example usage for com.amazonaws.services.ec2.model CreatePlacementGroupRequest CreatePlacementGroupRequest.

Prototype

public CreatePlacementGroupRequest(String groupName, PlacementStrategy strategy) 

Source Link

Document

Constructs a new CreatePlacementGroupRequest object.

Usage

From source file:de.unibi.cebitec.bibigrid.meta.aws.CreateClusterEnvironmentAWS.java

@Override
public CreateClusterAWS createPlacementGroup() {

    // if both instance-types fulfill the cluster specifications, create a 
    // placementGroup.
    if (cluster.getConfig().getMasterInstanceType().getSpec().clusterInstance
            && cluster.getConfig().getSlaveInstanceType().getSpec().clusterInstance) {

        placementGroup = (PLACEMENT_GROUP_PREFIX + cluster.getClusterId());
        log.info("Creating placement group...");
        cluster.getEc2().createPlacementGroup(
                new CreatePlacementGroupRequest(placementGroup, PlacementStrategy.Cluster));

    } else {//from w  ww . j ava2 s. com

        log.info(V, "Placement Group not available for selected Instances-types ...");
        return cluster;

    }

    return cluster;
}