You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eagle.apache.org by qi...@apache.org on 2016/10/19 04:47:28 UTC
incubator-eagle git commit: [EAGLE-637] set task number of
UnitTopologyRunner
Repository: incubator-eagle
Updated Branches:
refs/heads/master 71a4bb013 -> 855b86ef3
[EAGLE-637] set task number of UnitTopologyRunner
https://issues.apache.org/jira/browse/EAGLE-637
Author: Zhao, Qingwen <qi...@apache.org>
Closes #531 from qingwen220/quickFix.
Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/855b86ef
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/855b86ef
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/855b86ef
Branch: refs/heads/master
Commit: 855b86ef3820cbe7405d43576995e5876c551887
Parents: 71a4bb0
Author: Zhao, Qingwen <qi...@apache.org>
Authored: Wed Oct 19 12:47:10 2016 +0800
Committer: Zhao, Qingwen <qi...@apache.org>
Committed: Wed Oct 19 12:47:10 2016 +0800
----------------------------------------------------------------------
.../org/apache/eagle/alert/engine/runner/UnitTopologyRunner.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/855b86ef/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/runner/UnitTopologyRunner.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/runner/UnitTopologyRunner.java b/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/runner/UnitTopologyRunner.java
index ec129fe..88cfb9b 100755
--- a/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/runner/UnitTopologyRunner.java
+++ b/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/runner/UnitTopologyRunner.java
@@ -185,13 +185,13 @@ public class UnitTopologyRunner {
* TODO potentially one route bolt may have multiple tasks, so that is field grouping by groupby fields
* that means we need a separate field to become groupby field
*/
- builder.setBolt(boltName, routerBolts[i]).fieldsGrouping(spoutName, streamId, new Fields());
+ builder.setBolt(boltName, routerBolts[i]).fieldsGrouping(spoutName, streamId, new Fields()).setNumTasks(1);
}
// connect router bolt and alert bolt, also define output streams for downstreaming alert publish bolt
for (int i = 0; i < numOfAlertBolts; i++) {
String boltName = alertBoltNamePrefix + i;
- BoltDeclarer boltDeclarer = builder.setBolt(boltName, alertBolts[i]);
+ BoltDeclarer boltDeclarer = builder.setBolt(boltName, alertBolts[i]).setNumTasks(1);
for (int j = 0; j < numOfRouterBolts; j++) {
String streamId = StreamIdConversion.generateStreamIdBetween(streamRouterBoltNamePrefix + j, boltName);
boltDeclarer.fieldsGrouping(streamRouterBoltNamePrefix + j, streamId, new Fields());