Examples of InstanceType


Examples of eu.stratosphere.nephele.instance.InstanceType

    }

    // Shuffle through instance types
    for (int i = 0; i < this.availableInstanceTypes.length; i++) {

      final InstanceType currentInstanceType = this.availableInstanceTypes[i];
      int numberOfMatchingInstances = 0;
      int minNumberOfCPUCores = Integer.MAX_VALUE;
      long minSizeOfPhysicalMemory = Long.MAX_VALUE;
      long minSizeOfFreeMemory = Long.MAX_VALUE;
      final Iterator<ClusterInstance> it = this.registeredHosts.values().iterator();
View Full Code Here

Examples of eu.stratosphere.nephele.instance.InstanceType

        if (i == j) {
          am[i][j] = 1;
        } else {

          final InstanceType sourceType = this.availableInstanceTypes[i];
          InstanceType targetType = this.availableInstanceTypes[j];

          // How many times can we accommodate source type into target type?
          final int cores = targetType.getNumberOfCores() / sourceType.getNumberOfCores();
          final int cu = targetType.getNumberOfComputeUnits() / sourceType.getNumberOfComputeUnits();
          final int mem = targetType.getMemorySize() / sourceType.getMemorySize();
          final int disk = targetType.getDiskCapacity() / sourceType.getDiskCapacity();

          am[i][j] = Math.min(cores, Math.min(cu, Math.min(mem, disk)));
        }
      }
    }
View Full Code Here

Examples of eu.stratosphere.nephele.instance.InstanceType

  public LocalInstanceManager() throws Exception {

    final Configuration config = GlobalConfiguration.getConfiguration();

    // get the default instance type
    InstanceType type = null;
    final String descr = config.getString(LOCALINSTANCE_TYPE_KEY, null);
    if (descr != null) {
      LOG.info("Attempting to parse default instance type from string " + descr);
      type = InstanceTypeFactory.constructFromDescription(descr);
      if (type == null) {
View Full Code Here

Examples of eu.stratosphere.nephele.instance.InstanceType

   
    this.noStatsCompiler = new PactCompiler(null, new DefaultCostEstimator(), dummyAddr);
    this.noStatsCompiler.setDefaultDegreeOfParallelism(DEFAULT_PARALLELISM);
   
    // create the instance type description
    InstanceType iType = InstanceTypeFactory.construct("standard", 6, 2, 4096, 100, 0);
    HardwareDescription hDesc = HardwareDescriptionFactory.construct(2, 4096 * 1024 * 1024, 2000 * 1024 * 1024);
    this.instanceType = InstanceTypeDescriptionFactory.construct(iType, hDesc, DEFAULT_PARALLELISM * 2);
  }
 
View Full Code Here

Examples of eu.stratosphere.nephele.instance.InstanceType

 
      LocalInstanceManager lm = (LocalInstanceManager) jm.getInstanceManager(); // this is for sure, because I chose the local strategy
      try {
        lm.setInstanceListener(testInstanceListener);
 
        final InstanceType defaultInstanceType = lm.getDefaultInstanceType();
        assertEquals("test", defaultInstanceType.getIdentifier());
        assertEquals(4, defaultInstanceType.getNumberOfComputeUnits());
        assertEquals(4, defaultInstanceType.getNumberOfCores());
        assertEquals(1024, defaultInstanceType.getMemorySize());
        assertEquals(160, defaultInstanceType.getDiskCapacity());
        assertEquals(0, defaultInstanceType.getPricePerHour());
 
      } catch (Exception e) {
        e.printStackTrace();
        Assert.fail("Instantiation of LocalInstanceManager failed: " + e.getMessage());
      } finally {
View Full Code Here

Examples of eu.stratosphere.nephele.instance.InstanceType

    final int numCores = 8;
    final int memorySize = 32 * 1024;
    final int diskCapacity = 200;
    final int pricePerHour = 10;

    final InstanceType capacity = InstanceTypeFactory.construct(identifier, numComputeUnits, numCores, memorySize,
      diskCapacity,
      pricePerHour);

    final InstanceConnectionInfo instanceConnectionInfo = new InstanceConnectionInfo(inetAddress, ipcPort, dataPort);

View Full Code Here

Examples of eu.stratosphere.nephele.instance.InstanceType

    final JobID jobID = new JobID();
    final int numComputeUnits = 8 / 8;
    final int numCores = 8 / 8;
    final int memorySize = 32 * 1024 / 8;
    final int diskCapacity = 200 / 8;
    final InstanceType type = InstanceTypeFactory.construct("dummy", numComputeUnits, numCores, memorySize,
      diskCapacity, -1);
    for (int run = 0; run < 2; ++run) {
      // do this twice to check that everything is correctly freed
      AllocatedSlice[] slices = new AllocatedSlice[8];
      for (int i = 0; i < 8; ++i) {
View Full Code Here

Examples of eu.stratosphere.nephele.instance.InstanceType

    final JobID jobID = new JobID();
    final int numComputeUnits = 8 / 8;
    final int numCores = 8 / 8;
    final int memorySize = 32 * 1024 / 8;
    final int diskCapacity = 200 / 8;
    final InstanceType type = InstanceTypeFactory.construct("dummy", numComputeUnits, numCores, memorySize,
      diskCapacity, -1);
    for (int run = 0; run < 2; ++run) {
      // do this twice to check that everything is correctly freed
      AllocatedSlice[] slices = new AllocatedSlice[8];
      for (int i = 0; i < 8; ++i) {
View Full Code Here

Examples of eu.stratosphere.nephele.instance.InstanceType

   
    this.noStatsCompiler = new PactCompiler(null, new DefaultCostEstimator(), dummyAddr);
    this.noStatsCompiler.setDefaultDegreeOfParallelism(DEFAULT_PARALLELISM);
   
    // create the instance type description
    InstanceType iType = InstanceTypeFactory.construct("standard", 6, 2, 4096, 100, 0);
    HardwareDescription hDesc = HardwareDescriptionFactory.construct(2, 4096 * 1024 * 1024, 2000 * 1024 * 1024);
    this.instanceType = InstanceTypeDescriptionFactory.construct(iType, hDesc, DEFAULT_PARALLELISM * 2);
  }
 
View Full Code Here

Examples of org.apache.helix.InstanceType

  if (manager == null) {
      LOG.error("missing attributes in changeContext. requires HelixManager");
      return;
  }

  InstanceType type = manager.getInstanceType();
  if (type != InstanceType.CONTROLLER && type != InstanceType.CONTROLLER_PARTICIPANT) {
      LOG.error("fail to become controller because incorrect instanceType (was "
        + type.toString() + ", requires CONTROLLER | CONTROLLER_PARTICIPANT)");
      return;
  }

  try {
      if (changeContext.getType().equals(NotificationContext.Type.INIT)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.