0

我在名为 Heron 的示例拓扑中修改了 RAM 要求,并使用命令WordCountTopology.java重建了文件。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 = 512mb. parallelism的默认值为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=512mb256mb
但是,拓扑的需求显示Aurora scheduler如下: 在此处输入图像描述 并且极光中的所有实例都失败了: 我的问题:我应该怎么做才能有效地改变拓扑中的RAM需求?我不知道为什么任务运行失败金币和极光。谢谢你的帮助。在此处输入图像描述

4

1 回答 1

0

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

于 2018-04-12T00:25:39.347 回答