You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@heron.apache.org by nw...@apache.org on 2019/01/23 22:24:36 UTC

[incubator-heron] branch master updated: fix all example topologies (#3167)

This is an automated email from the ASF dual-hosted git repository.

nwang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git


The following commit(s) were added to refs/heads/master by this push:
     new d5e809b  fix all example topologies (#3167)
d5e809b is described below

commit d5e809b830fe2b4c1065170306ef4914d00150cb
Author: Xiaoyao Qian <qi...@illinois.edu>
AuthorDate: Wed Jan 23 14:24:30 2019 -0800

    fix all example topologies (#3167)
---
 examples/src/java/org/apache/heron/examples/api/AckingTopology.java  | 3 ++-
 .../org/apache/heron/examples/api/ComponentJVMOptionsTopology.java   | 2 +-
 .../java/org/apache/heron/examples/api/CustomGroupingTopology.java   | 2 +-
 .../src/java/org/apache/heron/examples/api/ExclamationTopology.java  | 3 ++-
 .../org/apache/heron/examples/api/MultiSpoutExclamationTopology.java | 4 ++--
 .../java/org/apache/heron/examples/api/MultiStageAckingTopology.java | 3 ++-
 .../org/apache/heron/examples/api/SentenceWordCountTopology.java     | 4 ++--
 .../org/apache/heron/examples/api/StatefulWordCountTopology.java     | 5 +++--
 .../src/java/org/apache/heron/examples/api/TaskHookTopology.java     | 4 ++--
 9 files changed, 17 insertions(+), 13 deletions(-)

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 @@ public final class AckingTopology {
         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 @@ public final class ComponentJVMOptionsTopology {
 
     // 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 @@ public final class CustomGroupingTopology {
 
     // 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 @@ public final class ExclamationTopology {
         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 @@ public final class MultiSpoutExclamationTopology {
 
     // 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 @@ public final class MultiStageAckingTopology {
         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 @@ public final class SentenceWordCountTopology {
 
     // 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 @@ public final class StatefulWordCountTopology {
     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 @@ public final class TaskHookTopology {
 
     // 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);