fix all example topologies (#3167)
diff --git a/examples/src/java/org/apache/heron/examples/api/AckingTopology.java b/examples/src/java/org/apache/heron/examples/api/AckingTopology.java
index 23217bf..13a4b4b 100644
--- a/examples/src/java/org/apache/heron/examples/api/AckingTopology.java
+++ b/examples/src/java/org/apache/heron/examples/api/AckingTopology.java
@@ -81,7 +81,8 @@
ExampleResources.getContainerDisk(spouts + bolts, 2));
conf.setContainerRamRequested(
ExampleResources.getContainerRam(spouts + bolts, 2));
- conf.setContainerCpuRequested(1);
+ conf.setContainerCpuRequested(
+ ExampleResources.getContainerCpu(spouts + bolts, 2));
// Set the number of workers or stream managers
conf.setNumStmgrs(2);
diff --git a/examples/src/java/org/apache/heron/examples/api/ComponentJVMOptionsTopology.java b/examples/src/java/org/apache/heron/examples/api/ComponentJVMOptionsTopology.java
index 999e5ee..8522bba 100644
--- a/examples/src/java/org/apache/heron/examples/api/ComponentJVMOptionsTopology.java
+++ b/examples/src/java/org/apache/heron/examples/api/ComponentJVMOptionsTopology.java
@@ -75,7 +75,7 @@
// container resource configuration
conf.setContainerDiskRequested(ByteAmount.fromGigabytes(2));
- conf.setContainerRamRequested(ByteAmount.fromGigabytes(2));
+ conf.setContainerRamRequested(ByteAmount.fromGigabytes(3));
conf.setContainerCpuRequested(2);
// Specify the size of RAM padding to per container.
diff --git a/examples/src/java/org/apache/heron/examples/api/CustomGroupingTopology.java b/examples/src/java/org/apache/heron/examples/api/CustomGroupingTopology.java
index 4016ee2..bf4102f 100644
--- a/examples/src/java/org/apache/heron/examples/api/CustomGroupingTopology.java
+++ b/examples/src/java/org/apache/heron/examples/api/CustomGroupingTopology.java
@@ -58,7 +58,7 @@
// container resource configuration
conf.setContainerDiskRequested(ByteAmount.fromGigabytes(2));
- conf.setContainerRamRequested(ByteAmount.fromGigabytes(2));
+ conf.setContainerRamRequested(ByteAmount.fromGigabytes(3));
conf.setContainerCpuRequested(2);
conf.setNumStmgrs(2);
diff --git a/examples/src/java/org/apache/heron/examples/api/ExclamationTopology.java b/examples/src/java/org/apache/heron/examples/api/ExclamationTopology.java
index 363c71c..373771f 100644
--- a/examples/src/java/org/apache/heron/examples/api/ExclamationTopology.java
+++ b/examples/src/java/org/apache/heron/examples/api/ExclamationTopology.java
@@ -71,7 +71,8 @@
ExampleResources.getContainerDisk(spouts + bolts, parallelism));
conf.setContainerRamRequested(
ExampleResources.getContainerRam(spouts + bolts, parallelism));
- conf.setContainerCpuRequested(1);
+ conf.setContainerCpuRequested(
+ ExampleResources.getContainerCpu(spouts + bolts, parallelism));
if (args != null && args.length > 0) {
conf.setNumStmgrs(parallelism);
diff --git a/examples/src/java/org/apache/heron/examples/api/MultiSpoutExclamationTopology.java b/examples/src/java/org/apache/heron/examples/api/MultiSpoutExclamationTopology.java
index e9cdf8a..05dedb8 100644
--- a/examples/src/java/org/apache/heron/examples/api/MultiSpoutExclamationTopology.java
+++ b/examples/src/java/org/apache/heron/examples/api/MultiSpoutExclamationTopology.java
@@ -69,8 +69,8 @@
// container resource configuration
conf.setContainerDiskRequested(ByteAmount.fromGigabytes(3));
- conf.setContainerRamRequested(ByteAmount.fromGigabytes(2));
- conf.setContainerCpuRequested(1);
+ conf.setContainerRamRequested(ByteAmount.fromGigabytes(5));
+ conf.setContainerCpuRequested(4);
if (args != null && args.length > 0) {
conf.setNumStmgrs(3);
diff --git a/examples/src/java/org/apache/heron/examples/api/MultiStageAckingTopology.java b/examples/src/java/org/apache/heron/examples/api/MultiStageAckingTopology.java
index a9bff79..d0d111c 100644
--- a/examples/src/java/org/apache/heron/examples/api/MultiStageAckingTopology.java
+++ b/examples/src/java/org/apache/heron/examples/api/MultiStageAckingTopology.java
@@ -84,7 +84,8 @@
ExampleResources.getContainerDisk(3 * parallelism, parallelism));
conf.setContainerRamRequested(
ExampleResources.getContainerRam(3 * parallelism, parallelism));
- conf.setContainerCpuRequested(1);
+ conf.setContainerCpuRequested(
+ ExampleResources.getContainerCpu(3 * parallelism, parallelism));
if (args != null && args.length > 0) {
conf.setNumStmgrs(parallelism);
diff --git a/examples/src/java/org/apache/heron/examples/api/SentenceWordCountTopology.java b/examples/src/java/org/apache/heron/examples/api/SentenceWordCountTopology.java
index 8f8ae2c..4f30880 100644
--- a/examples/src/java/org/apache/heron/examples/api/SentenceWordCountTopology.java
+++ b/examples/src/java/org/apache/heron/examples/api/SentenceWordCountTopology.java
@@ -186,8 +186,8 @@
// container resource configuration
conf.setContainerDiskRequested(ByteAmount.fromGigabytes(3));
- conf.setContainerRamRequested(ByteAmount.fromGigabytes(3));
- conf.setContainerCpuRequested(2);
+ conf.setContainerRamRequested(ByteAmount.fromGigabytes(4));
+ conf.setContainerCpuRequested(4);
conf.setNumStmgrs(2);
diff --git a/examples/src/java/org/apache/heron/examples/api/StatefulWordCountTopology.java b/examples/src/java/org/apache/heron/examples/api/StatefulWordCountTopology.java
index 7ed3562..35de8c7 100644
--- a/examples/src/java/org/apache/heron/examples/api/StatefulWordCountTopology.java
+++ b/examples/src/java/org/apache/heron/examples/api/StatefulWordCountTopology.java
@@ -213,8 +213,9 @@
conf.setContainerDiskRequested(
ExampleResources.getContainerDisk(2 * parallelism, parallelism));
conf.setContainerRamRequested(
- ExampleResources.getContainerRam(2 * parallelism, parallelism));
- conf.setContainerCpuRequested(2);
+ ExampleResources.getContainerRam(4 * parallelism, parallelism));
+ conf.setContainerCpuRequested(
+ ExampleResources.getContainerCpu(2 * parallelism, parallelism));
HeronSubmitter.submitTopology(args[0], conf, builder.createTopology());
}
diff --git a/examples/src/java/org/apache/heron/examples/api/TaskHookTopology.java b/examples/src/java/org/apache/heron/examples/api/TaskHookTopology.java
index 33047e9..5d8af8d 100644
--- a/examples/src/java/org/apache/heron/examples/api/TaskHookTopology.java
+++ b/examples/src/java/org/apache/heron/examples/api/TaskHookTopology.java
@@ -83,8 +83,8 @@
// container resource configuration
conf.setContainerDiskRequested(ByteAmount.fromGigabytes(2));
- conf.setContainerRamRequested(ByteAmount.fromGigabytes(2));
- conf.setContainerCpuRequested(2);
+ conf.setContainerRamRequested(ByteAmount.fromGigabytes(3));
+ conf.setContainerCpuRequested(3);
conf.setNumStmgrs(2);