You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apex.apache.org by th...@apache.org on 2016/03/03 00:33:04 UTC

[35/50] incubator-apex-core git commit: Update operator_development.md

Update operator_development.md


Project: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/commit/3422459b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/tree/3422459b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/diff/3422459b

Branch: refs/heads/APEXCORE-293
Commit: 3422459b9222d2e7faae9d652f528644125750e5
Parents: eab9a71
Author: trusli <te...@yahoo.com>
Authored: Tue Nov 10 11:10:50 2015 -0800
Committer: Thomas Weise <th...@datatorrent.com>
Committed: Sun Feb 28 22:46:39 2016 -0800

----------------------------------------------------------------------
 operator_development.md | 38 +++++++++++++++++---------------------
 1 file changed, 17 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/3422459b/operator_development.md
----------------------------------------------------------------------
diff --git a/operator_development.md b/operator_development.md
index bc5c456..f502725 100644
--- a/operator_development.md
+++ b/operator_development.md
@@ -62,11 +62,10 @@ Types of Operators
 ------------------
 
 An operator works on one tuple at a time. These tuples may be supplied
-by some other operator in the application or by some external source,
-like a database or a message bus. Similarly, after the tuples are
-processed, these may be passed on to some other operator, or may be
-stored into some external system. Based on the functions that the
-Operator performs, we have the following types of operators:
+by other operators in the application or by external sources,
+such as a database or a message bus. Similarly, after the tuples are
+processed, these may be passed on to other operators, or stored into an external system. 
+Therea are 3 type of operators based on function: 
 
 1.  **Input Adapter** - This is one of the starting points in
     the application DAG and is responsible for getting tuples from an
@@ -84,7 +83,7 @@ Operator performs, we have the following types of operators:
 Note: There can be multiple operators of all types in an application
 DAG.
 
-Positioning of Operators in the DAG
+Operators Position in a DAG
 -----------------------------------
 
 We may refer to operators depending on their position with respect to
@@ -104,7 +103,7 @@ Ports
 
 Operators in a DAG are connected together via directed flows
 called streams. Each stream has end-points located on the operators
-called ports. Therea are two types of ports.
+called ports. Therea are 2 types of ports.
 
 1.  **Input Port** - This is a port through which an operator accepts input
     tuples from an upstream operator.
@@ -127,7 +126,7 @@ How Operator Works
 ----------------------
 
 An operator passes through various stages during its lifetime. Each
-stage is an API call that the streaming application master makes for an
+stage is an API call that the Streaming Application Master makes for an
 operator.  The following figure illustrates the stages through which an
 operator passes.
 
@@ -162,8 +161,8 @@ About this tutorial
 -------------------
 
 This tutorial will guide the user towards developing a operator from
-scratch. It will include all aspects of writing an operator including
-design, code as well as unit tests.
+scratch. It includes all aspects of writing an operator including
+design, code and unit testing.
 
 Introduction
 ------------
@@ -306,7 +305,7 @@ following method calls:
 -  endWindow()
 -  tearDown()
 
-In order to simplify the creation of an operator, the Apache Apex
+In order to simplify the creation of an operator, Apache Apex
 library also provides a base class “BaseOperator” which has empty
 implementations for these methods. Please refer to the [Apex Operators](#apex_operators) section and the
 [Reference](#operator_reference) section for details on these.
@@ -338,7 +337,7 @@ private transient String[] stopWords;
 ```
 -   _globalCounts_ - A Map which stores the counts of all the words
     encountered so far. Note that this variable is non transient, which
-    means that this variable is saved as part of the check point and can be recovered in event of a crash.
+    means that this variable is saved as part of the checkpoint and can be recovered in event of a crash.
 ``` java
 private Map<String, Long> globalCounts;
 ```
@@ -379,9 +378,7 @@ DefaultOutputPort<Entry<String,Long>>();
 
 The constructor is the place where we initialize the non-transient data
 structures, since
-constructor is called just once per activation of an operator. In case
-of Word Count operator, we initialize the globalCounts variable in the
-constructor.
+constructor is called just once per activation of an operator. With regards to Word Count operator, we initialize the globalCounts variable in the constructor.
 ``` java
 globalCounts = Maps.newHashMap();
 ```
@@ -402,10 +399,9 @@ The following tasks are executed as part of the setup call:
 
 ### Begin Window call
 
-The begin window call signals the start of an application window. In
-case of Word Count Operator, if the sendPerTuple is set to false, it
-means that we are expecting updated counts for the most recent window of
-data. Hence, we clear the updatedCounts variable in the begin window
+The begin window call signals the start of an application window. With 
+regards to Word Count Operator, we are expecting updated counts for the most recent window of
+data if the sendPerTuple is set to false. Hence, we clear the updatedCounts variable in the begin window
 call and start accumulating the counts till the end window call.
 
 ### Process Tuple call
@@ -422,14 +418,14 @@ processTuple.
 
 ### End Window call
 
-This call signals the end of an application window. In case of Word
+This call signals the end of an application window. With regards to Word
 Count Operator, we emit the updatedCounts to the output port if the
 sendPerTuple flag is set to false.
 
 ### Teardown call
 
 This method allows the operator to gracefully shut down itself after
-releasing the resources that it has acquired. In case of our operator,
+releasing the resources that it has acquired. With regards to our operator,
 we call the shutDown method which shuts down the operator along with any
 downstream operators.