storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject [1/3] storm git commit: [STORM-663] Create javadocs for BoltDeclarer
Date Wed, 11 Mar 2015 20:28:26 GMT
Repository: storm
Updated Branches:
  refs/heads/master 3a3b7cea7 -> 3113ae1ec


[STORM-663] Create javadocs for BoltDeclarer


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/288cc322
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/288cc322
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/288cc322

Branch: refs/heads/master
Commit: 288cc322774721c2e3ae6c84161ec1bd9d3f24b1
Parents: 8036109
Author: lewuathe <lewuathe@me.com>
Authored: Tue Feb 10 22:06:23 2015 +0900
Committer: lewuathe <lewuathe@me.com>
Committed: Tue Feb 10 22:06:23 2015 +0900

----------------------------------------------------------------------
 .../backtype/storm/topology/BoltDeclarer.java   |   4 +
 .../backtype/storm/topology/InputDeclarer.java  | 128 +++++++++++++++++++
 2 files changed, 132 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/288cc322/storm-core/src/jvm/backtype/storm/topology/BoltDeclarer.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/topology/BoltDeclarer.java b/storm-core/src/jvm/backtype/storm/topology/BoltDeclarer.java
index ff2ec2d..0c4b200 100644
--- a/storm-core/src/jvm/backtype/storm/topology/BoltDeclarer.java
+++ b/storm-core/src/jvm/backtype/storm/topology/BoltDeclarer.java
@@ -17,6 +17,10 @@
  */
 package backtype.storm.topology;
 
+/**
+ * BoltDeclarer includes grouping APIs for storm topology.
+ * @see <a href="https://storm.apache.org/documentation/Concepts.html">Concepts -Stream
groupings-</a>
+ */
 public interface BoltDeclarer extends InputDeclarer<BoltDeclarer>, ComponentConfigurationDeclarer<BoltDeclarer>
{
     
 }

http://git-wip-us.apache.org/repos/asf/storm/blob/288cc322/storm-core/src/jvm/backtype/storm/topology/InputDeclarer.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/topology/InputDeclarer.java b/storm-core/src/jvm/backtype/storm/topology/InputDeclarer.java
index ac0848f..ae93c44 100644
--- a/storm-core/src/jvm/backtype/storm/topology/InputDeclarer.java
+++ b/storm-core/src/jvm/backtype/storm/topology/InputDeclarer.java
@@ -24,31 +24,159 @@ import backtype.storm.tuple.Fields;
 
 
 public interface InputDeclarer<T extends InputDeclarer> {
+    /**
+     * The stream is partitioned by the fields specified in the grouping.
+     * @param componentId
+     * @param fields
+     * @return
+     */
     public T fieldsGrouping(String componentId, Fields fields);
+
+    /**
+     * The stream is partitioned by the fields specified in the grouping.
+     * @param componentId
+     * @param streamId
+     * @param fields
+     * @return
+     */
     public T fieldsGrouping(String componentId, String streamId, Fields fields);
 
+    /**
+     * The entire stream goes to a single one of the bolt's tasks.
+     * Specifically, it goes to the task with the lowest id.
+     * @param componentId
+     * @return
+     */
     public T globalGrouping(String componentId);
+
+    /**
+     * The entire stream goes to a single one of the bolt's tasks.
+     * Specifically, it goes to the task with the lowest id.
+     * @param componentId
+     * @param streamId
+     * @return
+     */
     public T globalGrouping(String componentId, String streamId);
 
+    /**
+     * Tuples are randomly distributed across the bolt's tasks in a way such that
+     * each bolt is guaranteed to get an equal number of tuples.
+     * @param componentId
+     * @return
+     */
     public T shuffleGrouping(String componentId);
+
+    /**
+     * Tuples are randomly distributed across the bolt's tasks in a way such that
+     * each bolt is guaranteed to get an equal number of tuples.
+     * @param componentId
+     * @param streamId
+     * @return
+     */
     public T shuffleGrouping(String componentId, String streamId);
 
+    /**
+     * If the target bolt has one or more tasks in the same worker process,
+     * tuples will be shuffled to just those in-process tasks.
+     * Otherwise, this acts like a normal shuffle grouping.
+     * @param componentId
+     * @return
+     */
     public T localOrShuffleGrouping(String componentId);
+
+    /**
+     * If the target bolt has one or more tasks in the same worker process,
+     * tuples will be shuffled to just those in-process tasks.
+     * Otherwise, this acts like a normal shuffle grouping.
+     * @param componentId
+     * @param streamId
+     * @return
+     */
     public T localOrShuffleGrouping(String componentId, String streamId);
 
+    /**
+     * This grouping specifies that you don't care how the stream is grouped.
+     * @param componentId
+     * @return
+     */
     public T noneGrouping(String componentId);
+
+    /**
+     * This grouping specifies that you don't care how the stream is grouped.
+     * @param componentId
+     * @param streamId
+     * @return
+     */
     public T noneGrouping(String componentId, String streamId);
 
+    /**
+     * The stream is replicated across all the bolt's tasks. Use this grouping with care.
+     * @param componentId
+     * @return
+     */
     public T allGrouping(String componentId);
+
+    /**
+     * The stream is replicated across all the bolt's tasks. Use this grouping with care.
+     * @param componentId
+     * @param streamId
+     * @return
+     */
     public T allGrouping(String componentId, String streamId);
 
+    /**
+     * A stream grouped this way means that the producer of the tuple decides
+     * which task of the consumer will receive this tuple.
+     * @param componentId
+     * @return
+     */
     public T directGrouping(String componentId);
+
+    /**
+     * A stream grouped this way means that the producer of the tuple decides
+     * which task of the consumer will receive this tuple.
+     * @param componentId
+     * @param streamId
+     * @return
+     */
     public T directGrouping(String componentId, String streamId);
 
+    /**
+     * Tuples are passed to two hashing functions and each target task is
+     * decided based on the comparison of the state of candidate nodes.
+     * @see   https://melmeric.files.wordpress.com/2014/11/the-power-of-both-choices-practical-load-balancing-for-distributed-stream-processing-engines.pdf
+     * @param componentId
+     * @param fields
+     * @return
+     */
     public T partialKeyGrouping(String componentId, Fields fields);
+
+    /**
+     * Tuples are passed to two hashing functions and each target task is
+     * decided based on the comparison of the state of candidate nodes.
+     * @see   https://melmeric.files.wordpress.com/2014/11/the-power-of-both-choices-practical-load-balancing-for-distributed-stream-processing-engines.pdf
+     * @param componentId
+     * @param streamId
+     * @param fields
+     * @return
+     */
     public T partialKeyGrouping(String componentId, String streamId, Fields fields);
 
+    /**
+     * A custom stream grouping by implementing the CustomStreamGrouping interface.
+     * @param componentId
+     * @param grouping
+     * @return
+     */
     public T customGrouping(String componentId, CustomStreamGrouping grouping);
+
+    /**
+     * A custom stream grouping by implementing the CustomStreamGrouping interface.
+     * @param componentId
+     * @param streamId
+     * @param grouping
+     * @return
+     */
     public T customGrouping(String componentId, String streamId, CustomStreamGrouping grouping);
     
     public T grouping(GlobalStreamId id, Grouping grouping);


Mime
View raw message