nlu90 commented on a change in pull request #3142: Validate resource constraint
(RAM and CPU) in RoundRobinPacking
URL: https://github.com/apache/incubator-heron/pull/3142#discussion_r245817322
##########
File path:
examples/src/java/org/apache/heron/examples/api/ExampleResources.java
##########
@@ -35,7 +35,12 @@ static ByteAmount getContainerDisk(int components, int
containers) {
static ByteAmount getContainerRam(int components, int containers) {
final int componentsPerContainer = Math.max(components / containers, 1);
- return ByteAmount.fromMegabytes(COMPONENT_RAM_MB * componentsPerContainer);
+ return ByteAmount.fromMegabytes(COMPONENT_RAM_MB * (componentsPerContainer
+ 2));
Review comment:
give `2` a meaningful name instead of a magic number
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services