修改拓扑的ram要求在heron中无效

f2uvfpb9  于 2021-06-26  发布在  Mesos
关注(0)|答案(1)|浏览(377)

我修改了heron示例拓扑中名为 WordCountTopology.java 并使用 mvn assembly:assembly 命令。当我将修改后的wordcounttopology提交给heron集群时,我发现heron示例的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 = 512mb . 的默认值 parallelism1 .
示例资源的内容如下:

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=512mb256mb .
但是,在 Aurora scheduler 具体如下:

极光中的所有示例都失败了:

我的问题是:我应该怎么做才能有效地改变拓扑中的ram需求?我不知道为什么任务在mesos和aurora中运行失败。谢谢你的帮助。

fxnxkyjh

fxnxkyjh1#

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

相关问题