修改拓扑的RAM要求在Heron中无效

时间:2018-03-13 17:18:58

标签: mesos topology aurora heron

我在名为WordCountTopology.java的Heron示例拓扑中修改了RAM要求,并使用mvn assembly:assembly命令重建文件。当我将修改后的WordCountTopology提交给Heron集群时,我发现Heron Instance的RAM要求没有改变。
构建.jar的过程是成功的。 WordCountTopology的默认RAM要求如下:

// configure component resources
conf.setComponentRam("word",
        ByteAmount.fromMegabytes(ExampleResources.COMPONENT_RAM_MB * 2));
conf.setComponentRam("consumer",
        ByteAmount.fromMegabytes(ExampleResources.COMPONENT_RAM_MB * 2));

// configure container resources
conf.setContainerDiskRequested(
    ExampleResources.getContainerDisk(2 * parallelism, parallelism));
conf.setContainerRamRequested(
    ExampleResources.getContainerRam(2 * parallelism, parallelism));
conf.setContainerCpuRequested(2);

在上面的代码中。 ExampleResources.COMPONENT_RAM_MB = 512mbparallelism的默认值为1 有关ExampleResources的内容如下:

static ByteAmount getContainerDisk(int components, int containers) {
    return ByteAmount.fromGigabytes(Math.max(components / containers, 1));
  }

  static ByteAmount getContainerRam(int components, int containers) {
    final int componentsPerContainer = Math.max(components / containers, 1);
    return ByteAmount.fromMegabytes(COMPONENT_RAM_MB * componentsPerContainer);
  }

我将ExampleResources.COMPONENT_RAM_MB=512mb的值更改为256mb 但是,拓扑的要求在Aurora scheduler中显示如下: enter image description here 极光中的所有实例都是 FAILED enter image description here 我的问题:我应该怎样做才能有效地改变拓扑中的RAM要求?我不知道为什么任务在mesos和极光中运行失败。谢谢你的帮助。

1 个答案:

答案 0 :(得分:0)

你知道你使用的是哪种版本的苍鹭吗?我们最近切换到一种称为资源合规循环调度的新打包算法。最终,资源分配将是自动的。

相关问题