You are viewing a plain text version of this content. The canonical link for it is here.
Posted to s4-commits@incubator.apache.org by ki...@apache.org on 2012/12/20 19:06:49 UTC

[15/19] git commit: Update README.md

Update README.md

Project: http://git-wip-us.apache.org/repos/asf/incubator-s4/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s4/commit/337baca0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s4/tree/337baca0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s4/diff/337baca0

Branch: refs/heads/S4-110
Commit: 337baca0f2916d4c8b71729cbe8f820053905f25
Parents: 62cdd2a
Author: Kishore Gopalakrishna <g....@gmail.com>
Authored: Mon Nov 26 17:12:51 2012 -0800
Committer: Kishore Gopalakrishna <g....@gmail.com>
Committed: Mon Nov 26 17:12:51 2012 -0800

----------------------------------------------------------------------
 README.md |   74 ++++++++++++++++++++++---------------------------------
 1 files changed, 30 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/337baca0/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 8202e07..5f133b9 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@ Integration with Helix
 Goal is to provide better partition management, fault tolerance and automatic rebalancing during cluster expansion.
 
 Currently S4 has the limitation that the number of partitions is always dependent on the number of nodes. In other words 
-   * If the stream is already partitioned upstream and if the processing has to be done in S4 but only 5 nodes are sufficient, the stream needs to be re-partitioned which results in additional hop.
+   * If the stream is already partitioned upstream or in a pub-sub system but number of nodes in s4 cluster is different, then the stream needs to be re-partitioned which results in additional hop. In cases where multiple streams that are already partitioned needs to be joined in S4, it requires re-hashing both the streams.
    * When the system needs to scale, adding new nodes mean the number of partitions change. This results in lot of data shuffling and possibly losing all the state that is stored.
    * Also the fault tolerance is achieved by having stand alone nodes that remain idle and become active when a node fails. This results in inefficient use of hardware resources.
    
@@ -16,64 +16,50 @@ Integrating with Apache Helix, allows one to partition the task processing diffe
 
 This is still in prototype mode.
 
-To try it, 
+Instruction
+-----------
 
-# This will install the helix jars into local repo
-   git clone git://github.com/apache/incubator-helix.git
-   ./build or mvn clean install -Dmaven.test.exec.skip=true
-
-# Checkout the integration with Helix code
-   git clone git://github.com/kishoreg/incubator-s4.git
-
-The following things can be directly run from eclipse.
- 
-#Create the cluster, -nbTasks is just the number of nodes.
-# This will create two nodes localhost_12000 and localhost_12001
-   DefineCluster -c=cluster1 -nbTasks=2 -flp=12000
-
-#Create a stream(names) consumer/processor task. Id can be anything but should be unique, for now both needs to be the same,
-#p is the number of partitions, so in this case it distributes 4 partitions among two nodes. -r is the number of replica/standby needed for each partition. 
-
-   CreateTask  -zk localhost:2181 -c cluster1 -id names -t consumer -p 4 -r 1 -s names
-
-# Deploy the name by providing the s4r. See the s4 walk through instruction on how to generate this s4r.
-   DeployApp -c cluster1 -s4r <incubator-s4>/myApp/build/libs/myApp.s4r -appName HelloApp -zk localhost:2181
-
-# Start the s4 node, note we now need to specify the node id while starting. This gives predictability in which nodes owns the task. After starting this node, you will see that since this is the only node up, it will own all the 4 partitions.
-   Main -c=cluster1 -zk=localhost:2181 -id=localhost_12000
+This will install the helix jars into local repo
    
-#Send some events to cluster1. This sends events to the localhost_12000
-  GenericEventAdapter 
-
-# Now start another node. Helix automatically detects the new node and assigns 2 out of 4 partitions to the new node. There is a hand off that happens during this part where localhost_12000 can save its state to a common location and localhost_12001 can restore from that state before it accepts new events. This state transfer is not implemented yet.
-   Main -c=cluster1 -zk=localhost:2181 -id=localhost_12001
-
-You will see that 50% of the events now go new node localhost_12001
-
-
-TODO: Add new node.
-
-
-
-
-
-
-
-
-
+    git clone git://github.com/apache/incubator-helix.git
+    ./build or mvn clean install -Dmaven.test.exec.skip=true
 
+Checkout the S4 integration with Helix code    
+    
+    git clone git://github.com/kishoreg/incubator-s4.git
+    
+Setup eclipse, sorry command line tools will be fixed soon.
 
+    ./gradlew eclipse
 
+The following can be directly run from eclipse. 
+ 
+Create the cluster, -nbTasks is just the number of nodes.This will create two nodes localhost_12000 and localhost_120
+01
 
+    DefineCluster -c=cluster1 -nbTasks=2 -flp=12000
 
+Create a task that processes events from stream(names). -id can be anything but should be unique, for now id and stream name needs to be the same. p is the number of partitions, so in this case it distributes 4 partitions among two nodes. -r is the number of replica/standby needed for each partition. Note that, when a node fails its load would be distributed among remaining nodes. So even though theoretically its possible to have number of standby's as the number of nodes, the performance would be horrible. In general this can be decided based on the head room available in the cluster.
 
+    CreateTask  -zk localhost:2181 -c cluster1 -id names -t consumer -p 4 -r 1 -s names
 
+Deploy the App by providing the s4r. See [s4 walk through](https://cwiki.apache.org/confluence/display/S4/S4+piper+walkthrough) instruction on how to generate this s4r. Once can optionally provide the list of nodes where this App has to be deployed.
 
+    DeployApp -c cluster1 -s4r <incubator-s4>/myApp/build/libs/myApp.s4r -appName HelloApp -zk localhost:2181
 
+Start the s4 node, note we now need to specify the node id while starting. This gives predictability in the sense which nodes owns the task. After starting this node, you will see that since this is the only node up, it will own all the 4 partitions of the stream.
 
+    Main -c=cluster1 -zk=localhost:2181 -id=localhost_12000
+   
+Send some events to names stream. All events go to the localhost_12000 since other node is down.
 
+    GenericEventAdapter
 
+Now start another node. Helix automatically detects the new node and assigns 2 out of 4 partitions to the new node. There is a hand off that happens during this part where localhost_12000 can save its state to a common location and localhost_12001 can restore from that state before it accepts new events. This state transfer is not implemented yet.
+   
+    Main -c=cluster1 -zk=localhost:2181 -id=localhost_12001
 
+You will see that 50% of the events now go to new node localhost_12001
 
 
 Overview