Package org.springframework.yarn.am.grid

Examples of org.springframework.yarn.am.grid.GridProjectionFactory


    assertNotNull(context.getBean(YarnAppmaster.class));
    YarnAppmaster appmaster = context.getBean(YarnAppmaster.class);
    GridProjectionFactoryLocator locator = TestUtils.readField("gridProjectionFactoryLocator", appmaster);
    Set<GridProjectionFactory> factories = TestUtils.readField("factories", locator);
    assertThat(factories.size(), is(1));
    GridProjectionFactory factory = factories.iterator().next();
    assertThat(factory.getRegisteredProjectionTypes().size(), is(3));
    assertThat(factory.getRegisteredProjectionTypes(), containsInAnyOrder("hosts", "racks", "any"));
  }
View Full Code Here


    assertNotNull(context.getBean(YarnAppmaster.class));
    YarnAppmaster appmaster = context.getBean(YarnAppmaster.class);
    GridProjectionFactoryLocator locator = TestUtils.readField("gridProjectionFactoryLocator", appmaster);
    Set<GridProjectionFactory> factories = TestUtils.readField("factories", locator);
    assertThat(factories.size(), is(1));
    GridProjectionFactory factory = factories.iterator().next();
    assertThat(factory.getRegisteredProjectionTypes().size(), is(1));
    assertThat(factory.getRegisteredProjectionTypes(), containsInAnyOrder("foo"));
  }
View Full Code Here

    if (clusterDef == null) {
      clusterDef = clusterId;
    }

    GridProjectionFactory gridProjectionFactory = gridProjectionFactoryLocator.getGridProjectionFactory(projectionData.getType());
    if (gridProjectionFactory == null) {
      throw new IllegalArgumentException("Projection type " + projectionData.getType()
          + " not know to gridProjectionFactoryLocator=[" + gridProjectionFactoryLocator + "]");
    }

    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);
View Full Code Here

TOP

Related Classes of org.springframework.yarn.am.grid.GridProjectionFactory

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.