Package org.springframework.yarn.am.grid.support

Examples of org.springframework.yarn.am.grid.support.ProjectionData


    hosts1.put("host10", 1);

//    ProjectionData projectionData1 = new ProjectionData(0, hosts1, null);
//    HostsGridProjection projection1 = new HostsGridProjection();
//    projection1.setProjectionData(projectionData1);
    ProjectionData projectionData1 = new ProjectionData(0, hosts1, null, "hosts", 0);


//    HostsGridProjection projection1 = new HostsGridProjection(hosts1);
    GridProjection projection1 = appmaster.createContainerCluster("cluster1", projectionData1).getGridProjection();

    // cluster2
    Map<String, Integer> hosts2 = new HashMap<String, Integer>();
    hosts2.put("host20", 1);
//    ProjectionData projectionData2 = new ProjectionData(0, hosts2, null);
//    HostsGridProjection projection2 = new HostsGridProjection();
//    projection2.setProjectionData(projectionData2);
//    HostsGridProjection projection2 = new HostsGridProjection(hosts2);
    ProjectionData projectionData2 = new ProjectionData(0, hosts2, null, "hosts", 0);
    GridProjection projection2 = appmaster.createContainerCluster("cluster2", projectionData2).getGridProjection();

    appmaster.startContainerCluster("cluster1");
    assertDoTask(appmaster, 0, 1, 0, 0, "cluster1");
    assertDoTask(appmaster, null, null, null, null, "cluster2");
View Full Code Here


    GridProjection projection = gridProjectionFactory.getGridProjection(projectionData);
    if (projection == null) {
      throw new IllegalArgumentException("Unable to build projection using type " + projectionData.getType());
    }

    ProjectionData p = projectionDataRegistry.getProjectionDatas().get(clusterDef);

    if (projection instanceof AbstractGridProjection) {
      ((AbstractGridProjection) projection).setConfiguration(getConfiguration());
      if (p != null && ((AbstractGridProjection) projection).getPriority() == null) {
        ((AbstractGridProjection) projection).setPriority(p.getPriority());
      }
    }

    StateMachine<State<ClusterState, ClusterEvent>, ClusterEvent> stateMachine = stateMachineFactory
        .getStateMachine();
View Full Code Here

public class ClusterAllocatingAction implements Action {

  @Override
  public void execute(MessageHeaders headers) {
    ContainerCluster cluster = headers.get("containercluster", ContainerCluster.class);
    ProjectionData projectionData = headers.get("projectiondata", ProjectionData.class);
    AbstractContainerClusterAppmaster appmaster = headers.get("appmaster", AbstractContainerClusterAppmaster.class);

    if(projectionData != null) {
      GridProjection gridProjection = cluster.getGridProjection();
      gridProjection.setProjectionData(projectionData);
View Full Code Here

TOP

Related Classes of org.springframework.yarn.am.grid.support.ProjectionData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.