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 mm...@apache.org on 2013/06/01 11:32:51 UTC

[01/50] [abbrv] git commit: Merge branch 'S4-86' into dev

Updated Branches:
  refs/heads/master 53e0d34fb -> 2f474503e


Merge branch 'S4-86' into dev


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

Branch: refs/heads/master
Commit: 457844d283b722da69ae23d22162afcae2a6bc84
Parents: 755ed6b d6b89c3
Author: Daniel Gómez Ferro <dg...@gmail.com>
Authored: Tue Mar 5 11:34:43 2013 +0100
Committer: Daniel Gómez Ferro <dg...@gmail.com>
Committed: Tue Mar 5 11:34:43 2013 +0100

----------------------------------------------------------------------
 .gitignore                                         |    1 -
 .../src/main/java/org/apache/s4/core/App.java      |   12 +-
 .../java/org/apache/s4/core/ProcessingElement.java |   18 ++-
 .../java/org/apache/s4/core/util/S4Metrics.java    |   43 +++++
 website/Rules                                      |    3 +
 website/compass/config.rb                          |    1 +
 website/content/doc/0.6.0/event_dispatch.md        |  123 +++++++++++---
 website/content/doc/0.6.0/fault_tolerance.md       |   24 ++-
 website/content/doc/0.6.0/overview.md              |   32 ++--
 website/content/doc/0.6.0/walkthrough.md           |  130 +++++++++------
 website/content/images/doc/0.6.0/executors.png     |  Bin 0 -> 58130 bytes
 .../content/images/doc/0.6.0/sources/executors.odg |  Bin 0 -> 11631 bytes
 .../content/images/doc/0.6.0/sources/queues.odg    |  Bin 0 -> 10686 bytes
 website/content/style/coderay.scss                 |  119 +++++++++++++
 website/content/style/partials/_base.scss          |    1 +
 website/content/style/pygmentize.scss              |   76 +++++++++
 website/content/style/style.scss                   |    5 +-
 website/layouts/default.haml                       |    2 +
 18 files changed, 468 insertions(+), 122 deletions(-)
----------------------------------------------------------------------



[15/50] [abbrv] git commit: S4-66 Check that appClass extends App

Posted by mm...@apache.org.
S4-66 Check that appClass extends App

Patch by Aimee Cheng


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

Branch: refs/heads/master
Commit: dd1da04c7f52eb0181c5af804a3defe7b4a7400d
Parents: 60a75a0
Author: Daniel Gómez Ferro <df...@apache.org>
Authored: Thu Mar 7 17:24:21 2013 +0100
Committer: Daniel Gómez Ferro <df...@apache.org>
Committed: Thu Mar 7 18:19:56 2013 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/s4/tools/Deploy.java  |    2 +-
 .../src/main/resources/templates/build.gradle      |   46 +++++++-------
 2 files changed, 24 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/dd1da04c/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
index 9f9310c..1070e1c 100644
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
@@ -79,7 +79,7 @@ public class Deploy extends S4ArgsBase {
                     // it and won't use an S4R
                     logger.info("No S4R path specified, nor build file specified: this assumes the app is in the classpath");
                 } else {
-                    logger.error("You must specify an S4R file, a build file to create an S4R from, or an appClass that will be in the classpath");
+                    logger.error("You must specify an S4R file or an appClass that will be in the classpath");
                     System.exit(1);
                 }
 

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/dd1da04c/subprojects/s4-tools/src/main/resources/templates/build.gradle
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/resources/templates/build.gradle b/subprojects/s4-tools/src/main/resources/templates/build.gradle
index 3a59f05..2651642 100644
--- a/subprojects/s4-tools/src/main/resources/templates/build.gradle
+++ b/subprojects/s4-tools/src/main/resources/templates/build.gradle
@@ -58,8 +58,8 @@ project.ext["libraries"] = [
 
             // you always need the s4 libraries for building your app
            s4_base:            'org.apache.s4:s4-base:'+ s4Version,
-           s4_comm:            'org.apache.s4:s4-comm:'+s4Version,
-           s4_core:            'org.apache.s4:s4-core:'+s4Version
+           s4_comm:            'org.apache.s4:s4-comm:'+ s4Version,
+           s4_core:            'org.apache.s4:s4-core:'+ s4Version
        ]
 
 
@@ -122,6 +122,7 @@ s4r << {
    appDependencies.each { File file -> println 'Adding to s4 archive: ' + file.name }
    configurations.archives.allArtifacts.files.each { println 'Adding to s4 archive: ' + it.name }
 
+   checkAppClass()
 }
 
 task cp << {
@@ -136,27 +137,26 @@ task installS4R (type: Copy) {
    into s4AppInstallDir
 }
 
-/* Parse source file to get the app classname so we can use it in the manifest.
-* TODO: Use a real Java parser. (This is not skipping comments for example.)
-*/
-def getAppClassname(file) {
-   def classname = "UNKNOWN"
-   def lines= file.readLines()
-   def packageName = ""
-   for(line in lines) {
-
-       def pn = line =~ /.*package\s+([\w\.]+)\s*;.*/
-       if(pn) {
-           packageName = pn[0][1] + "."
-       }
-       def an = line =~ /.*public\s+class\s+(\w+)\s+extends.+App.*\{/
-
-       if (an) {
-           classname = packageName + an[0][1]
-           println "Found app class name: " + classname
-           break
-       }
+/*Check whether the defined appClass exists and extends App*/
+void checkAppClass() {
 
+   def loader = this.getClass().getClassLoader()
+
+   def jardir = new File( project.libsDir.path,'lib' )
+   def jars = jardir.listFiles().findAll { it.name.endsWith('.jar') }
+   jars.each {
+      loader.addURL(it.toURI().toURL())
    }
-   classname
+
+   def appJar = project.libsDir.path+"/app/"+"$project.name"+".jar"
+   loader.addURL(new URL("file://"+appJar))
+
+   def instance = Class.forName(appClassName, true, this.getClass().getClassLoader()).newInstance()
+
+   if (!(instance.getClass().getSuperclass().getName() == 'org.apache.s4.core.App') ){
+      println "App class " + appClassName + " does not extend org.apache.s4.core.App!"
+      System.exit(1)
+   }
+
 }
+


[46/50] [abbrv] git commit: Merge branch 'S4-130' into dev

Posted by mm...@apache.org.
Merge branch 'S4-130' into dev


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

Branch: refs/heads/master
Commit: 036d7185d67ab53d133188cf10fc8e0ff3eb85f6
Parents: 039c11f 394622b
Author: Daniel Gómez Ferro <df...@apache.org>
Authored: Fri Mar 15 18:22:38 2013 +0100
Committer: Daniel Gómez Ferro <df...@apache.org>
Committed: Fri Mar 15 18:22:38 2013 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/s4/core/S4Node.java   |   21 ++++-
 .../java/org/apache/s4/core/util/ParsingUtils.java |   66 +++++++++++++++
 .../java/org/apache/s4/core/util/S4Metrics.java    |    8 +-
 subprojects/s4-edsl/src/main/diezel/s4/s4-impl.xml |   16 ++++
 subprojects/s4-edsl/src/main/diezel/s4/s4.xml      |   16 ++++
 .../src/main/java/org/apache/s4/tools/Deploy.java  |   42 +--------
 test-apps/twitter-adapter/build.gradle             |    2 -
 website/content/doc/0.6.0/metrics.md               |   10 ++-
 .../content/doc/0.6.0/twitter_trending_example.md  |   10 +--
 9 files changed, 135 insertions(+), 56 deletions(-)
----------------------------------------------------------------------



[05/50] [abbrv] git commit: Set correct ClassLoader for app initialization

Posted by mm...@apache.org.
Set correct ClassLoader for app initialization


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

Branch: refs/heads/master
Commit: f86f31b4e5f430131785e844fc13fcbf878333a9
Parents: 4429bef
Author: Daniel Gómez Ferro <df...@apache.org>
Authored: Tue Mar 5 16:23:53 2013 +0100
Committer: Daniel Gómez Ferro <df...@apache.org>
Committed: Tue Mar 5 16:23:53 2013 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/s4/core/S4Bootstrap.java  |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/f86f31b4/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Bootstrap.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Bootstrap.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Bootstrap.java
index 01e241f..757ce4f 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Bootstrap.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Bootstrap.java
@@ -130,6 +130,10 @@ public class S4Bootstrap {
     private void startS4App(AppConfig appConfig, Injector parentInjector, ClassLoader modulesLoader) {
         try {
             App app = loadApp(appConfig, modulesLoader);
+
+            // use correct classLoader for running the app initialization
+            Thread.currentThread().setContextClassLoader(app.getClass().getClassLoader());
+
             app.init();
             app.start();
 


[42/50] [abbrv] git commit: Update doc: twitter, minor fixes, RC announce

Posted by mm...@apache.org.
Update doc: twitter, minor fixes, RC announce


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

Branch: refs/heads/master
Commit: ff6f7e28eda821ba84e8333022d9252da96d0934
Parents: 0638a2a
Author: Daniel Gómez Ferro <df...@apache.org>
Authored: Thu Mar 14 12:11:45 2013 +0100
Committer: Daniel Gómez Ferro <df...@apache.org>
Committed: Thu Mar 14 12:11:45 2013 +0100

----------------------------------------------------------------------
 website/content/doc/0.6.0/overview.md              |    2 +-
 .../content/doc/0.6.0/twitter_trending_example.md  |   24 ++++++++++-----
 website/content/index.haml                         |    3 ++
 3 files changed, 20 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/ff6f7e28/website/content/doc/0.6.0/overview.md
----------------------------------------------------------------------
diff --git a/website/content/doc/0.6.0/overview.md b/website/content/doc/0.6.0/overview.md
index b4d6840..76e70e2 100644
--- a/website/content/doc/0.6.0/overview.md
+++ b/website/content/doc/0.6.0/overview.md
@@ -65,7 +65,7 @@ S4 0.6 builds on this basis and brings plenty of exciting features, in particula
 	* by default, the size of the cluster is fixed
 	* the size of an S4 cluster corresponds to the number of logical **partitions** (sometimes referred to as **tasks**)
 	
-> an ongoing integration with [Apache Helix](http://helix.apache.org) will these limitations and allows a variable number of nodes and a rebalancing of partitions
+> an ongoing integration with [Apache Helix](http://helix.apache.org) will remove these limitations and allow a variable number of nodes and rebalancing the partitions
 
 **Applications**
 

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/ff6f7e28/website/content/doc/0.6.0/twitter_trending_example.md
----------------------------------------------------------------------
diff --git a/website/content/doc/0.6.0/twitter_trending_example.md b/website/content/doc/0.6.0/twitter_trending_example.md
index a870f68..0787d89 100644
--- a/website/content/doc/0.6.0/twitter_trending_example.md
+++ b/website/content/doc/0.6.0/twitter_trending_example.md
@@ -27,9 +27,9 @@ Have a look at the code in these directories. You'll note that:
 	user=<a twitter username>
 	password=<matching password>
 
-* Start a Zookeeper instance. From the S4 base directory, do:
+* Start a Zookeeper clean instance. From the S4 base directory, do:
 	
-		./s4 zkServer
+		./s4 zkServer -clean
 
 * Define 2 clusters : 1 for deploying the twitter-counter app, and 1 for the adapter app
 
@@ -42,15 +42,17 @@ Have a look at the code in these directories. You'll note that:
 
 * Start 1 node for the adapter app:
 
-		./s4 node -c=cluster2 -p=s4.adapter.output.stream=RawStatus
+		./s4 node -c=cluster2
 		
-* Deploy twitter-counter app (you may also first build the s4r then publish it, as described in the previous section)
+* Build and deploy twitter-counter app
 
-		./s4 deploy -appName=twitter-counter -c=cluster1 -b=`pwd`/test-apps/twitter-counter/build.gradle
+		./s4 s4r -b=`pwd`/test-apps/twitter-counter/build.gradle -appClass=org.apache.s4.example.twitter.TwitterCounterApp twitter-counter
+		./s4 deploy -appName=twitter-counter -c=cluster1 -s4r=`pwd`/test-apps/twitter-counter/build/libs/twitter-counter.s4r
 		
-* Deploy twitter-adapter app. In this example, we don't directly specify the app class of the adapter, we use the deployment approach for apps (remember, the adapter is also an app).
+* Build and deploy twitter-adapter app. In this example, we don't directly specify the app class of the adapter, we use the deployment approach for apps (remember, the adapter is also an app). Notice that the twitter-adapter package also has a different naming scheme. [^1]
 
-		./s4 deploy -appName=twitter-adapter -c=cluster2 -b=`pwd`/test-apps/twitter-adapter/build.gradle
+		./s4 s4r -b=`pwd`/test-apps/twitter-adapter/build.gradle -appClass=org.apache.s4.example.twitter.TwitterInputAdapter twitter-adapter
+		./s4 deploy -appName=twitter-adapter -c=cluster2 -s4r=`pwd`/test-apps/twitter-adapter/build/libs/twitter-adapter-0.0.0-SNAPSHOT.s4r -p=s4.adapter.output.stream=RawStatus
 		
 * Observe the current 10 most popular topics in file TopNTopics.txt. The file gets updated at regular intervals, and only outputs topics with a minimum of 10 occurrences, so you may have to wait a little before the file is updated :
 
@@ -74,4 +76,10 @@ You may also customize the communication and the core layers of S4 by tweaking c
 
 Last, the [javadoc](http://people.apache.org/~mmorel/apache-s4-0.6.0-incubating-doc/javadoc/) will help you when writing applications.
 
-We hope this will help you start rapidly, and remember: we're happy to help!
\ No newline at end of file
+We hope this will help you start rapidly, and remember: we're happy to help!
+
+----
+
+###Footnotes
+
+[^1]: Modifying the `build.gradle` script you can change several aspects of the build process. By default the name of the `s4r` package is the application name provided in the packaging step, but you can attach the version automatically as in this example.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/ff6f7e28/website/content/index.haml
----------------------------------------------------------------------
diff --git a/website/content/index.haml b/website/content/index.haml
index 3962218..5318e4b 100644
--- a/website/content/index.haml
+++ b/website/content/index.haml
@@ -5,6 +5,9 @@ title: Distributed Stream Computing Platform
   #about{:class=>"span-18 last"}
 
     #notice{:class=>"span-17 last"}
+      #notice_text= "March 2013: <b>S4 0.6.0 Release Candidate</b> <a href='http://people.apache.org/~mmorel/s4-0.6.0-incubating-release-candidate-2/'>available for download</a>. Check the <a href='/doc/0.6.0'>improved documentation</a>!."
+
+    #notice{:class=>"span-17 last"}
       #notice_text= "August 2012: <b>S4 0.5.0 has been released!</b> Get it <a href='/download'>here</a>!."
     
     #notice{:class=>"span-17 last"}


[17/50] [abbrv] git commit: S4-127 fix parsing issue in Status tool

Posted by mm...@apache.org.
S4-127 fix parsing issue in Status tool


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

Branch: refs/heads/master
Commit: a5aacb19ff7000391f65b6c44248c218e8c13f64
Parents: eb20b95
Author: Matthieu Morel <mm...@apache.org>
Authored: Fri Mar 8 20:49:06 2013 +0100
Committer: Matthieu Morel <mm...@apache.org>
Committed: Fri Mar 8 20:49:06 2013 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/s4/tools/Status.java  |    4 +-
 .../test/java/org/apache/s4/tools/TestStatus.java  |   19 +++++++++++++++
 2 files changed, 21 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/a5aacb19/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Status.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Status.java b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Status.java
index 11fe2cd..63fd077 100644
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Status.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Status.java
@@ -204,12 +204,12 @@ public class Status extends S4ArgsBase {
 
     }
 
-    private static String inMiddle(String content, int width) {
+    static String inMiddle(String content, int width) {
         if (content == null) {
             content = "UNDEFINED";
         }
         int i = (width - content.length()) / 2;
-        return String.format("%" + i + "s%s", " ", content);
+        return String.format("%" + (i == 0 ? "" : (i + "s")) + "%s", " ", content);
     }
 
     private static String generateEdge(int length) {

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/a5aacb19/subprojects/s4-tools/src/test/java/org/apache/s4/tools/TestStatus.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/test/java/org/apache/s4/tools/TestStatus.java b/subprojects/s4-tools/src/test/java/org/apache/s4/tools/TestStatus.java
new file mode 100644
index 0000000..7c7bae9
--- /dev/null
+++ b/subprojects/s4-tools/src/test/java/org/apache/s4/tools/TestStatus.java
@@ -0,0 +1,19 @@
+package org.apache.s4.tools;
+
+import junit.framework.Assert;
+
+import org.junit.Test;
+
+import com.google.common.base.Strings;
+
+public class TestStatus {
+
+    @Test
+    public void testStringFormatting() {
+
+        Status.inMiddle(Strings.repeat("A", 20), 20);
+        Assert.assertTrue("Failed to parse correctly", true);
+
+    }
+
+}


[27/50] [abbrv] git commit: Documentation updates from S4-124 branch

Posted by mm...@apache.org.
Documentation updates from S4-124 branch


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

Branch: refs/heads/master
Commit: 4d08d3879c5db124447f52eb6795dd44c9a6fde6
Parents: d0350a6 bad1e51
Author: Matthieu Morel <mm...@apache.org>
Authored: Sun Mar 10 16:30:51 2013 +0100
Committer: Matthieu Morel <mm...@apache.org>
Committed: Sun Mar 10 16:30:51 2013 +0100

----------------------------------------------------------------------
 README.md                                          |    3 +-
 website/README.markdown                            |   12 +-
 website/Rules                                      |   17 +-
 website/config.yaml                                |    2 +-
 website/content/doc/0.6.0/configuration.md         |   60 +++---
 website/content/doc/0.6.0/dev_tips.md              |   23 ++-
 website/content/doc/0.6.0/event_dispatch.md        |   11 +-
 website/content/doc/0.6.0/event_injection.md       |   37 ++++
 website/content/doc/0.6.0/index.md                 |   23 ++-
 website/content/doc/0.6.0/metrics.md               |   41 ++++
 website/content/doc/0.6.0/overview.md              |   36 ++---
 website/content/doc/0.6.0/recommended_practices.md |   11 +
 website/content/doc/0.6.0/tools.md                 |   47 +++++
 .../content/doc/0.6.0/twitter_trending_example.md  |   77 ++++++++
 website/content/doc/0.6.0/walkthrough.md           |  146 ++++-----------
 website/content/style/pygmentize.scss              |   13 +-
 website/content/style/style.scss                   |    6 +-
 17 files changed, 365 insertions(+), 200 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/4d08d387/README.md
----------------------------------------------------------------------
diff --cc README.md
index 79db2e4,2d6b3ef..8bf991b
--- a/README.md
+++ b/README.md
@@@ -3,19 -3,29 +3,18 @@@ Apache S
  
  Overview
  --------
 -S4 is a general-purpose, distributed, scalable, partially fault-tolerant, pluggable 
 -platform that allows programmers to easily develop applications for processing continuous 
 -unbounded streams of data.
 +S4 is a general-purpose,near real-time, distributed, decentralized, scalable, 
 +event-driven, modular platform that allows programmers to easily implement applications 
 +for processing continuous unbounded streams of data.
  
 -S4 0.5.0 is a complete refactoring of the previous version of S4. It grounds on the same 
 -concepts (partitioning inspired by map-reduce, actors-like distribution model), 
 -but with the following objectives:
 +S4 0.5 focused on providing a functional complete refactoring.
  
- S4 0.6 builds on this basis and brings plenty of exciting features, in particular:
 -- cleaner and simpler API
 -- robust configuration through statically defined modules
 -- cleaner architecture
 -- robust codebase
 -- easier to develop S4 apps, to test, and to use the platform
++S4 0.6 builds on this basis and brings several major improvements, in particular:
  
 -We added the following core features:
 -
 -- TCP-based communications
 -- state recovery through a flexible checkpointing mechanism
 -- inter-cluster/app communications through a pub-sub model
 -- dynamic application deployment
 -- toolset for easily starting S4 nodes, testing, packaging, deploying and monitoring S4 apps 
 +- major performance improvements: stream throughput improved (measured up to ~200k messages per second and per stream)
 +- major configurability improvements, for both the S4 platform and deployed applications
  
  
- 
  Documentation
  -------------
  

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/4d08d387/website/content/doc/0.6.0/event_dispatch.md
----------------------------------------------------------------------
diff --cc website/content/doc/0.6.0/event_dispatch.md
index 7c12086,7dd9492..4c1e0fe
--- a/website/content/doc/0.6.0/event_dispatch.md
+++ b/website/content/doc/0.6.0/event_dispatch.md
@@@ -18,7 -20,7 +20,6 @@@ A stream can be defined with a KeyFinde
  ~~~
  
  #!java
--
  Stream<TopicEvent> topicSeenStream = createStream("TopicSeen", new KeyFinder<TopicEvent>() {
  	    @Override
  	    public List<String> get(final TopicEvent arg0) {

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/4d08d387/website/content/doc/0.6.0/overview.md
----------------------------------------------------------------------
diff --cc website/content/doc/0.6.0/overview.md
index 44eeb2e,3f44e8e..b4d6840
--- a/website/content/doc/0.6.0/overview.md
+++ b/website/content/doc/0.6.0/overview.md
@@@ -13,18 -13,19 +13,17 @@@ S4 0.5 focused on providing a functiona
  
  S4 0.6 builds on this basis and brings plenty of exciting features, in particular:
  
- * **performance improvements**: stream throughput improved by 1000 % (~200k messages / s / stream)
- * improved [configurability](S4:Configuration - 0.6.0], for both the S4 platform and deployed applications
- * **elasticity** and fine partition tuning, through an integration with Apache Helix
 -* **performance improvements**: stream throughput improved by 1000 % (200k+ messages / s / stream)
 -* improved [configurability](S4:Configuration - 0.6.0], for both the S4 platform and deployed applications
 -* **elasticity** and fine partition tuning, through an integration with Apache Helix
++* **major performance improvements**: stream throughput improved by 1000 % (200k+ messages / s / stream)
++* major [configurability](../configuration) and usability improvements, for both the S4 platform and deployed applications
  
  
  # What are the cool features?
  
  **Flexible deployment**:
  
+ * Application packages are standard jar files (suffixed `.s4r`)
++* Platform modules for customizing the platform are standard jar files
  * By default keys are homogeneously sparsed over the cluster: helps balance the load, especially for fine grained partitioning
--* S4 also provides fine control over the partitioning (with Apache Helix)
- * Features automatic rebalancing
 -* Semi-automatic Rebalancing
  
  **Modular design**:
  
@@@ -42,7 -43,7 +41,7 @@@
  	* provision, control and update subsystems independently
  
  
--**[Fault tolerant](fault_tolerance)**
++**[Fault tolerant](../fault_tolerance)**
  
  
  * **Fail-over** mechanism for high availability
@@@ -60,10 -61,12 +59,13 @@@
  **Platform**
  
  * S4 provides a runtime distributed platform that handles communication, scheduling and distribution across containers.
- * Distributed containers are called *S4 nodes*
- * S4 nodes are deployed on *S4 clusters*
- * S4 clusters define named ensembles of S4 nodes, with a fixed size
- * The size of an S4 cluster corresponds to the number of logical *partitions* (sometimes referred to as _tasks_)
+ * Distributed containers are called **S4 nodes**
+ * S4 nodes are deployed on **S4 clusters**
+ * S4 clusters define named ensembles of S4 nodes
+ 	* by default, the size of the cluster is fixed
+ 	* the size of an S4 cluster corresponds to the number of logical **partitions** (sometimes referred to as **tasks**)
 -	* an ongoing integration with [Apache Helix](http://helix.apache.org) removes these limitations and allows a variable number of nodes and a rebalancing of partitions
++	
++> an ongoing integration with [Apache Helix](http://helix.apache.org) will these limitations and allows a variable number of nodes and a rebalancing of partitions
  
  **Applications**
  
@@@ -92,11 -93,6 +92,3 @@@ The following diagram sums-up the key c
  
  ![image](/images/doc/0.6.0/S4_hierarchical_archi.png)
  
--# Where can I find more information?
--
- * [The website](http://incubator.apache.org/s4/) is a good starting point.
- * [The wiki](https://cwiki.apache.org/confluence/display/S4/) currently contains the most up-to-date information: general information (this page), configuration, examples.
- * Questions can be asked through the [mailing lists](https://cwiki.apache.org/confluence/display/S4/S4+Apache+mailing+lists)
- * The source code is available throught [git](https://git-wip-us.apache.org/repos/asf?p=incubator-s4.git], [here](http://incubator.apache.org/s4/contrib/) are instructions for fetching the code.
- * A nice set of [slides](http://www.slideshare.net/leoneu/20111104-s4-overview) was used for a presentation at Stanford in November 2011.
- * The driving ideas are detailed in a [conference publication](http://www.4lunas.org/pub/2010-s4.pdf) from KDCloud'11 (joint workshop with ICDM'11)
 -See the [resources](resources) page.

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/4d08d387/website/content/doc/0.6.0/walkthrough.md
----------------------------------------------------------------------
diff --cc website/content/doc/0.6.0/walkthrough.md
index 437f580,f3c72c1..60715ec
--- a/website/content/doc/0.6.0/walkthrough.md
+++ b/website/content/doc/0.6.0/walkthrough.md
@@@ -64,18 -64,18 +64,19 @@@ The src/main/java/hello directory conta
  
  // ProcessingElement provides integration with the S4 platform
  public class HelloPE extends ProcessingElement {
-  // you should define downstream streams here and inject them in the app definition
 +
-  // PEs can maintain some state
-  boolean seen = false;
- 
-  // This method is called upon a new Event on an incoming stream.
-  // You may overload it for handling instances of your own specialized subclasses of Event
-  public void onEvent(Event event) {
-      System.out.println("Hello " + (seen ? "again " : "") + event.get("name") + "!");
-      seen = true;
-  }
- // skipped remaining methods
+ 	// you should define downstream streams here and inject them in the app definition
+ 	
+ 	// PEs can maintain some state
+ 	boolean seen = false;
+ 	
+ 	// This method is called upon a new Event on an incoming stream.
+ 	// You may overload it for handling instances of your own specialized subclasses of Event
+ 	public void onEvent(Event event) {
+ 	    System.out.println("Hello " + (seen ? "again " : "") + event.get("name") + "!");
+ 	    seen = true;
+ 	}
 -// skipped remaining methods
++    // skipped remaining methods
  ~~~
  
  * HelloApp.java: defines a simple application: exposes an input stream ("names"), connected to the HelloPE. See [the event dispatch configuration page](event_dispatch) for more information about how events are dispatched.
@@@ -121,9 -122,9 +123,8 @@@ In order to run an S4 application, you 
  
  * In 2 steps:
  
- 	1. Start a Zookeeper server instance (-clean option removes previous ZooKeeper data, if any):
- 
+ 	1. Start a Zookeeper server instance (`-clean` option removes previous ZooKeeper data, if any):
  
 -
  	
  			S4:incubator-s4$ ./s4 zkServer - clean
  			S4:myApp$ calling referenced s4 script : /Users/S4/tmp/incubator-s4/s4
@@@ -254,75 -255,7 +255,6 @@@ The following figures illustrate the va
  ----
  
  
- # Run the Twitter trending example
--
- Let's have a look at another application, that computes trendy Twitter topics by listening to the spritzer stream from the Twitter API. This application was adapted from a previous example in S4 0.3.
- 
- ## Overview
- 
- This application is divided into:
- 
- * twitter-counter , in test-apps/twitter-counter/ : extracts topics from tweets and maintains a count of the most popular ones, periodically dumped to disk
- * twitter-adapter, in test-apps/twitter-adapter/ : listens to the feed from Twitter, converts status text into S4 events, and passes them to the "RawStatus" stream
- 
- Have a look at the code in these directories. You'll note that:
- 
- * the build.gradle file must be tailored to include new dependencies (twitter4j libs in twitter-adapter)
- * events are partitioned through various keys
- 
- ## Run it!
- 
- > Note: You need a twitter4j.properties file in your home directory with the following content (debug is optional):
- 
- 	debug=true
- 	user=<a twitter username>
- 	password=<matching password>
- 
- * Start a Zookeeper instance. From the S4 base directory, do:
- 	
- 		./s4 zkServer
- 
- * Define 2 clusters : 1 for deploying the twitter-counter app, and 1 for the adapter app
- 
- 		./s4 newCluster -c=cluster1 -nbTasks=2 -flp=12000; ./s4 newCluster -c=cluster2 -nbTasks=1 -flp=13000
- 		
- * Start 2 app nodes (you may want to start each node in a separate console) :
- 
- 		./s4 node -c=cluster1
- 		./s4 node -c=cluster1
- 
- * Start 1 node for the adapter app:
- 
- 		./s4 node -c=cluster2 -p=s4.adapter.output.stream=RawStatus
- 		
- * Deploy twitter-counter app (you may also first build the s4r then publish it, as described in the previous section)
- 
- 		./s4 deploy -appName=twitter-counter -c=cluster1 -b=`pwd`/test-apps/twitter-counter/build.gradle
- 		
- * Deploy twitter-adapter app. In this example, we don't directly specify the app class of the adapter, we use the deployment approach for apps (remember, the adapter is also an app).
- 
- 		./s4 deploy -appName=twitter-adapter -c=cluster2 -b=`pwd`/test-apps/twitter-adapter/build.gradle
- 		
- * Observe the current 10 most popular topics in file TopNTopics.txt. The file gets updated at regular intervals, and only outputs topics with a minimum of 10 occurrences, so you may have to wait a little before the file is updated :
- 
- 		tail -f TopNTopics.txt
- 		
- * You may also check the status of the S4 node with:
- 
- 		./s4 status
- 
- ----
- 
  # What next?
  
- You have now seen some basics applications, and you know how to run them, and how to get events into the system. You may now try to code your own apps with your own data.
- 
- [This page](../application_dependencies) will help for specifying your own dependencies.
- 
- There are more parameters available for the scripts (typing the name of the task will list the options). In particular, if you want distributed deployments, you'll need to pass the Zookeeper connection strings when you start the nodes.
- 
- You may also customize the communication and the core layers of S4 by tweaking configuration files and modules.
- 
- Last, the [javadoc](http://people.apache.org/~mmorel/apache-s4-0.6.0-incubating-doc/javadoc/) will help you when writing applications.
- 
- We hope this will help you start rapidly, and remember: we're happy to help!
 -We suggest you take a look at a more comprehensive [example application](../twitter_trending_example).
++We suggest you take a look at a more comprehensive [example application](../twitter_trending_example).


[36/50] [abbrv] git commit: S4-129 properly handle zk CLI option for node command

Posted by mm...@apache.org.
S4-129 properly handle zk CLI option for node command


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

Branch: refs/heads/master
Commit: 1cd3c5db9ca34fa3807df873c140e74ec7cca90f
Parents: 632057f
Author: Matthieu Morel <mm...@apache.org>
Authored: Wed Mar 13 12:15:47 2013 +0100
Committer: Matthieu Morel <mm...@apache.org>
Committed: Wed Mar 13 12:15:47 2013 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/s4/core/S4Node.java   |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1cd3c5db/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Node.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Node.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Node.java
index c5b0151..7aafe90 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Node.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Node.java
@@ -21,16 +21,18 @@ import java.io.IOException;
 import java.lang.Thread.UncaughtExceptionHandler;
 
 import org.apache.s4.core.util.ArchiveFetchException;
+import org.apache.s4.core.util.ParametersInjectionModule;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.beust.jcommander.JCommander;
 import com.beust.jcommander.Parameter;
 import com.beust.jcommander.Parameters;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.io.Resources;
 import com.google.inject.Guice;
 import com.google.inject.Injector;
-import com.google.inject.Module;
+import com.google.inject.util.Modules;
 
 /**
  * Entry point for starting an S4 node. It parses arguments and injects an {@link S4Bootstrap} based on the
@@ -66,8 +68,10 @@ public class S4Node {
             }
         });
 
-        Injector injector = Guice.createInjector(new Module[] { new BaseModule(Resources.getResource(
-                "default.s4.base.properties").openStream(), nodeArgs.clusterName) });
+        Injector injector = Guice.createInjector(Modules.override(
+                new BaseModule(Resources.getResource("default.s4.base.properties").openStream(), nodeArgs.clusterName))
+                .with(new ParametersInjectionModule(ImmutableMap.of("s4.cluster.zk_address",
+                        nodeArgs.zkConnectionString))));
         S4Bootstrap bootstrap = injector.getInstance(S4Bootstrap.class);
         try {
             bootstrap.start(injector);
@@ -90,7 +94,7 @@ public class S4Node {
         String baseConfigFilePath = null;
 
         @Parameter(names = "-zk", description = "Zookeeper connection string", required = false)
-        String zkConnectionString;
+        String zkConnectionString = "localhost:2181";
 
     }
 }


[31/50] [abbrv] git commit: In test app, make sure mavenCentral is checked first when looking for dependencies (see S4-112)

Posted by mm...@apache.org.
In test app, make sure mavenCentral is checked first when looking for dependencies
(see S4-112)


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

Branch: refs/heads/master
Commit: 97f55d197069e186e0105f6ed666eefff491c4b2
Parents: fb559d4
Author: Matthieu Morel <mm...@apache.org>
Authored: Mon Mar 11 19:51:44 2013 +0100
Committer: Matthieu Morel <mm...@apache.org>
Committed: Mon Mar 11 19:55:49 2013 +0100

----------------------------------------------------------------------
 test-apps/custom-modules/build.gradle |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/97f55d19/test-apps/custom-modules/build.gradle
----------------------------------------------------------------------
diff --git a/test-apps/custom-modules/build.gradle b/test-apps/custom-modules/build.gradle
index 7a3b098..607a7ff 100644
--- a/test-apps/custom-modules/build.gradle
+++ b/test-apps/custom-modules/build.gradle
@@ -53,8 +53,8 @@ sourceCompatibility = 1.6
 targetCompatibility = 1.6
 
     repositories {
-        mavenLocal()
         mavenCentral()
+        mavenLocal()
         maven { url 'http://google-gson.googlecode.com/svn/mavenrepo' }
         maven { url 'https://repo.springsource.org/libs-release' }
         maven { url 'http://repo.gradle.org/gradle/libs-releases-local' }


[26/50] [abbrv] git commit: Bump version number

Posted by mm...@apache.org.
Bump version number


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

Branch: refs/heads/master
Commit: d0350a6f4954fca8d9c23a0745ec5213a9f957fe
Parents: 12f7a2a
Author: Matthieu Morel <mm...@apache.org>
Authored: Sun Mar 10 16:16:09 2013 +0100
Committer: Matthieu Morel <mm...@apache.org>
Committed: Sun Mar 10 16:16:09 2013 +0100

----------------------------------------------------------------------
 README.md                                          |   32 ++++----------
 build.gradle                                       |    2 +-
 subprojects/s4-benchmarks/s4-benchmarks.gradle     |    2 +-
 .../src/main/resources/templates/build.gradle      |    2 +-
 test-apps/consumer-app/build.gradle                |    2 +-
 test-apps/custom-modules/build.gradle              |    6 +-
 test-apps/producer-app/build.gradle                |    2 +-
 test-apps/simple-deployable-app-1/build.gradle     |    2 +-
 test-apps/twitter-adapter/build.gradle             |    8 ++--
 test-apps/twitter-counter/build.gradle             |    8 ++--
 .../content/doc/0.6.0/application_dependencies.md  |    6 +-
 11 files changed, 29 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/d0350a6f/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index e60fd46..79db2e4 100644
--- a/README.md
+++ b/README.md
@@ -3,27 +3,17 @@ Apache S4
 
 Overview
 --------
-S4 is a general-purpose, distributed, scalable, partially fault-tolerant, pluggable 
-platform that allows programmers to easily develop applications for processing continuous 
-unbounded streams of data.
+S4 is a general-purpose,near real-time, distributed, decentralized, scalable, 
+event-driven, modular platform that allows programmers to easily implement applications 
+for processing continuous unbounded streams of data.
 
-S4 0.5.0 is a complete refactoring of the previous version of S4. It grounds on the same 
-concepts (partitioning inspired by map-reduce, actors-like distribution model), 
-but with the following objectives:
+S4 0.5 focused on providing a functional complete refactoring.
 
-- cleaner and simpler API
-- robust configuration through statically defined modules
-- cleaner architecture
-- robust codebase
-- easier to develop S4 apps, to test, and to use the platform
+S4 0.6 builds on this basis and brings plenty of exciting features, in particular:
 
-We added the following core features:
+- major performance improvements: stream throughput improved (measured up to ~200k messages per second and per stream)
+- major configurability improvements, for both the S4 platform and deployed applications
 
-- TCP-based communications
-- state recovery through a flexible checkpointing mechanism
-- inter-cluster/app communications through a pub-sub model
-- dynamic application deployment
-- toolset for easily starting S4 nodes, testing, packaging, deploying and monitoring S4 apps 
 
 
 Documentation
@@ -33,12 +23,6 @@ For the latest information about S4, please visit our website at:
 
    http://incubator.apache.org/s4
 
-and our wiki, at:
-
-   https://cwiki.apache.org/confluence/display/S4/S4+Wiki
-
-Currently the wiki contains the most relevant and up-to-date documentation.
-
 Source code is available here: https://git-wip-us.apache.org/repos/asf?p=incubator-s4.git
 
 
@@ -74,6 +58,7 @@ This will build the tools so that you can drive the platform through the "s4" co
 Directory structure
 -------------------
 * If you have a  source package:
+
 	- root directory contains build and utility scripts, as well as informative files
 	- config/ directory contains configuration files for source code formatting
 	- doc/ directory contains the javadoc
@@ -87,6 +72,7 @@ Directory structure
 
 
 * If you have a binary package:
+
 	- root directory contains the s4 utility script as well as informative files
 	- doc/ directory contains the javadoc
 	- lib/ directory contains :

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/d0350a6f/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 3025030..387435b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -30,7 +30,7 @@ project.ext["distRootFolder"] = "$archivesBaseName-${-> version}"
 allprojects {
 
     // Append the suffix 'SNAPSHOT' when the build is not for release.
-    version = new Version(major: 0, minor: 5, bugfix: 0, isRelease: true)
+    version = new Version(major: 0, minor: 6, bugfix: 0, isRelease: true)
     group = 'org.apache.s4'
 
     /* Search these repos to find artifacts. Gradle will download and cache. */

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/d0350a6f/subprojects/s4-benchmarks/s4-benchmarks.gradle
----------------------------------------------------------------------
diff --git a/subprojects/s4-benchmarks/s4-benchmarks.gradle b/subprojects/s4-benchmarks/s4-benchmarks.gradle
index 301d87e..222d1b4 100644
--- a/subprojects/s4-benchmarks/s4-benchmarks.gradle
+++ b/subprojects/s4-benchmarks/s4-benchmarks.gradle
@@ -18,7 +18,7 @@
 
 
 
-project.ext["s4Version"] = '0.5.0-incubating'
+project.ext["s4Version"] = '0.6.0-incubating'
 description = 'Apache S4 App'
 project.ext["archivesBaseName"] = "$project.name"
 project.ext["distRootFolder"] = "$archivesBaseName-${-> version}"

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/d0350a6f/subprojects/s4-tools/src/main/resources/templates/build.gradle
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/resources/templates/build.gradle b/subprojects/s4-tools/src/main/resources/templates/build.gradle
index 6d83c9c..544f56b 100644
--- a/subprojects/s4-tools/src/main/resources/templates/build.gradle
+++ b/subprojects/s4-tools/src/main/resources/templates/build.gradle
@@ -19,7 +19,7 @@
 
 project.ext["appClassName"] = hasProperty('appClass')? "$appClass": "UNDEFINED"
 
-project.ext["s4Version"] = '0.5.0-incubating'
+project.ext["s4Version"] = '0.6.0-incubating'
 description = 'Apache S4 App'
 project.ext["archivesBaseName"] = "$project.name"
 project.ext["distRootFolder"] = "$archivesBaseName-${-> version}"

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/d0350a6f/test-apps/consumer-app/build.gradle
----------------------------------------------------------------------
diff --git a/test-apps/consumer-app/build.gradle b/test-apps/consumer-app/build.gradle
index e78e83f..69e4532 100644
--- a/test-apps/consumer-app/build.gradle
+++ b/test-apps/consumer-app/build.gradle
@@ -39,7 +39,7 @@
 
 project.ext["appClassName"] = hasProperty('appClass')? "$appClass": "UNDEFINED"
 
-project.ext["s4Version"] = '0.5.0-SNAPSHOT'
+project.ext["s4Version"] = '0.6.0-SNAPSHOT'
 description = 'Apache S4 App'
 archivesBaseName = "$project.name"
 distRootFolder = "$archivesBaseName-${-> version}"

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/d0350a6f/test-apps/custom-modules/build.gradle
----------------------------------------------------------------------
diff --git a/test-apps/custom-modules/build.gradle b/test-apps/custom-modules/build.gradle
index b4eeaf2..7a3b098 100644
--- a/test-apps/custom-modules/build.gradle
+++ b/test-apps/custom-modules/build.gradle
@@ -34,7 +34,7 @@
 *
 */
 
-project.ext["s4Version"] = '0.5.0-incubating'
+project.ext["s4Version"] = '0.6.0-incubating'
 description = 'Apache S4 App'
 project.ext["archivesBaseName"] = "$project.name"
 project.ext["distRootFolder"] = "$archivesBaseName-${-> version}"
@@ -67,8 +67,8 @@ targetCompatibility = 1.6
 /* All project libraries must be defined here. */
 project.ext["libraries"] = [
 
-           s4_base:            'org.apache.s4:s4-base:0.5.0-incubating',
-           s4_comm:            'org.apache.s4:s4-comm:0.5.0-incubating',
+           s4_base:            'org.apache.s4:s4-base:0.6.0-incubating',
+           s4_comm:            'org.apache.s4:s4-comm:0.6.0-incubating',
        ]
 
 

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/d0350a6f/test-apps/producer-app/build.gradle
----------------------------------------------------------------------
diff --git a/test-apps/producer-app/build.gradle b/test-apps/producer-app/build.gradle
index 75cd3fe..b5b25e3 100644
--- a/test-apps/producer-app/build.gradle
+++ b/test-apps/producer-app/build.gradle
@@ -39,7 +39,7 @@
 
 project.ext["appClassName"] = hasProperty('appClass')? "$appClass": "UNDEFINED"
 
-project.ext["s4Version"] = '0.5.0-SNAPSHOT'
+project.ext["s4Version"] = '0.6.0-incubating'
 description = 'Apache S4 App'
 archivesBaseName = "$project.name"
 distRootFolder = "$archivesBaseName-${-> version}"

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/d0350a6f/test-apps/simple-deployable-app-1/build.gradle
----------------------------------------------------------------------
diff --git a/test-apps/simple-deployable-app-1/build.gradle b/test-apps/simple-deployable-app-1/build.gradle
index 3a45073..069f969 100644
--- a/test-apps/simple-deployable-app-1/build.gradle
+++ b/test-apps/simple-deployable-app-1/build.gradle
@@ -39,7 +39,7 @@
 
 project.ext["appClassName"] = hasProperty('appClass')? "$appClass": "UNDEFINED"
 
-project.ext["s4Version"] = '0.5.0-SNAPSHOT'
+project.ext["s4Version"] = '0.6.0-incubating'
 description = 'Apache S4 App'
 archivesBaseName = "$project.name"
 distRootFolder = "$archivesBaseName-${-> version}"

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/d0350a6f/test-apps/twitter-adapter/build.gradle
----------------------------------------------------------------------
diff --git a/test-apps/twitter-adapter/build.gradle b/test-apps/twitter-adapter/build.gradle
index 80341bb..3f68930 100644
--- a/test-apps/twitter-adapter/build.gradle
+++ b/test-apps/twitter-adapter/build.gradle
@@ -39,7 +39,7 @@
 
 project.ext["appClassName"] = hasProperty('appClass')? "$appClass": "UNDEFINED"
 
-project.ext["s4Version"] = '0.5.0-incubating'
+project.ext["s4Version"] = '0.6.0-incubating'
 description = 'Apache S4 App'
 project.ext["archivesBaseName"] = "$project.name"
 project.ext["distRootFolder"] = "$archivesBaseName-${-> version}"
@@ -74,9 +74,9 @@ repositories {
 project.ext["libraries"] = [
            twitter4j_core:     'org.twitter4j:twitter4j-core:2.2.5',
            twitter4j_stream:   'org.twitter4j:twitter4j-stream:2.2.5',
-           s4_base:            'org.apache.s4:s4-base:0.5.0-incubating',
-           s4_comm:            'org.apache.s4:s4-comm:0.5.0-incubating',
-           s4_core:            'org.apache.s4:s4-core:0.5.0-incubating'
+           s4_base:            'org.apache.s4:s4-base:0.6.0-incubating',
+           s4_comm:            'org.apache.s4:s4-comm:0.6.0-incubating',
+           s4_core:            'org.apache.s4:s4-core:0.6.0-incubating'
        ]
 
 

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/d0350a6f/test-apps/twitter-counter/build.gradle
----------------------------------------------------------------------
diff --git a/test-apps/twitter-counter/build.gradle b/test-apps/twitter-counter/build.gradle
index a09962d..dde352a 100644
--- a/test-apps/twitter-counter/build.gradle
+++ b/test-apps/twitter-counter/build.gradle
@@ -39,7 +39,7 @@
 
 project.ext["appClassName"] = hasProperty('appClass')? "$appClass": "UNDEFINED"
 
-project.ext["s4Version"] = '0.5.0-incubating'
+project.ext["s4Version"] = '0.6.0-incubating'
 description = 'Apache S4 App'
 project.ext["archivesBaseName"] = "$project.name"
 project.ext["distRootFolder"] = "$archivesBaseName-${-> version}"
@@ -71,9 +71,9 @@ repositories {
 /* All project libraries must be defined here. */
 project.ext["libraries"] = [
 
-           s4_base:            'org.apache.s4:s4-base:0.5.0-incubating',
-           s4_comm:            'org.apache.s4:s4-comm:0.5.0-incubating',
-           s4_core:            'org.apache.s4:s4-core:0.5.0-incubating'
+           s4_base:            'org.apache.s4:s4-base:0.6.0-incubating',
+           s4_comm:            'org.apache.s4:s4-comm:0.6.0-incubating',
+           s4_core:            'org.apache.s4:s4-core:0.6.0-incubating'
        ]
 
 

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/d0350a6f/website/content/doc/0.6.0/application_dependencies.md
----------------------------------------------------------------------
diff --git a/website/content/doc/0.6.0/application_dependencies.md b/website/content/doc/0.6.0/application_dependencies.md
index d1d9ca3..b9943f9 100644
--- a/website/content/doc/0.6.0/application_dependencies.md
+++ b/website/content/doc/0.6.0/application_dependencies.md
@@ -16,9 +16,9 @@ Your application typically depends on various external libraries. Here is how to
 		project.ext["libraries"] = [
 		           twitter4j_core:     'org.twitter4j:twitter4j-core:2.2.5',
 		           twitter4j_stream:   'org.twitter4j:twitter4j-stream:2.2.5',
-		           s4_base:            'org.apache.s4:s4-base:0.5.0',
-		           s4_comm:            'org.apache.s4:s4-comm:0.5.0',
-		           s4_core:            'org.apache.s4:s4-core:0.5.0'
+		           s4_base:            'org.apache.s4:s4-base:0.6.0',
+		           s4_comm:            'org.apache.s4:s4-comm:0.6.0',
+		           s4_core:            'org.apache.s4:s4-core:0.6.0'
 		       ]
 
 * Add these dependencies as compile-time dependencies. For instance:


[12/50] [abbrv] git commit: Add documentation for injection

Posted by mm...@apache.org.
Add documentation for injection


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

Branch: refs/heads/master
Commit: bad1e51c9d123222f9e5920fa7c5d3a9666da776
Parents: cb3c58a
Author: Matthieu Morel <mm...@apache.org>
Authored: Thu Mar 7 11:50:43 2013 +0100
Committer: Matthieu Morel <mm...@apache.org>
Committed: Thu Mar 7 11:50:43 2013 +0100

----------------------------------------------------------------------
 website/content/doc/0.6.0/event_injection.md |   37 +++++++++++++++++++++
 website/content/doc/0.6.0/index.md           |    1 +
 2 files changed, 38 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/bad1e51c/website/content/doc/0.6.0/event_injection.md
----------------------------------------------------------------------
diff --git a/website/content/doc/0.6.0/event_injection.md b/website/content/doc/0.6.0/event_injection.md
new file mode 100644
index 0000000..685ff86
--- /dev/null
+++ b/website/content/doc/0.6.0/event_injection.md
@@ -0,0 +1,37 @@
+---
+title: Inject events into S4
+---
+
+> How do we inject events into S4?
+
+# Problem statement
+There is a data stream somewhere. We want to inject that data into our S4 stream processing application.
+
+The data stream can be almost anything: user clicks in a web application, alarms in a monitoring system, stock trade operations, even static data from a database or a file server.
+
+# Requirements
+* We must be able to connect to that stream of data
+* We must be able to chunk the data and isolate events out of it
+
+# Solutions
+Currently S4 does not provide a specific abstraction for a source of event or an external data stream. This means that the connection to an external data source can be implemented arbitrarily. Typically, connections to external data sources are initiated in the App object itself, in the `start()` method. 
+
+## In a single application
+Let us consider a single S4 application. The App class is instantiated on each node (for instantiating the local topology), and this has to be taken in consideration.
+For instance, if we get the information from the twitter sprinker stream, given that the stream is provided through a single socket connection, we should connect only from one node. To ensure that, leader election through ZooKeeper is an option, but a much simpler one is simply to base this decision on the id of the partition, provided in the `App` class by `getReceiver().getPartitionId()`. In our example, we would initiate the connection only if we are in partition 0.
+
+~~~
+#!java
+
+
+
+~~~
+
+
+## Using an adapter application
+
+In some cases the above solution is not practical: it introduces some load imbalance between the partitions, and the extraction of the 
+
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/bad1e51c/website/content/doc/0.6.0/index.md
----------------------------------------------------------------------
diff --git a/website/content/doc/0.6.0/index.md b/website/content/doc/0.6.0/index.md
index 27e72b6..b14be0e 100644
--- a/website/content/doc/0.6.0/index.md
+++ b/website/content/doc/0.6.0/index.md
@@ -20,6 +20,7 @@ S4 (Simple Scalable Streaming System) is a general-purpose, distributed, scalabl
 * [Customize the platform and pass configuration parameters](configuration)
 * Add [application dependencies](application_dependencies)
 * [Dispatch events ](event_dispatch) within an application and between applications
+* [Inject events](event_injection) into S4 applications
 
 ## Running S4
 * [Commands](tools) for creating, running and managing applications


[50/50] [abbrv] git commit: Exclude javadoc from source release, ASL on README.txt files

Posted by mm...@apache.org.
Exclude javadoc from source release, ASL on README.txt files


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

Branch: refs/heads/master
Commit: 2f474503e2da111601bb92ca7186c136ba28e5b0
Parents: f237d61
Author: Matthieu Morel <mm...@apache.org>
Authored: Sun May 5 10:24:23 2013 +0200
Committer: Matthieu Morel <mm...@apache.org>
Committed: Sun May 5 10:55:37 2013 +0200

----------------------------------------------------------------------
 build.gradle                         |    2 +-
 test-apps/custom-modules/README.txt  |   15 +++++++++++++++
 test-apps/twitter-adapter/README.txt |   15 +++++++++++++++
 test-apps/twitter-counter/README.txt |   18 ++++++++++++++++--
 4 files changed, 47 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/2f474503/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 34723e2..2d4828c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -273,7 +273,7 @@ task binDist(dependsOn: ["s4-tools:clean", "javadocBinRelease", "copyRequiredFil
 }
 
 
-task srcDist(dependsOn: ["javadoc"], type: Zip) {
+task srcDist(type: Zip) {
     doFirst {
         platformProjects.collect { project ->
             project.tasks.clean.execute()

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/2f474503/test-apps/custom-modules/README.txt
----------------------------------------------------------------------
diff --git a/test-apps/custom-modules/README.txt b/test-apps/custom-modules/README.txt
index daa9e06..ac18153 100644
--- a/test-apps/custom-modules/README.txt
+++ b/test-apps/custom-modules/README.txt
@@ -1 +1,16 @@
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  See the NOTICE file distributed with
+#   this work for additional information regarding copyright ownership.
+#   The ASF licenses this file to You under the Apache License, Version 2.0
+#   (the "License"); you may not use this file except in compliance with
+#   the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
 This project contains some custom modules used for testing independently from the project's classpath
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/2f474503/test-apps/twitter-adapter/README.txt
----------------------------------------------------------------------
diff --git a/test-apps/twitter-adapter/README.txt b/test-apps/twitter-adapter/README.txt
index f9bda45..4d7ee93 100644
--- a/test-apps/twitter-adapter/README.txt
+++ b/test-apps/twitter-adapter/README.txt
@@ -1 +1,16 @@
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  See the NOTICE file distributed with
+#   this work for additional information regarding copyright ownership.
+#   The ASF licenses this file to You under the Apache License, Version 2.0
+#   (the "License"); you may not use this file except in compliance with
+#   the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
 Please refer to README.txt in twitter-counter application
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/2f474503/test-apps/twitter-counter/README.txt
----------------------------------------------------------------------
diff --git a/test-apps/twitter-counter/README.txt b/test-apps/twitter-counter/README.txt
index 17eafb9..5752b21 100644
--- a/test-apps/twitter-counter/README.txt
+++ b/test-apps/twitter-counter/README.txt
@@ -1,3 +1,18 @@
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  See the NOTICE file distributed with
+#   this work for additional information regarding copyright ownership.
+#   The ASF licenses this file to You under the Apache License, Version 2.0
+#   (the "License"); you may not use this file except in compliance with
+#   the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
 An application that displays the current top 10 topics, as gathered from the twitter sample stream.
 It was ported and adapted from S4 0.3
 
@@ -13,5 +28,4 @@ password=<the matching password>
 
 How to run:
 
-Please follow the instructions in the S4 piper walkthrough at the following place:
-https://cwiki.apache.org/confluence/display/S4/S4+piper+walkthrough
\ No newline at end of file
+Please follow the instructions in the S4 piper walkthrough on the documentation from the website
\ No newline at end of file


[08/50] [abbrv] git commit: Merge branch 'S4-68' into dev

Posted by mm...@apache.org.
Merge branch 'S4-68' into dev


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

Branch: refs/heads/master
Commit: 0f037e5b3173d4cc298e8c90cbf9b0043f284d58
Parents: 7eaf5ec 1c6c6bc
Author: Daniel Gómez Ferro <df...@apache.org>
Authored: Wed Mar 6 11:48:44 2013 +0100
Committer: Daniel Gómez Ferro <df...@apache.org>
Committed: Wed Mar 6 11:48:44 2013 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/s4/core/S4Bootstrap.java  |    4 +
 .../s4/core/classloader/TestClassLoader.java       |  157 +++++++++++++++
 .../src/main/java/s4app/ProducerApp.java           |   10 +
 3 files changed, 171 insertions(+), 0 deletions(-)
----------------------------------------------------------------------



[35/50] [abbrv] git commit: S4-128 Use appName parameter as name for s4r

Posted by mm...@apache.org.
S4-128 Use appName parameter as name for s4r


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

Branch: refs/heads/master
Commit: 1c6265949d28594fad00083765374bcb8fd23bbe
Parents: 632057f
Author: Daniel Gómez Ferro <df...@apache.org>
Authored: Wed Mar 13 11:51:39 2013 +0100
Committer: Daniel Gómez Ferro <df...@apache.org>
Committed: Wed Mar 13 11:51:39 2013 +0100

----------------------------------------------------------------------
 .../src/main/resources/templates/build.gradle      |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1c626594/subprojects/s4-tools/src/main/resources/templates/build.gradle
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/resources/templates/build.gradle b/subprojects/s4-tools/src/main/resources/templates/build.gradle
index 544f56b..82bc5a1 100644
--- a/subprojects/s4-tools/src/main/resources/templates/build.gradle
+++ b/subprojects/s4-tools/src/main/resources/templates/build.gradle
@@ -18,6 +18,7 @@
 
 
 project.ext["appClassName"] = hasProperty('appClass')? "$appClass": "UNDEFINED"
+project.ext["appName"] = hasProperty('appName')? "$appName": "UNDEFINED"
 
 project.ext["s4Version"] = '0.6.0-incubating'
 description = 'Apache S4 App'
@@ -109,6 +110,7 @@ task s4r(type: Jar) {
    dependsOn cleanCopyDependenciesToLib, copyDependenciesToLib, cleanBuildProjectJar, buildProjectJar
    from { project.libsDir }
    manifest = project.manifest
+   baseName = appName
    extension = 's4r'
    exclude '*.s4r'
    manifest.mainAttributes('S4-App-Class': appClassName)


[16/50] [abbrv] git commit: S4-66 Check for indirect extension of s4.App

Posted by mm...@apache.org.
S4-66 Check for indirect extension of s4.App

In case of failure throw exception instead of stopping the process


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

Branch: refs/heads/master
Commit: 858a8aff138f296297982fda482ead357e86a018
Parents: dd1da04
Author: Daniel Gómez Ferro <df...@apache.org>
Authored: Thu Mar 7 18:15:41 2013 +0100
Committer: Daniel Gómez Ferro <df...@apache.org>
Committed: Thu Mar 7 18:20:04 2013 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/s4/tools/Package.java |    4 ++--
 .../src/main/resources/templates/build.gradle      |    8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/858a8aff/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Package.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Package.java b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Package.java
index 0a05ac7..0c98abc 100644
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Package.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Package.java
@@ -42,11 +42,11 @@ public class Package extends S4ArgsBase {
             params.add("appName=" + packageArgs.appName.get(0));
             ExecGradle.exec(packageArgs.gradleBuildFile, "installS4R", params.toArray(new String[] {}));
 
-            // Explicitly shutdown the JVM since Gradle leaves non-daemon threads running that delay the termination
-            System.exit(0);
         } catch (Exception e) {
             LoggerFactory.getLogger(Package.class).error("Cannot deploy app", e);
         }
+        // Explicitly shutdown the JVM since Gradle leaves non-daemon threads running that delay the termination
+        System.exit(0);
     }
 
     @Parameters(commandNames = "package", separators = "=", commandDescription = "Create s4r")

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/858a8aff/subprojects/s4-tools/src/main/resources/templates/build.gradle
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/resources/templates/build.gradle b/subprojects/s4-tools/src/main/resources/templates/build.gradle
index 2651642..9a853b4 100644
--- a/subprojects/s4-tools/src/main/resources/templates/build.gradle
+++ b/subprojects/s4-tools/src/main/resources/templates/build.gradle
@@ -151,11 +151,11 @@ void checkAppClass() {
    def appJar = project.libsDir.path+"/app/"+"$project.name"+".jar"
    loader.addURL(new URL("file://"+appJar))
 
-   def instance = Class.forName(appClassName, true, this.getClass().getClassLoader()).newInstance()
+   def userClass = Class.forName(appClassName, true, this.getClass().getClassLoader())
+   def appClass = Class.forName('org.apache.s4.core.App', true, this.getClass().getClassLoader())
 
-   if (!(instance.getClass().getSuperclass().getName() == 'org.apache.s4.core.App') ){
-      println "App class " + appClassName + " does not extend org.apache.s4.core.App!"
-      System.exit(1)
+   if (!(appClass.isAssignableFrom(userClass))){
+      throw new InvalidUserDataException("App class " + appClassName + " does not extend org.apache.s4.core.App")
    }
 
 }


[48/50] [abbrv] git commit: Update license headers and pointers

Posted by mm...@apache.org.
Update license headers and pointers


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

Branch: refs/heads/master
Commit: f5ebbabf6d7aa8d95a408e8db6432ef7843018fd
Parents: 96938d5
Author: Matthieu Morel <mm...@apache.org>
Authored: Fri Apr 5 16:30:25 2013 +0200
Committer: Matthieu Morel <mm...@apache.org>
Committed: Fri Apr 5 18:32:24 2013 +0200

----------------------------------------------------------------------
 .rat-excludes                                      |    7 -
 NOTICE                                             |    5 +
 NOTICE.txt                                         |    5 -
 README.md                                          |   52 ++++++++-
 RELEASE_NOTES.html                                 |   11 ++-
 build.gradle                                       |   11 +-
 config/binrelease/LICENSE                          |   25 +++-
 config/binrelease/NOTICE                           |   16 +++
 config/binrelease/NOTICE.txt                       |   16 ---
 gradlew                                            |   17 +++-
 gradlew.bat                                        |   90 ---------------
 subprojects/s4-benchmarks/README.md                |   25 ++++-
 .../s4-benchmarks/src/main/resources/logback.xml   |   17 +++
 subprojects/s4-core/src/main/resources/logback.xml |   17 +++
 .../java/org/apache/s4/example/counter/README.md   |   16 +++
 .../main/java/org/apache/s4/tools/CreateApp.java   |    4 +-
 .../src/main/resources/templates/newApp.README     |   17 +++
 .../main/java/org/apache/s4/deploy/SimplePE.java   |    9 +-
 .../src/main/resources/ASL2.txt                    |   15 +++
 .../src/main/resources/resource.txt                |   15 +++
 website/content/doc/0.6.0/fault_tolerance.md       |    6 +-
 website/content/doc/0.6.0/overview.md              |    4 +
 22 files changed, 255 insertions(+), 145 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/f5ebbabf/.rat-excludes
----------------------------------------------------------------------
diff --git a/.rat-excludes b/.rat-excludes
index fda2300..7ad3a76 100644
--- a/.rat-excludes
+++ b/.rat-excludes
@@ -1,6 +1,5 @@
 .rat-excludes
 rat.out
-README*
 .gitignore
 .git
 target
@@ -10,10 +9,4 @@ tmp
 .classpath
 .project
 build
-newApp.README
-RELEASE_NOTES.html
-README.md
 # note: pattern with * don't seem to work, even when properly escaped
-logback.xml
-s4-checkstyle.xml
-s4-eclipse-format.xml
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/f5ebbabf/NOTICE
----------------------------------------------------------------------
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..5592baa
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,5 @@
+Apache S4
+Copyright 2013 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/f5ebbabf/NOTICE.txt
----------------------------------------------------------------------
diff --git a/NOTICE.txt b/NOTICE.txt
deleted file mode 100644
index 5592baa..0000000
--- a/NOTICE.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-Apache S4
-Copyright 2013 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/f5ebbabf/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 57ee04e..9f02d6e 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,19 @@
+<!-- Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
 Apache S4
 =========
 
@@ -20,7 +36,7 @@ Documentation
 
 For the latest information about S4, please visit our website at:
 
-   http://incubator.apache.org/s4
+	   http://incubator.apache.org/s4
 
 Source code is available here: https://git-wip-us.apache.org/repos/asf?p=incubator-s4.git
 
@@ -39,7 +55,21 @@ This only applies if you checkout from the source repository or if you download
 released source package.
 
 
-We use gradle http://gradle.org as the build system.
+We use gradle `http://gradle.org` as the build system, and we use the gradle wrapper script (`gradlew`) in some of the S4 tools.
+
+
+### Installing the gradle wrapper
+
+> Instructions apply to source release downloads. When checking out from the git repository, the gradle wrapper is already available.
+
+
+Gradle is not shipped with the source distribution of S4, so you'll need to :
+
+1. Install gradle: follow the instructions in the [gradle web site](http://gradle.org). We tested S4 with gradle 1.4.
+2. Generate the gradle wrapper: from the root directory of the S4 project, execute: `/path/to/gradle wrapper`
+	* this will generate `gradlew` and `gradlew.bat` script and place `gradle-wrapper-1.4.jar` and `gradle-wrapper-1.4.properties` in the `lib` directory
+
+### Building the project 
 
 * From the root directory of the S4 project:
 
@@ -60,13 +90,24 @@ This will build the tools so that you can drive the platform through the "s4" co
 
 Directory structure
 -------------------
-* If you have a  source package:
+
+* If you checked out from the git repository:
 
 	- root directory contains build and utility scripts, as well as informative files
 	- config/ directory contains configuration files for source code formatting
+	- lib/ directory contains libraries for building the project and validating source headers
+	- subprojects/ directory contains the plaftorm subprojects: base, comm, core, tools, 
+	as well as example (example is not fully ported to 0.5.0+)
+	- test-apps/ directory contains some examples (some of them very trivial are used 
+	in regression tests)
+	- website/ directory contains the source of the website, including documentation
+
+
+
+* If you have a source package:
+
+	- root directory contains build and utility scripts, as well as informative files
 	- doc/ directory contains the javadoc
-	- gradle/ directory contains libraries used by the gradle build tool
-	- lib/ directory contains some other gradle libraries 
 	- subproject/ directory contains the plaftorm subprojects: base, comm, core, tools, 
 	as well as example (example is not fully ported to 0.5.0)
 	- test-apps/ directory contains some examples (some of them very trivial are used 
@@ -82,7 +123,6 @@ Directory structure
 		* the platform libraries (prefixed with "s4")
 		* the dependencies
 	- bin/ directory contains some scripts that are used by the s4 script
-	- gradle/ directory contains libraries used for building S4 projects
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/f5ebbabf/RELEASE_NOTES.html
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES.html b/RELEASE_NOTES.html
index 08ca59f..5438d43 100644
--- a/RELEASE_NOTES.html
+++ b/RELEASE_NOTES.html
@@ -1,3 +1,9 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+<title>Apache S4 0.6.0 Release Notes</title>
+</head>
+<body>
 
 <p>
         Release Notes - Apache S4 - Version 0.6.0
@@ -116,4 +122,7 @@ Apache S4 0.6 contains grounds on the same basis than 0.5 and brings major perfo
 </li>
 <li>[<a href='https://issues.apache.org/jira/browse/S4-124'>S4-124</a>] -         Update documentation for 0.6.0 release
 </li>
-</ul>
\ No newline at end of file
+</ul>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/f5ebbabf/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 6823f42..34723e2 100644
--- a/build.gradle
+++ b/build.gradle
@@ -157,7 +157,7 @@ subprojects {
     
     jar {
         from (rootDir) {
-            include "NOTICE.txt"
+            include "NOTICE"
             include "LICENSE"
             into "META-INF"
         }
@@ -223,9 +223,7 @@ task copyRequiredFilesForBinaryRelease (type: Copy) {
         from (rootDir) {
             include "README.md"
             include "DISCLAIMER"
-            include "RELEASE_NOTES.html"
             include "gradlew"
-            include "gradle.bat"
             include "s4"
         }
         into new File(project.rootDir.path+'/subprojects/s4-tools/src/dist/')
@@ -296,7 +294,12 @@ task srcDist(dependsOn: ["javadoc"], type: Zip) {
     exclude ('**/tmp/**')
     exclude ('**/bin/**')
     exclude ('website/**')
-    exclude ('lib/apache-rat-0.8.jar')
+    exclude ('lib')
+    exclude ('gradlew')
+    exclude ('RELEASE_NOTES.html')
+    exclude ('config')
+    exclude ('subprojects/s4-benchmarks/config/injector.config')
+    exclude ('subprojects/s4-benchmarks/config/node.config')
     into (baseName+'-'+version+'-'+classifier)
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/f5ebbabf/config/binrelease/LICENSE
----------------------------------------------------------------------
diff --git a/config/binrelease/LICENSE b/config/binrelease/LICENSE
index b92c80c..ab8b6a3 100644
--- a/config/binrelease/LICENSE
+++ b/config/binrelease/LICENSE
@@ -202,7 +202,19 @@
    
 ----------------------------------------------------------------------------
 
-This product uses kryo and minlog, which use the following license:
+This product includes the following libraries, which use the Apache License, 
+Version 2.0 : guava 13.0.1, guice 3.0, guice-assist 3.0, javax.inject 1, 
+objenesis 1.2, zkclient 0.1, gradle-base-services 1.4, gradle-core 1.4,  
+gradle-tooling-api 1.4, gradle-wrapper 1.4, metrics-core 2.1.3, 
+netty 3.5.11.Final, gson 1.6
+
+----------------------------------------------------------------------------
+
+This product includes the aop-alliance 1.0 library, which is public domain 
+
+----------------------------------------------------------------------------
+
+This product includes kryo 2.20 and minlog 1.2, which use the following license:
 
 Copyright (c) 2008, Nathan Sweet All rights reserved.
 
@@ -230,7 +242,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 ----------------------------------------------------------------------------
 
-This product uses asm, which uses the following license:
+This product includes asm 4.0, which uses the following license:
 
 Copyright (c) 2000-2011 INRIA, France Telecom
 All rights reserved.
@@ -264,7 +276,8 @@ THE POSSIBILITY OF SUCH DAMAGE.
 
 ----------------------------------------------------------------------------
 
-This product uses Logback, which uses the following license (EPL1.0):
+This product includes Logback 0.9.29 (logback-core and logback-classic jars), 
+which uses the following license (EPL1.0):
 
 Logback: the reliable, generic, fast and flexible logging framework. Copyright
 (C) 1999-2012, QOS.ch. All rights reserved.
@@ -492,7 +505,7 @@ any resulting litigation.
 
 ----------------------------------------------------------------------------
 
-This product uses slf4j, which uses the following license (MIT):
+This product includes slf4j 1.6.1, which uses the following license (MIT):
  
 Copyright (c) 2004-2011 QOS.ch
  All rights reserved.
@@ -518,8 +531,8 @@ Copyright (c) 2004-2011 QOS.ch
  
  ---------------------------------------------------------------------------
 
-This product uses jcip-annotations, copyright (c) 2005 Brian Goetz and Tim
-Peierls, using the Creative Commons Attribution License:
+This product includes jcip-annotations 1.0, copyright (c) 2005 Brian Goetz 
+and Tim Peierls, using the Creative Commons Attribution License:
 
 
 Attribution 2.5

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/f5ebbabf/config/binrelease/NOTICE
----------------------------------------------------------------------
diff --git a/config/binrelease/NOTICE b/config/binrelease/NOTICE
new file mode 100644
index 0000000..b864661
--- /dev/null
+++ b/config/binrelease/NOTICE
@@ -0,0 +1,16 @@
+Apache S4
+Copyright 2013 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+This product includes concurrency annotations, 
+developed by Brian Goetz and Tim Peierls (http://jcip.net/)
+
+This product includes software developed by Coda Hale and Yammer, Inc, which itself
+includes code derived from the JSR-166 project (ThreadLocalRandom), which was released
+with the following comments:
+
+    Written by Doug Lea with assistance from members of JCP JSR-166
+    Expert Group and released to the public domain, as explained at
+    http://creativecommons.org/publicdomain/zero/1.0/
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/f5ebbabf/config/binrelease/NOTICE.txt
----------------------------------------------------------------------
diff --git a/config/binrelease/NOTICE.txt b/config/binrelease/NOTICE.txt
deleted file mode 100644
index b864661..0000000
--- a/config/binrelease/NOTICE.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-Apache S4
-Copyright 2013 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-This product includes concurrency annotations, 
-developed by Brian Goetz and Tim Peierls (http://jcip.net/)
-
-This product includes software developed by Coda Hale and Yammer, Inc, which itself
-includes code derived from the JSR-166 project (ThreadLocalRandom), which was released
-with the following comments:
-
-    Written by Doug Lea with assistance from members of JCP JSR-166
-    Expert Group and released to the public domain, as explained at
-    http://creativecommons.org/publicdomain/zero/1.0/
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/f5ebbabf/gradlew
----------------------------------------------------------------------
diff --git a/gradlew b/gradlew
index 3f041e5..c45cab2 100755
--- a/gradlew
+++ b/gradlew
@@ -1,5 +1,20 @@
 #!/usr/bin/env bash
-
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  See the NOTICE file distributed with
+#   this work for additional information regarding copyright ownership.
+#   The ASF licenses this file to You under the Apache License, Version 2.0
+#   (the "License"); you may not use this file except in compliance with
+#   the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
 ##############################################################################
 ##
 ##  Gradle start up script for UN*X

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/f5ebbabf/gradlew.bat
----------------------------------------------------------------------
diff --git a/gradlew.bat b/gradlew.bat
deleted file mode 100644
index 076e37d..0000000
--- a/gradlew.bat
+++ /dev/null
@@ -1,90 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem  Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windowz variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\lib\gradle-wrapper-1.4.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/f5ebbabf/subprojects/s4-benchmarks/README.md
----------------------------------------------------------------------
diff --git a/subprojects/s4-benchmarks/README.md b/subprojects/s4-benchmarks/README.md
index 1839df3..d610215 100644
--- a/subprojects/s4-benchmarks/README.md
+++ b/subprojects/s4-benchmarks/README.md
@@ -1,3 +1,19 @@
+<!-- Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
 Simple S4 Benchmarking Framework
 ================================
 
@@ -31,9 +47,10 @@ Profiling options (e.g. YourKit) can easily be added to the injector or app node
 
 ## Parameters
 
-We provide a script for that purpose: `bench-cluster.sh`
+We provide a script for that purpose: `bench-cluster.sh`.
+
 
-You can use arbitrary numbers of injectors and processing nodes, in order to vary the load and the number of concurrent connections.
+We can use arbitrary numbers of injectors and processing nodes, in order to vary the load and the number of concurrent connections.
 
 
 Input parameters are:
@@ -44,7 +61,9 @@ Input parameters are:
 - node configuration (you __must__ specify the correct zookeeper connection string. By default, a server is created on the node where the `bench-cluster.sh` script is executed)
 
  
-Exmample configuration files are available in `/config` and you can configure :
+Example configuration files `config/injector.config` and `config/node.config` are not included in the source distribution but can be retrieved from the S4 git repository, in the `<root>/subprojects/s4-benchmarks/config` directory.
+
+You can configure :
 
 - the number of keys
 - the number of test iterations

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/f5ebbabf/subprojects/s4-benchmarks/src/main/resources/logback.xml
----------------------------------------------------------------------
diff --git a/subprojects/s4-benchmarks/src/main/resources/logback.xml b/subprojects/s4-benchmarks/src/main/resources/logback.xml
index ea8c85a..0f34cc7 100644
--- a/subprojects/s4-benchmarks/src/main/resources/logback.xml
+++ b/subprojects/s4-benchmarks/src/main/resources/logback.xml
@@ -1,3 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License.-->
 <configuration>
 
   <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/f5ebbabf/subprojects/s4-core/src/main/resources/logback.xml
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/resources/logback.xml b/subprojects/s4-core/src/main/resources/logback.xml
index ea8c85a..0f34cc7 100644
--- a/subprojects/s4-core/src/main/resources/logback.xml
+++ b/subprojects/s4-core/src/main/resources/logback.xml
@@ -1,3 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License.-->
 <configuration>
 
   <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/f5ebbabf/subprojects/s4-example/src/main/java/org/apache/s4/example/counter/README.md
----------------------------------------------------------------------
diff --git a/subprojects/s4-example/src/main/java/org/apache/s4/example/counter/README.md b/subprojects/s4-example/src/main/java/org/apache/s4/example/counter/README.md
index ebe6228..ab9f659 100644
--- a/subprojects/s4-example/src/main/java/org/apache/s4/example/counter/README.md
+++ b/subprojects/s4-example/src/main/java/org/apache/s4/example/counter/README.md
@@ -1,3 +1,19 @@
+<!-- Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
 S4 Counter Example (NOT updated for 0.5.0)
 ==================
 

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/f5ebbabf/subprojects/s4-tools/src/main/java/org/apache/s4/tools/CreateApp.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/CreateApp.java b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/CreateApp.java
index 4b2a476..64ac955 100644
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/CreateApp.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/CreateApp.java
@@ -112,7 +112,9 @@ public class CreateApp extends S4ArgsBase {
 
                 @Override
                 public boolean processLine(String line) throws IOException {
-                    System.out.println(line.replace("<appDir>", appArgs.getAppDir()));
+                    if (!line.startsWith("#")) {
+                        System.out.println(line.replace("<appDir>", appArgs.getAppDir()));
+                    }
                     return true;
                 }
 

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/f5ebbabf/subprojects/s4-tools/src/main/resources/templates/newApp.README
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/resources/templates/newApp.README b/subprojects/s4-tools/src/main/resources/templates/newApp.README
index 69975c7..4d93aeb 100644
--- a/subprojects/s4-tools/src/main/resources/templates/newApp.README
+++ b/subprojects/s4-tools/src/main/resources/templates/newApp.README
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
    _____  _  _
   / ____|| || |
  | (___  | || |_

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/f5ebbabf/test-apps/simple-deployable-app-1/src/main/java/org/apache/s4/deploy/SimplePE.java
----------------------------------------------------------------------
diff --git a/test-apps/simple-deployable-app-1/src/main/java/org/apache/s4/deploy/SimplePE.java b/test-apps/simple-deployable-app-1/src/main/java/org/apache/s4/deploy/SimplePE.java
index 40d07aa..f83110d 100644
--- a/test-apps/simple-deployable-app-1/src/main/java/org/apache/s4/deploy/SimplePE.java
+++ b/test-apps/simple-deployable-app-1/src/main/java/org/apache/s4/deploy/SimplePE.java
@@ -45,9 +45,12 @@ public class SimplePE extends ProcessingElement {
         try {
             LoggerFactory.getLogger(getClass()).debug("processing envent {}", event.get("line"));
             // test s4r resource access
-            zk.create("/resourceData",
-                    new String(ByteStreams.toByteArray(getClass().getResourceAsStream("/resource.txt"))),
-                    CreateMode.PERSISTENT);
+            // need to strip ASL text from reference content file
+            String strippedContent = new String(
+                    ByteStreams.toByteArray(getClass().getResourceAsStream("/resource.txt"))).substring(new String(
+                    ByteStreams.toByteArray(getClass().getResourceAsStream("/ASL2.txt"))).length());
+
+            zk.create("/resourceData", strippedContent, CreateMode.PERSISTENT);
             // test event processing
             zk.create("/onEvent@" + event.get("line"), new byte[0], CreateMode.PERSISTENT);
             zk.close();

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/f5ebbabf/test-apps/simple-deployable-app-1/src/main/resources/ASL2.txt
----------------------------------------------------------------------
diff --git a/test-apps/simple-deployable-app-1/src/main/resources/ASL2.txt b/test-apps/simple-deployable-app-1/src/main/resources/ASL2.txt
new file mode 100644
index 0000000..7148c46
--- /dev/null
+++ b/test-apps/simple-deployable-app-1/src/main/resources/ASL2.txt
@@ -0,0 +1,15 @@
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  See the NOTICE file distributed with
+#   this work for additional information regarding copyright ownership.
+#   The ASF licenses this file to You under the Apache License, Version 2.0
+#   (the "License"); you may not use this file except in compliance with
+#   the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/f5ebbabf/test-apps/simple-deployable-app-1/src/main/resources/resource.txt
----------------------------------------------------------------------
diff --git a/test-apps/simple-deployable-app-1/src/main/resources/resource.txt b/test-apps/simple-deployable-app-1/src/main/resources/resource.txt
index 7c8b9c8..dc6cfdc 100644
--- a/test-apps/simple-deployable-app-1/src/main/resources/resource.txt
+++ b/test-apps/simple-deployable-app-1/src/main/resources/resource.txt
@@ -1 +1,16 @@
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  See the NOTICE file distributed with
+#   this work for additional information regarding copyright ownership.
+#   The ASF licenses this file to You under the Apache License, Version 2.0
+#   (the "License"); you may not use this file except in compliance with
+#   the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
 Salut!
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/f5ebbabf/website/content/doc/0.6.0/fault_tolerance.md
----------------------------------------------------------------------
diff --git a/website/content/doc/0.6.0/fault_tolerance.md b/website/content/doc/0.6.0/fault_tolerance.md
index 9086582..05c53b2 100644
--- a/website/content/doc/0.6.0/fault_tolerance.md
+++ b/website/content/doc/0.6.0/fault_tolerance.md
@@ -107,8 +107,10 @@ When a message for a new key arrives in the recovered S4 node, a new PE instance
 A PE can be checkpointed if:
 
 
-- the PE class provides an empty no-arg constructor (that restriction should be lifted in next releases)
-- it has non transient serializable fields (and by opposition, transient fields will never be checkpointed)
+- **the PE class provides an empty no-arg constructor** (that restriction should be lifted in next releases)
+- **it has non transient serializable fields** (and by opposition, transient fields will never be checkpointed)
+
+> For example, one must make sure fields of type `Stream` (for sending messages downstream) are transient!
 
 
 ##### Checkpointing application configuration

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/f5ebbabf/website/content/doc/0.6.0/overview.md
----------------------------------------------------------------------
diff --git a/website/content/doc/0.6.0/overview.md b/website/content/doc/0.6.0/overview.md
index 76e70e2..fa53450 100644
--- a/website/content/doc/0.6.0/overview.md
+++ b/website/content/doc/0.6.0/overview.md
@@ -92,3 +92,7 @@ The following diagram sums-up the key concepts in a hierarchical fashion:
 
 ![image](/images/doc/0.6.0/S4_hierarchical_archi.png)
 
+## Note
+
+S4 0.6 works exclusively with TCP
+


[28/50] [abbrv] git commit: Fetch reflectasm dependency from remote repo

Posted by mm...@apache.org.
Fetch reflectasm dependency from remote repo


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

Branch: refs/heads/master
Commit: 96f04a6abfcfc2f7b6c457ec4507e31a2d7e4278
Parents: 4d08d38
Author: Matthieu Morel <mm...@apache.org>
Authored: Sun Mar 10 16:43:54 2013 +0100
Committer: Matthieu Morel <mm...@apache.org>
Committed: Sun Mar 10 16:43:54 2013 +0100

----------------------------------------------------------------------
 build.gradle                                       |    4 +-
 lib/reflectasm-1.07-shaded.jar                     |  Bin 65612 -> 0 bytes
 .../java/org/apache/s4/comm/util/package-info.java |   22 +++++++++++++++
 3 files changed, 24 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/96f04a6a/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 387435b..b5428a0 100644
--- a/build.gradle
+++ b/build.gradle
@@ -61,7 +61,7 @@ project.ext["libraries"] = [
     kryo:               'com.esotericsoftware.kryo:kryo:2.20',
     minlog:             'com.googlecode:minlog:1.2',
     // NOTE shaded jar is not resolved correctly, we include it in /lib directory
-    reflectasm:         'com.esotericsoftware.reflectasm:reflectasm:1.07-shaded',
+    reflectasm:         'com.esotericsoftware.reflectasm:reflectasm:1.07:shaded',
     netty:              'io.netty:netty:3.5.11.Final',
     mockito_core:       'org.mockito:mockito-core:1.9.0',
     commons_config:     'commons-configuration:commons-configuration:1.6',
@@ -85,7 +85,7 @@ project.ext["libraries"] = [
     asm:                'org.ow2.asm:asm:4.0',
     javax_inject:       'javax.inject:javax.inject:1',
     gradle_base_services: 'org.gradle:gradle-base-services:1.0',
-    gradle_core: 'org.gradle:gradle-core:1.0',
+    gradle_core:        'org.gradle:gradle-core:1.0',
     gradle_tooling_api: 'org.gradle:gradle-tooling-api:1.0',
     gradle_wrapper:     'gradle-wrapper:gradle-wrapper:1.0',
     metrics:            'com.yammer.metrics:metrics-core:2.1.3'

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/96f04a6a/lib/reflectasm-1.07-shaded.jar
----------------------------------------------------------------------
diff --git a/lib/reflectasm-1.07-shaded.jar b/lib/reflectasm-1.07-shaded.jar
deleted file mode 100644
index 1e182c1..0000000
Binary files a/lib/reflectasm-1.07-shaded.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/96f04a6a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/util/package-info.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/util/package-info.java b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/util/package-info.java
new file mode 100644
index 0000000..d26a31d
--- /dev/null
+++ b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/util/package-info.java
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Utilities for the comm layer
+ */
+package org.apache.s4.comm.util;
\ No newline at end of file


[49/50] [abbrv] git commit: Add Apache Incubator disclaimer on S4 incubator homepage

Posted by mm...@apache.org.
Add Apache Incubator disclaimer on S4 incubator homepage


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

Branch: refs/heads/master
Commit: f237d611edcc76a4caaa63a56e8de5cc25038c1d
Parents: f5ebbab
Author: Matthieu Morel <mm...@apache.org>
Authored: Mon Apr 22 16:35:46 2013 +0200
Committer: Matthieu Morel <mm...@apache.org>
Committed: Mon Apr 22 16:35:46 2013 +0200

----------------------------------------------------------------------
 website/content/index.haml |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/f237d611/website/content/index.haml
----------------------------------------------------------------------
diff --git a/website/content/index.haml b/website/content/index.haml
index 283d3e3..b288a3b 100644
--- a/website/content/index.haml
+++ b/website/content/index.haml
@@ -58,6 +58,13 @@ title: Distributed Stream Computing Platform
         %h4{:class=>"subsecheader"}= "fault-tolerance"
         %p= "When a server in the cluster fails, a stand-by server is automatically activated to take over the tasks. Checkpointing and recovery minimize state loss."
 
+    .horrule
+
+    #sec_motivation{:class=>"span-18"}
+      %h2{:class=>"secheader"}= "disclaimer"
+      %p= "Apache S4 is an effort undergoing incubation at the Apache Software Foundation (ASF), sponsored by the Apache Incubator PMC.  Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects.  While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF. "
+
+
 #sidebar{:class=>"span-5 last"}
   #download
     #latest_head


[14/50] [abbrv] git commit: Merge branch 'S4-120' into dev

Posted by mm...@apache.org.
Merge branch 'S4-120' into dev

Conflicts:
	subprojects/s4-core/src/main/java/org/apache/s4/core/DefaultCoreModule.java
	subprojects/s4-core/src/main/java/org/apache/s4/core/S4Bootstrap.java


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

Branch: refs/heads/master
Commit: eb20b959c1a61682f4374f7ae0261cfa858b4ccd
Parents: 23ba466 1eb5c87
Author: Daniel Gómez Ferro <df...@apache.org>
Authored: Thu Mar 7 15:56:54 2013 +0100
Committer: Daniel Gómez Ferro <df...@apache.org>
Committed: Thu Mar 7 15:56:54 2013 +0100

----------------------------------------------------------------------
 .../java/org/apache/s4/comm/DefaultCommModule.java |   11 +++++------
 .../java/org/apache/s4/comm/tcp/TCPEmitter.java    |    3 ++-
 .../java/org/apache/s4/comm/tcp/TCPListener.java   |    2 ++
 .../org/apache/s4/comm/topology/ClusterFromZK.java |    2 ++
 .../apache/s4/comm/topology/ClustersFromZK.java    |    3 ++-
 .../java/org/apache/s4/comm/udp/UDPEmitter.java    |    2 ++
 .../java/org/apache/s4/comm/udp/UDPListener.java   |   14 +++++++++-----
 .../main/java/org/apache/s4/core/BaseModule.java   |    5 ++---
 .../java/org/apache/s4/core/DefaultCoreModule.java |    5 ++---
 .../org/apache/s4/core/DefaultRemoteSenders.java   |    2 ++
 .../java/org/apache/s4/core/ZkClientProvider.java  |    9 ++++++---
 .../s4/core/ft/NoOpCheckpointingFramework.java     |    5 ++++-
 12 files changed, 40 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/eb20b959/subprojects/s4-comm/src/main/java/org/apache/s4/comm/DefaultCommModule.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/eb20b959/subprojects/s4-core/src/main/java/org/apache/s4/core/DefaultCoreModule.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/eb20b959/subprojects/s4-core/src/main/java/org/apache/s4/core/DefaultRemoteSenders.java
----------------------------------------------------------------------


[13/50] [abbrv] git commit: S4-120 Prefer @Singleton for app singleton

Posted by mm...@apache.org.
S4-120 Prefer @Singleton for app singleton


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

Branch: refs/heads/master
Commit: 1eb5c87a56b68180b5643f5478be01dd1543a2f2
Parents: 3e4c9e4
Author: Matthieu Morel <mm...@apache.org>
Authored: Thu Mar 7 12:44:11 2013 +0100
Committer: Matthieu Morel <mm...@apache.org>
Committed: Thu Mar 7 12:44:11 2013 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/s4/core/BaseModule.java   |    5 ++---
 .../java/org/apache/s4/core/DefaultCoreModule.java |    9 ++++-----
 .../org/apache/s4/core/DefaultRemoteSenders.java   |    2 ++
 .../main/java/org/apache/s4/core/S4Bootstrap.java  |   11 ++---------
 .../java/org/apache/s4/core/ZkClientProvider.java  |    9 ++++++---
 .../s4/core/ft/NoOpCheckpointingFramework.java     |    5 ++++-
 6 files changed, 20 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1eb5c87a/subprojects/s4-core/src/main/java/org/apache/s4/core/BaseModule.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/BaseModule.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/BaseModule.java
index 582f5d0..6eda37d 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/BaseModule.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/BaseModule.java
@@ -16,7 +16,6 @@ import org.slf4j.LoggerFactory;
 
 import com.google.inject.AbstractModule;
 import com.google.inject.Binder;
-import com.google.inject.Scopes;
 import com.google.inject.name.Names;
 
 public class BaseModule extends AbstractModule {
@@ -47,8 +46,8 @@ public class BaseModule extends AbstractModule {
         bind(ArchiveFetcher.class).to(RemoteFileFetcher.class);
         bind(S4Bootstrap.class);
 
-        // share the Zookeeper connection
-        bind(ZkClient.class).toProvider(ZkClientProvider.class).in(Scopes.SINGLETON);
+        // ZkClientProvider singleton shares the Zookeeper connection
+        bind(ZkClient.class).toProvider(ZkClientProvider.class);
 
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1eb5c87a/subprojects/s4-core/src/main/java/org/apache/s4/core/DefaultCoreModule.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/DefaultCoreModule.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/DefaultCoreModule.java
index 1c5ae9c..10a1643 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/DefaultCoreModule.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/DefaultCoreModule.java
@@ -47,7 +47,6 @@ import com.google.common.io.Files;
 import com.google.inject.AbstractModule;
 import com.google.inject.Binder;
 import com.google.inject.Provides;
-import com.google.inject.Scopes;
 import com.google.inject.name.Named;
 import com.google.inject.name.Names;
 
@@ -84,13 +83,13 @@ public class DefaultCoreModule extends AbstractModule {
         /* The hashing function to map keys top partitions. */
         bind(Hasher.class).to(DefaultHasher.class);
 
-        bind(DeploymentManager.class).to(DistributedDeploymentManager.class).in(Scopes.SINGLETON);
+        bind(DeploymentManager.class).to(DistributedDeploymentManager.class);
 
         bind(S4RLoaderFactory.class);
 
         // For enabling checkpointing, one needs to use a custom module, such as
         // org.apache.s4.core.ft.FileSytemBasedCheckpointingModule
-        bind(CheckpointingFramework.class).to(NoOpCheckpointingFramework.class).in(Scopes.SINGLETON);
+        bind(CheckpointingFramework.class).to(NoOpCheckpointingFramework.class);
 
         // shed load in local sender only by default
         bind(SenderExecutorServiceFactory.class).to(ThrottlingSenderExecutorServiceFactory.class);
@@ -98,8 +97,8 @@ public class DefaultCoreModule extends AbstractModule {
 
         bind(StreamExecutorServiceFactory.class).to(BlockingStreamExecutorServiceFactory.class);
 
-        bind(RemoteStreams.class).to(ZkRemoteStreams.class).in(Scopes.SINGLETON);
-        bind(RemoteSenders.class).to(DefaultRemoteSenders.class).in(Scopes.SINGLETON);
+        bind(RemoteStreams.class).to(ZkRemoteStreams.class);
+        bind(RemoteSenders.class).to(DefaultRemoteSenders.class);
 
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1eb5c87a/subprojects/s4-core/src/main/java/org/apache/s4/core/DefaultRemoteSenders.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/DefaultRemoteSenders.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/DefaultRemoteSenders.java
index 6aaa8f1..9cb22bf 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/DefaultRemoteSenders.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/DefaultRemoteSenders.java
@@ -36,7 +36,9 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.google.inject.Inject;
+import com.google.inject.Singleton;
 
+@Singleton
 public class DefaultRemoteSenders implements RemoteSenders {
 
     Logger logger = LoggerFactory.getLogger(DefaultRemoteSenders.class);

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1eb5c87a/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Bootstrap.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Bootstrap.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Bootstrap.java
index 77dbc67..4d1274b 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Bootstrap.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Bootstrap.java
@@ -13,12 +13,10 @@ import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.I0Itec.zkclient.IZkDataListener;
-import org.I0Itec.zkclient.serialize.ZkSerializer;
 import org.apache.s4.base.util.ModulesLoader;
 import org.apache.s4.comm.DefaultCommModule;
 import org.apache.s4.comm.ModulesLoaderFactory;
 import org.apache.s4.comm.topology.ZNRecord;
-import org.apache.s4.comm.topology.ZNRecordSerializer;
 import org.apache.s4.comm.topology.ZkClient;
 import org.apache.s4.comm.util.ArchiveFetchException;
 import org.apache.s4.comm.util.ArchiveFetcher;
@@ -72,15 +70,10 @@ public class S4Bootstrap {
     CountDownLatch signalOneAppLoaded = new CountDownLatch(1);
 
     @Inject
-    public S4Bootstrap(@Named("s4.cluster.name") String clusterName,
-            @Named("s4.cluster.zk_address") String zookeeperAddress,
-            @Named("s4.cluster.zk_session_timeout") int sessionTimeout,
-            @Named("s4.cluster.zk_connection_timeout") int connectionTimeout, ArchiveFetcher fetcher) {
+    public S4Bootstrap(@Named("s4.cluster.name") String clusterName, ZkClient zkClient, ArchiveFetcher fetcher) {
 
         this.fetcher = fetcher;
-        zkClient = new ZkClient(zookeeperAddress, sessionTimeout, connectionTimeout);
-        ZkSerializer serializer = new ZNRecordSerializer();
-        zkClient.setZkSerializer(serializer);
+        this.zkClient = zkClient;
 
         String appDir = "/s4/clusters/" + clusterName + "/app";
         if (!zkClient.exists(appDir)) {

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1eb5c87a/subprojects/s4-core/src/main/java/org/apache/s4/core/ZkClientProvider.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/ZkClientProvider.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/ZkClientProvider.java
index 19c4ecc..7f018e6 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/ZkClientProvider.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/ZkClientProvider.java
@@ -6,17 +6,18 @@ import org.apache.s4.comm.topology.ZkClient;
 
 import com.google.inject.Inject;
 import com.google.inject.Provider;
+import com.google.inject.Singleton;
 import com.google.inject.name.Named;
 
 /**
  * 
  * Provides a connection to ZooKeeper through the {@link ZkClient} class.
- * <p>
- * This connection can easily be shared by specifying singleton scope at binding time (i.e. when binding the ZkClient
- * class, see {@link BaseModule}).
  * 
+ * As an application singleton, it provides a single shared connection for an S4 node.
  * 
  */
+@Singleton
+// injected only once per node
 public class ZkClientProvider implements Provider<ZkClient> {
 
     private final ZkClient zkClient;
@@ -32,6 +33,8 @@ public class ZkClientProvider implements Provider<ZkClient> {
 
     @Override
     public ZkClient get() {
+        // reuses initialized instance
         return zkClient;
+
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1eb5c87a/subprojects/s4-core/src/main/java/org/apache/s4/core/ft/NoOpCheckpointingFramework.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/ft/NoOpCheckpointingFramework.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/ft/NoOpCheckpointingFramework.java
index 86afc61..ba8115e 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/ft/NoOpCheckpointingFramework.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/ft/NoOpCheckpointingFramework.java
@@ -20,10 +20,13 @@ package org.apache.s4.core.ft;
 
 import org.apache.s4.core.ProcessingElement;
 
+import com.google.inject.Singleton;
+
 /**
  * Implementation of {@link CheckpointingFramework} that does NO checkpointing.
- *
+ * 
  */
+@Singleton
 public final class NoOpCheckpointingFramework implements CheckpointingFramework {
 
     @Override


[06/50] [abbrv] git commit: Merge branch 'S4-97' into dev

Posted by mm...@apache.org.
Merge branch 'S4-97' into dev


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

Branch: refs/heads/master
Commit: 7eaf5ec5c43b173208c15d9ed33bc9b822134994
Parents: 4429bef 61f4321
Author: Daniel Gómez Ferro <df...@apache.org>
Authored: Tue Mar 5 17:39:38 2013 +0100
Committer: Daniel Gómez Ferro <df...@apache.org>
Committed: Tue Mar 5 17:39:38 2013 +0100

----------------------------------------------------------------------
 .rat-excludes          |   19 +++++++++++++++++++
 build.gradle           |    7 +++++++
 lib/apache-rat-0.8.jar |  Bin 0 -> 1165578 bytes
 3 files changed, 26 insertions(+), 0 deletions(-)
----------------------------------------------------------------------



[18/50] [abbrv] git commit: S4-123 Javadoc updates

Posted by mm...@apache.org.
S4-123 Javadoc updates


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

Branch: refs/heads/master
Commit: 66c81de070e438e090092eeb30688e34ae7309a1
Parents: eb20b95
Author: Matthieu Morel <mm...@apache.org>
Authored: Sat Mar 9 15:49:00 2013 +0100
Committer: Matthieu Morel <mm...@apache.org>
Committed: Sat Mar 9 20:39:18 2013 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/s4/base/Event.java    |    3 +
 .../java/org/apache/s4/base/GenericKeyFinder.java  |    8 +-
 .../src/main/java/org/apache/s4/base/Key.java      |    2 +-
 .../main/java/org/apache/s4/base/KeyFinder.java    |    3 +
 .../main/java/org/apache/s4/base/package-info.java |    2 +-
 .../java/org/apache/s4/base/util/S4RLoader.java    |    4 +-
 .../org/apache/s4/benchmark/dag/package-info.java  |   22 ++++
 .../apache/s4/benchmark/prodcon/package-info.java  |   22 ++++
 .../apache/s4/benchmark/utils/package-info.java    |   22 ++++
 .../org/apache/s4/comm/staging/package-info.java   |   22 ++++
 .../main/java/org/apache/s4/core/AppModule.java    |   13 +++
 .../main/java/org/apache/s4/core/BaseModule.java   |    4 +
 .../java/org/apache/s4/core/DefaultCoreModule.java |    3 +-
 .../org/apache/s4/core/DefaultRemoteSenders.java   |    3 +
 .../java/org/apache/s4/core/ProcessingElement.java |    4 +-
 .../main/java/org/apache/s4/core/ReceiverImpl.java |    4 +-
 .../main/java/org/apache/s4/core/RemoteSender.java |    2 +-
 .../main/java/org/apache/s4/core/SenderImpl.java   |    8 ++-
 .../org/apache/s4/core/adapter/AdapterApp.java     |    2 +
 .../main/java/org/apache/s4/core/package-info.java |    4 +-
 ...ottlingRemoteSendersExecutorServiceFactory.java |    3 +-
 .../org/apache/s4/core/staging/package-info.java   |   25 +++++
 .../java/org/apache/s4/core/util/AppConfig.java    |    5 +
 .../java/org/apache/s4/core/util/S4Metrics.java    |    4 +
 .../s4/core/window/AbstractSlidingWindowPE.java    |   19 +++-
 .../java/org/apache/s4/core/window/OHCLSlot.java   |   79 --------------
 .../java/org/apache/s4/core/window/OHLCSlot.java   |   82 +++++++++++++++
 .../org/apache/s4/core/window/package-info.java    |    5 +-
 .../java/org/apache/s4/deploy/DeploymentUtils.java |   15 +++
 .../java/org/apache/s4/deploy/package-info.java    |    3 +-
 .../main/java/org/apache/s4/tools/CreateApp.java   |    3 +
 .../java/org/apache/s4/tools/DefineCluster.java    |    3 +
 .../src/main/java/org/apache/s4/tools/Deploy.java  |    9 +-
 .../org/apache/s4/tools/FileExistsValidator.java   |    3 +
 .../src/main/java/org/apache/s4/tools/Package.java |    6 +-
 .../main/java/org/apache/s4/tools/S4ArgsBase.java  |    3 +
 .../src/main/java/org/apache/s4/tools/Status.java  |    4 +
 .../src/main/java/org/apache/s4/tools/Tools.java   |    3 +
 .../main/java/org/apache/s4/tools/ZKServer.java    |    4 +
 39 files changed, 328 insertions(+), 107 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-base/src/main/java/org/apache/s4/base/Event.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-base/src/main/java/org/apache/s4/base/Event.java b/subprojects/s4-base/src/main/java/org/apache/s4/base/Event.java
index aaf8649..3fd4eca 100644
--- a/subprojects/s4-base/src/main/java/org/apache/s4/base/Event.java
+++ b/subprojects/s4-base/src/main/java/org/apache/s4/base/Event.java
@@ -31,6 +31,9 @@ import com.google.common.primitives.Primitives;
  * for inter-application communication. For greater efficiency and type safety, extend this class to create custom event
  * types.
  * 
+ * <p>
+ * <b>NOTE: Events are conceptually immutable but this is not currently enforced, therefore one must take care to ensure
+ * that events are not modified and reused after creation.
  * 
  */
 public class Event {

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-base/src/main/java/org/apache/s4/base/GenericKeyFinder.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-base/src/main/java/org/apache/s4/base/GenericKeyFinder.java b/subprojects/s4-base/src/main/java/org/apache/s4/base/GenericKeyFinder.java
index 56a5d47..36dbbcc 100644
--- a/subprojects/s4-base/src/main/java/org/apache/s4/base/GenericKeyFinder.java
+++ b/subprojects/s4-base/src/main/java/org/apache/s4/base/GenericKeyFinder.java
@@ -27,8 +27,10 @@ import org.slf4j.LoggerFactory;
 import com.google.common.collect.Lists;
 
 /**
- * Use introspection on the target Event to create the key finder. The search for the key is as follows:
  * 
+ * Implementation of {@link KeyFinder} that uses introspection on the target Event to create the key finder.
+ * <p>
+ * The search for the key is as follows:
  * <p>
  * <ul>
  * <li>If the event object class extends {@link Event}, find a field that matches the key name.
@@ -44,8 +46,8 @@ public class GenericKeyFinder<T extends Event> implements KeyFinder<T> {
     private static final Logger logger = LoggerFactory.getLogger(GenericKeyFinder.class);
 
     final private String keyName;
-    private Class<T> eventType;
-    private Field field;
+    private final Class<T> eventType;
+    private final Field field;
 
     public GenericKeyFinder(String keyName, Class<T> eventType) throws SecurityException {
         this.keyName = keyName;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-base/src/main/java/org/apache/s4/base/Key.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-base/src/main/java/org/apache/s4/base/Key.java b/subprojects/s4-base/src/main/java/org/apache/s4/base/Key.java
index ef959f6..35b6b8e 100644
--- a/subprojects/s4-base/src/main/java/org/apache/s4/base/Key.java
+++ b/subprojects/s4-base/src/main/java/org/apache/s4/base/Key.java
@@ -26,7 +26,7 @@ import org.apache.commons.lang.StringUtils;
  * The Key class is used to get the value of the key on a specific type of event. This is done to abstract all the
  * complexity required to get the value. The method for getting the value is implemented in a method of an object of
  * type KeyFinder<T>.
- * 
+ * <p>
  * The application programmer provides the events and the corresponding finders. The framework will use it to key on
  * events.
  */

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-base/src/main/java/org/apache/s4/base/KeyFinder.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-base/src/main/java/org/apache/s4/base/KeyFinder.java b/subprojects/s4-base/src/main/java/org/apache/s4/base/KeyFinder.java
index c1aa1f2..125a77f 100644
--- a/subprojects/s4-base/src/main/java/org/apache/s4/base/KeyFinder.java
+++ b/subprojects/s4-base/src/main/java/org/apache/s4/base/KeyFinder.java
@@ -23,6 +23,9 @@ import java.util.List;
 /**
  * The KeyFinder returns a list with one or more String values (One value for single keys, and more than one value for
  * composite keys.)
+ * <p>
+ * It is used to identify keys within {@link Event}s. See {@link Key} for more information.
+ * 
  * */
 public interface KeyFinder<T extends Event> {
 

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-base/src/main/java/org/apache/s4/base/package-info.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-base/src/main/java/org/apache/s4/base/package-info.java b/subprojects/s4-base/src/main/java/org/apache/s4/base/package-info.java
index f046e96..4f17f3b 100644
--- a/subprojects/s4-base/src/main/java/org/apache/s4/base/package-info.java
+++ b/subprojects/s4-base/src/main/java/org/apache/s4/base/package-info.java
@@ -17,7 +17,7 @@
  */
 
 /**
- * Defines some of the basic elements of the S4 platforms.
+ * Defines some of the fundamental elements of the S4 platform.
  *
  * 
  * 

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-base/src/main/java/org/apache/s4/base/util/S4RLoader.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-base/src/main/java/org/apache/s4/base/util/S4RLoader.java b/subprojects/s4-base/src/main/java/org/apache/s4/base/util/S4RLoader.java
index ca75722..4083ab8 100644
--- a/subprojects/s4-base/src/main/java/org/apache/s4/base/util/S4RLoader.java
+++ b/subprojects/s4-base/src/main/java/org/apache/s4/base/util/S4RLoader.java
@@ -26,8 +26,8 @@ import java.net.URLClassLoader;
  * <ul>
  * <li>Application classes in an S4R archive</li>
  * <li>Application dependencies from an S4R archive</li>
- * <li>Classes dynamically generated
- * 
+ * <li>Classes dynamically generated (proxies)
+ * </ul>
  */
 public class S4RLoader extends URLClassLoader {
 

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/dag/package-info.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/dag/package-info.java b/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/dag/package-info.java
new file mode 100644
index 0000000..220c9c6
--- /dev/null
+++ b/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/dag/package-info.java
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Simple example application
+ */
+package org.apache.s4.benchmark.dag;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/prodcon/package-info.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/prodcon/package-info.java b/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/prodcon/package-info.java
new file mode 100644
index 0000000..2befefe
--- /dev/null
+++ b/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/prodcon/package-info.java
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Simple example application
+ */
+package org.apache.s4.benchmark.prodcon;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/utils/package-info.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/utils/package-info.java b/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/utils/package-info.java
new file mode 100644
index 0000000..e0d836f
--- /dev/null
+++ b/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/utils/package-info.java
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Event injection utilities
+ */
+package org.apache.s4.benchmark.utils;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/package-info.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/package-info.java b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/package-info.java
new file mode 100644
index 0000000..b08ae4e
--- /dev/null
+++ b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/package-info.java
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * S4 follows a staged event driven architecture and this package defines executors for handling events.
+ */
+package org.apache.s4.comm.staging;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-core/src/main/java/org/apache/s4/core/AppModule.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/AppModule.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/AppModule.java
index 20556f8..fcfa7fe 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/AppModule.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/AppModule.java
@@ -4,12 +4,25 @@ import org.apache.s4.base.Listener;
 import org.apache.s4.base.Receiver;
 import org.apache.s4.base.Sender;
 import org.apache.s4.base.SerializerDeserializer;
+import org.apache.s4.base.util.S4RLoader;
 import org.apache.s4.comm.serialize.SerializerDeserializerFactory;
 import org.apache.s4.comm.tcp.TCPListener;
 
 import com.google.inject.AbstractModule;
 import com.google.inject.Provides;
 
+/**
+ * This module is expected to be loaded with knowledge of the S4 appl classes. It can therefore bind dependencies which
+ * also require knowledge of application classes (e.g. for deserialization).
+ * 
+ * This class is therefore loaded:
+ * <ul>
+ * <li>through the {@link S4RLoader} when the application is normally deployed / configured
+ * <li>directly with the node classloader when the application classes are already in the classpath, for instance for
+ * testing.
+ * </ul>
+ * 
+ */
 public class AppModule extends AbstractModule {
 
     ClassLoader appClassLoader;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-core/src/main/java/org/apache/s4/core/BaseModule.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/BaseModule.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/BaseModule.java
index 6eda37d..e0bd0e0 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/BaseModule.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/BaseModule.java
@@ -18,6 +18,10 @@ import com.google.inject.AbstractModule;
 import com.google.inject.Binder;
 import com.google.inject.name.Names;
 
+/**
+ * This module binds the minimum set of classes required for a node to "bootstrap", i.e. connect to the cluster manager
+ * and be able to read and fetch configuration data.
+ */
 public class BaseModule extends AbstractModule {
 
     private static Logger logger = LoggerFactory.getLogger(BaseModule.class);

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-core/src/main/java/org/apache/s4/core/DefaultCoreModule.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/DefaultCoreModule.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/DefaultCoreModule.java
index ee28e53..2353fb0 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/DefaultCoreModule.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/DefaultCoreModule.java
@@ -49,7 +49,8 @@ import com.google.inject.name.Named;
 import com.google.inject.name.Names;
 
 /**
- * Default module allowing assignment from ZK, communication through Netty, and distributed deployment management
+ * This module binds the different services required by an app, except for the connectivity to the cluster manager and
+ * the communication layer.
  * 
  */
 public class DefaultCoreModule extends AbstractModule {

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-core/src/main/java/org/apache/s4/core/DefaultRemoteSenders.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/DefaultRemoteSenders.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/DefaultRemoteSenders.java
index e49608f..9cf55ad 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/DefaultRemoteSenders.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/DefaultRemoteSenders.java
@@ -38,6 +38,9 @@ import org.slf4j.LoggerFactory;
 import com.google.inject.Inject;
 import com.google.inject.Singleton;
 
+/**
+ * Default {@link RemoteSenders} implementation for sending events to nodes of a remote cluster.
+ */
 @Singleton
 public class DefaultRemoteSenders implements RemoteSenders {
 

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-core/src/main/java/org/apache/s4/core/ProcessingElement.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/ProcessingElement.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/ProcessingElement.java
index d3f5c7d..fb49bbb 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/ProcessingElement.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/ProcessingElement.java
@@ -97,8 +97,8 @@ import com.yammer.metrics.core.TimerContext;
  *           ...
  * 
  *           onCreate() {
- *           wordCount = new HashMap<String, Integer>;
- *           logger.trace("Created a map for instance PE with id {}, getId());
+ *               wordCount = new HashMap<String, Integer>;
+ *               logger.trace("Created a map for instance PE with id {}, getId());
  *           }
  *         }
  *         </pre>

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-core/src/main/java/org/apache/s4/core/ReceiverImpl.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/ReceiverImpl.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/ReceiverImpl.java
index fff4bfd..ec56f2c 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/ReceiverImpl.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/ReceiverImpl.java
@@ -39,8 +39,8 @@ import com.google.inject.Singleton;
  * {@link ReceiverImpl} is responsible for receiving an event to a {@link ProcessingElement} instance using a hashKey.
  * <p>
  * A Listener implementation receives data from the network and passes an event as a byte array to the
- * {@link ReceiverImpl}. The byte array is de-serialized and converted into an {@link Event}. Finally the event is
- * passed to the matching streams.
+ * {@link ReceiverImpl}. The byte array is deserialized and converted into an {@link Event}. Finally the event is passed
+ * to the matching streams.
  * </p>
  * There is a single {@link ReceiverImpl} instance per node.
  * 

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-core/src/main/java/org/apache/s4/core/RemoteSender.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/RemoteSender.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/RemoteSender.java
index dba8b6c..428a737 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/RemoteSender.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/RemoteSender.java
@@ -25,7 +25,7 @@ import org.apache.s4.base.Emitter;
 import org.apache.s4.base.Hasher;
 
 /**
- * Sends events to a remote cluster.
+ * Sends events to a remote cluster (round-robin by default).
  * 
  */
 public class RemoteSender {

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-core/src/main/java/org/apache/s4/core/SenderImpl.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/SenderImpl.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/SenderImpl.java
index 70e159a..209cd15 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/SenderImpl.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/SenderImpl.java
@@ -52,7 +52,7 @@ public class SenderImpl implements Sender, ClusterChangeListener {
     final private Emitter emitter;
     final private SerializerDeserializer serDeser;
     final private Hasher hasher;
-    private Cluster cluster;
+    private final Cluster cluster;
 
     Assignment assignment;
     private int localPartitionId = -1;
@@ -70,6 +70,12 @@ public class SenderImpl implements Sender, ClusterChangeListener {
      *            a serialization mechanism.
      * @param hasher
      *            a hashing function to map keys to partition IDs.
+     * @param assignment
+     *            partition assignment from the cluster manager
+     * @param senderExecutorServiceFactory
+     *            factory for creating sender executors
+     * @param cluster
+     *            cluster information
      */
     @Inject
     public SenderImpl(Emitter emitter, SerializerDeserializer serDeser, Hasher hasher, Assignment assignment,

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-core/src/main/java/org/apache/s4/core/adapter/AdapterApp.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/adapter/AdapterApp.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/adapter/AdapterApp.java
index f0c45a9..d5a7b7c 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/adapter/AdapterApp.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/adapter/AdapterApp.java
@@ -28,6 +28,8 @@ import com.google.inject.name.Named;
 
 /**
  * Base class for adapters. For now, it provides facilities for automatically creating an output stream.
+ * <p>
+ * This class can be used for easing the injection of events into S4 applications.
  * 
  */
 public abstract class AdapterApp extends App {

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-core/src/main/java/org/apache/s4/core/package-info.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/package-info.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/package-info.java
index d10ad56..a9c7ed9 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/package-info.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/package-info.java
@@ -17,7 +17,9 @@
  */
 
 /**
- * Key classes of the S4 platform, implementing concepts such as Stream, Processing Element.
+ * Key classes of the S4 platform, implementing concepts such as Stream, 
+ * Processing Element, as well as modules defining the default injections for 
+ * building the platform.
  */
 package org.apache.s4.core;
 

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/ThrottlingRemoteSendersExecutorServiceFactory.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/ThrottlingRemoteSendersExecutorServiceFactory.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/ThrottlingRemoteSendersExecutorServiceFactory.java
index 8b1c4f2..4d97c47 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/ThrottlingRemoteSendersExecutorServiceFactory.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/ThrottlingRemoteSendersExecutorServiceFactory.java
@@ -5,8 +5,9 @@ import com.google.inject.name.Named;
 
 /**
  * 
+ * Throttling implementation of the remote senders executor factory. It clones the implementation of the
+ * {@link ThrottlingSenderExecutorServiceFactory} class.
  * 
- *
  */
 public class ThrottlingRemoteSendersExecutorServiceFactory extends ThrottlingSenderExecutorServiceFactory implements
         RemoteSendersExecutorServiceFactory {

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/package-info.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/package-info.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/package-info.java
new file mode 100644
index 0000000..91879c1
--- /dev/null
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/package-info.java
@@ -0,0 +1,25 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * S4 follows a staged event driven architecture and this package defines executors 
+ * for handling events. Executors can exhibit various behaviours such as
+ * blocking, throttling, or shedding. Implementations are injected in 
+ * modules and therefore can be overriden easily by providing custom modules. 
+ */
+package org.apache.s4.core.staging;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-core/src/main/java/org/apache/s4/core/util/AppConfig.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/util/AppConfig.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/util/AppConfig.java
index a31ff17..2a75f28 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/util/AppConfig.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/util/AppConfig.java
@@ -7,6 +7,11 @@ import java.util.Map;
 
 import org.apache.s4.comm.topology.ZNRecord;
 
+/**
+ * Container for application parameters, with facilities to write and read the configuration from ZooKeeper.
+ * <p>
+ * Can be constructed through a builder pattern.
+ */
 public class AppConfig {
 
     public static final String NAMED_PARAMETERS = "namedParams";

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-core/src/main/java/org/apache/s4/core/util/S4Metrics.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/util/S4Metrics.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/util/S4Metrics.java
index 520e48e..122f12c 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/util/S4Metrics.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/util/S4Metrics.java
@@ -30,6 +30,10 @@ import com.yammer.metrics.core.Meter;
 import com.yammer.metrics.reporting.ConsoleReporter;
 import com.yammer.metrics.reporting.CsvReporter;
 
+/**
+ * Utility class for centralizing system runtime metrics, such as information about event processing rates, cache
+ * eviction etc...
+ */
 @Singleton
 public class S4Metrics {
 

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-core/src/main/java/org/apache/s4/core/window/AbstractSlidingWindowPE.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/window/AbstractSlidingWindowPE.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/window/AbstractSlidingWindowPE.java
index 3c3cd67..e0ec20f 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/window/AbstractSlidingWindowPE.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/window/AbstractSlidingWindowPE.java
@@ -52,6 +52,9 @@ import com.google.common.util.concurrent.ThreadFactoryBuilder;
  * 
  * @param <U>
  *            type of the values added to the window slots
+ * @param <V>
+ *            type of result of window evaluation (computed from the content of the slots in the window, can be of a
+ *            type different than the content of the slots)
  */
 public abstract class AbstractSlidingWindowPE<T extends Slot<U>, U, V> extends ProcessingElement {
 
@@ -77,6 +80,10 @@ public abstract class AbstractSlidingWindowPE<T extends Slot<U>, U, V> extends P
      *            the application
      * @param numSlots
      *            the number of slots to be stored
+     * @param slotCapacity
+     *            capacity of a slot
+     * @param slotFactory
+     *            factory class for creating slots
      */
     public AbstractSlidingWindowPE(App app, int numSlots, long slotCapacity, SlotFactory<T> slotFactory) {
         this(app, 0L, null, numSlots, slotFactory, slotCapacity);
@@ -93,6 +100,8 @@ public abstract class AbstractSlidingWindowPE<T extends Slot<U>, U, V> extends P
      *            the unit of time
      * @param numSlots
      *            the number of slots to be stored
+     * @param slotFactory
+     *            factory class for creating slots
      */
     public AbstractSlidingWindowPE(App app, long slotDuration, TimeUnit timeUnit, int numSlots,
             SlotFactory<T> slotFactory) {
@@ -148,12 +157,19 @@ public abstract class AbstractSlidingWindowPE<T extends Slot<U>, U, V> extends P
      * User provided function that evaluates the whole content of the window. It must iterate across all slots. Current
      * slots are passed as a parameter and the PE instance is expected to be locked so that iteration over the slots is
      * safe.
+     * 
+     * @param result
+     *            result of evaluation
      */
     abstract protected V evaluateWindow(Collection<T> slots);
 
     /**
      * Add a slot to the sliding window. Called automatically for periodic slots. Use it when the window is not
      * periodic.
+     * <p>
+     * This might also be a good place - by overriding this method - to compute something from the content of the
+     * previous slot or of the current window, before adding a new slot.
+     * 
      */
     protected final void addSlot() {
 
@@ -161,9 +177,10 @@ public abstract class AbstractSlidingWindowPE<T extends Slot<U>, U, V> extends P
             logger.error("Calling method addSlot() in a periodic window is not allowed.");
             return;
         }
-        addNewSlot((AbstractSlidingWindowPE<T, U, V>) this);
+        addNewSlot(this);
     }
 
+    @Override
     protected void onCreate() {
         eventCount = 0;
         circularBuffer = new CircularFifoBuffer<T>(numSlots);

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-core/src/main/java/org/apache/s4/core/window/OHCLSlot.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/window/OHCLSlot.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/window/OHCLSlot.java
deleted file mode 100644
index 6860f2d..0000000
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/window/OHCLSlot.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.s4.core.window;
-
-public class OHCLSlot implements Slot<Double> {
-
-    double open = -1;
-    double high = -1;
-    double low = -1;
-    double close = -1;
-    long ticks = 0;
-    boolean isOpen;
-
-    @Override
-    public void update(Double data) {
-        if (isOpen) {
-            if (open == -1) {
-                open = low = high = close = data;
-            } else if (data > high) {
-                high = data;
-            } else if (data < low) {
-                low = data;
-            }
-            close = data;
-            ticks++;
-        }
-    }
-
-    @Override
-    public void close() {
-        isOpen = false;
-    }
-
-    double getOpen() {
-        return open;
-    }
-
-    double getClose() {
-        return close;
-    }
-
-    double getHigh() {
-        return high;
-    }
-
-    double getLow() {
-        return low;
-    }
-
-    long getTicksCount() {
-        return ticks;
-    }
-
-    public static class OHCLSlotFactory implements SlotFactory<OHCLSlot> {
-
-        @Override
-        public OHCLSlot createSlot() {
-            return new OHCLSlot();
-        }
-
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-core/src/main/java/org/apache/s4/core/window/OHLCSlot.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/window/OHLCSlot.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/window/OHLCSlot.java
new file mode 100644
index 0000000..c3921e7
--- /dev/null
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/window/OHLCSlot.java
@@ -0,0 +1,82 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.s4.core.window;
+
+/**
+ * Open - high - low -close slot as typically used in financial data and useful for summarizing data.
+ */
+public class OHLCSlot implements Slot<Double> {
+
+    double open = -1;
+    double high = -1;
+    double low = -1;
+    double close = -1;
+    long ticks = 0;
+    boolean isOpen;
+
+    @Override
+    public void update(Double data) {
+        if (isOpen) {
+            if (open == -1) {
+                open = low = high = close = data;
+            } else if (data > high) {
+                high = data;
+            } else if (data < low) {
+                low = data;
+            }
+            close = data;
+            ticks++;
+        }
+    }
+
+    @Override
+    public void close() {
+        isOpen = false;
+    }
+
+    double getOpen() {
+        return open;
+    }
+
+    double getClose() {
+        return close;
+    }
+
+    double getHigh() {
+        return high;
+    }
+
+    double getLow() {
+        return low;
+    }
+
+    long getTicksCount() {
+        return ticks;
+    }
+
+    public static class OHLCSlotFactory implements SlotFactory<OHLCSlot> {
+
+        @Override
+        public OHLCSlot createSlot() {
+            return new OHLCSlot();
+        }
+
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-core/src/main/java/org/apache/s4/core/window/package-info.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/window/package-info.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/window/package-info.java
index b6e13f0..eab8432 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/window/package-info.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/window/package-info.java
@@ -18,8 +18,9 @@
 
 /**
  * Provides facilities for processing events as samples, through time or count-based windows. 
- * Currently we only provide a facility for sliding windows.
+ * <p>
+ * Currently we only provide a facility for sliding windows, however the available implementations 
+ * can be used as examples for implementing more sophisticated or customized windows. 
  * 
- * NOTE: we are still working on improving the API here.
  */
 package org.apache.s4.core.window;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-core/src/main/java/org/apache/s4/deploy/DeploymentUtils.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/deploy/DeploymentUtils.java b/subprojects/s4-core/src/main/java/org/apache/s4/deploy/DeploymentUtils.java
index cc404af..e9c59e1 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/deploy/DeploymentUtils.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/deploy/DeploymentUtils.java
@@ -9,10 +9,25 @@ import org.apache.zookeeper.CreateMode;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+/**
+ * Utility class for facilitating deployment and configuration operations.
+ */
 public class DeploymentUtils {
 
     private static Logger logger = LoggerFactory.getLogger(DeploymentUtils.class);
 
+    /**
+     * Uploads an application configuration to the cluster manager
+     * 
+     * @param appConfig
+     *            application configuration
+     * @param clusterName
+     *            name of the S4 cluster
+     * @param deleteIfExists
+     *            deletes previous configuration if it existed
+     * @param zkString
+     *            ZooKeeper connection string (connection to the cluster manager)
+     */
     public static void initAppConfig(AppConfig appConfig, String clusterName, boolean deleteIfExists, String zkString) {
         ZkClient zk = new ZkClient(zkString);
         ZkSerializer serializer = new ZNRecordSerializer();

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-core/src/main/java/org/apache/s4/deploy/package-info.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/deploy/package-info.java b/subprojects/s4-core/src/main/java/org/apache/s4/deploy/package-info.java
index 7afa272..1377489 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/deploy/package-info.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/deploy/package-info.java
@@ -17,7 +17,6 @@
  */
 
 /**
- * Dynamic application deployment framework, that allows identifying new available applications,
- * downloading them through various protocols, loading them and starting them in the current S4 node.
+ * Utility classes related to the deployment and configuration of S4 apps.
  */
 package org.apache.s4.deploy;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-tools/src/main/java/org/apache/s4/tools/CreateApp.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/CreateApp.java b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/CreateApp.java
index d15ce87..4b2a476 100644
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/CreateApp.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/CreateApp.java
@@ -33,6 +33,9 @@ import com.google.common.io.Files;
 import com.google.common.io.LineProcessor;
 import com.google.common.io.Resources;
 
+/**
+ * Creates a template S4 project
+ */
 public class CreateApp extends S4ArgsBase {
 
     static Logger logger = LoggerFactory.getLogger(CreateApp.class);

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-tools/src/main/java/org/apache/s4/tools/DefineCluster.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/DefineCluster.java b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/DefineCluster.java
index bd0deec..11d4307 100644
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/DefineCluster.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/DefineCluster.java
@@ -25,6 +25,9 @@ import org.slf4j.LoggerFactory;
 import com.beust.jcommander.Parameter;
 import com.beust.jcommander.Parameters;
 
+/**
+ * Defines an S4 cluster in the cluster manager.
+ */
 public class DefineCluster {
 
     static Logger logger = LoggerFactory.getLogger(DefineCluster.class);

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
index de145cf..c255bcc 100644
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
@@ -46,13 +46,13 @@ import com.google.common.base.Strings;
 import com.google.common.io.ByteStreams;
 import com.google.common.io.Files;
 
+/**
+ * Deploys and S4 application configuration into the cluster manager
+ */
 public class Deploy extends S4ArgsBase {
 
     static org.slf4j.Logger logger = LoggerFactory.getLogger(Deploy.class);
 
-    /**
-     * @param args
-     */
     public static void main(String[] args) {
 
         DeployAppArgs deployArgs = new DeployAppArgs();
@@ -89,8 +89,7 @@ public class Deploy extends S4ArgsBase {
                 params.add("-appClass=" + deployArgs.appClass);
                 params.add("-appName=" + deployArgs.appName);
                 params.add(deployArgs.appName);
-                ExecGradle.exec(deployArgs.gradleBuildFile, "s4r", params.toArray(new String[] {}),
-                        deployArgs.debug);
+                ExecGradle.exec(deployArgs.gradleBuildFile, "s4r", params.toArray(new String[] {}), deployArgs.debug);
                 File s4rFile = new File(deployArgs.gradleBuildFile.getParentFile(), "/build/libs/" + deployArgs.appName
                         + ".s4r");
                 if (!Strings.isNullOrEmpty(deployArgs.generatedS4R)) {

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-tools/src/main/java/org/apache/s4/tools/FileExistsValidator.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/FileExistsValidator.java b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/FileExistsValidator.java
index 820ac91..93ed826 100644
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/FileExistsValidator.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/FileExistsValidator.java
@@ -23,6 +23,9 @@ import java.io.File;
 import com.beust.jcommander.IParameterValidator;
 import com.beust.jcommander.ParameterException;
 
+/**
+ * Utility class for validating file arguments
+ */
 public class FileExistsValidator implements IParameterValidator {
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Package.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Package.java b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Package.java
index 209b5e9..c0f3518 100644
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Package.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Package.java
@@ -29,6 +29,9 @@ import com.beust.jcommander.Parameter;
 import com.beust.jcommander.Parameters;
 import com.beust.jcommander.converters.FileConverter;
 
+/**
+ * Packages an S4 application and dependencies into an S4R file, i.e. a jar file with some S4 specific meta information.
+ */
 public class Package extends S4ArgsBase {
 
     public static void main(String[] args) {
@@ -40,8 +43,7 @@ public class Package extends S4ArgsBase {
             // prepare gradle -P parameters, including passed gradle opts
             params.add("appClass=" + packageArgs.appClass);
             params.add("appName=" + packageArgs.appName.get(0));
-            ExecGradle.exec(packageArgs.gradleBuildFile, "s4r", params.toArray(new String[] {}),
-                    packageArgs.debug);
+            ExecGradle.exec(packageArgs.gradleBuildFile, "s4r", params.toArray(new String[] {}), packageArgs.debug);
 
             // Explicitly shutdown the JVM since Gradle leaves non-daemon threads running that delay the termination
             System.exit(0);

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-tools/src/main/java/org/apache/s4/tools/S4ArgsBase.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/S4ArgsBase.java b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/S4ArgsBase.java
index fb9a0f4..9133b2b 100644
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/S4ArgsBase.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/S4ArgsBase.java
@@ -24,6 +24,9 @@ import java.util.List;
 import com.beust.jcommander.IStringConverter;
 import com.beust.jcommander.Parameter;
 
+/**
+ * Common parameters for S4 commands
+ */
 public abstract class S4ArgsBase {
 
     @Parameter(names = "-help", description = "usage")

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Status.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Status.java b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Status.java
index 11fe2cd..418f01b 100644
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Status.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Status.java
@@ -38,6 +38,10 @@ import com.beust.jcommander.Parameter;
 import com.beust.jcommander.Parameters;
 import com.google.common.collect.Maps;
 
+/**
+ * A utility for visualizing information about S4 clusters: provides data about existing clusters, deployed
+ * applications, exported streams, live nodes
+ */
 public class Status extends S4ArgsBase {
     static Logger logger = LoggerFactory.getLogger(Status.class);
 

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Tools.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Tools.java b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Tools.java
index 832cfcc..9dd4a60 100644
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Tools.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Tools.java
@@ -34,6 +34,9 @@ import com.beust.jcommander.Parameter;
 import com.beust.jcommander.Parameters;
 import com.google.common.collect.Sets;
 
+/**
+ * Utility for dispatching commands to the matching implementation classes
+ */
 public class Tools {
 
     static Logger logger = LoggerFactory.getLogger(Tools.class);

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/66c81de0/subprojects/s4-tools/src/main/java/org/apache/s4/tools/ZKServer.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/ZKServer.java b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/ZKServer.java
index 63b3eb1..ad36081 100644
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/ZKServer.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/ZKServer.java
@@ -37,6 +37,10 @@ import com.beust.jcommander.IStringConverter;
 import com.beust.jcommander.Parameter;
 import com.beust.jcommander.Parameters;
 
+/**
+ * Utility for running a simple ZooKeeper server instance. Useful for testing and prototyping but not adequate for
+ * integration/production deployments.
+ */
 public class ZKServer {
 
     private static final String TEST_MODE_CLUSTER_CONF_2 = "c=testCluster2:flp=13000:nbTasks=1";


[34/50] [abbrv] git commit: Update year

Posted by mm...@apache.org.
Update year


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

Branch: refs/heads/master
Commit: 632057fd3228de31e11996cd7eb35bdb8755a02b
Parents: 4edffbf
Author: Matthieu Morel <mm...@apache.org>
Authored: Tue Mar 12 13:00:22 2013 +0100
Committer: Matthieu Morel <mm...@apache.org>
Committed: Tue Mar 12 13:00:22 2013 +0100

----------------------------------------------------------------------
 NOTICE.txt                   |    2 +-
 config/binrelease/NOTICE.txt |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/632057fd/NOTICE.txt
----------------------------------------------------------------------
diff --git a/NOTICE.txt b/NOTICE.txt
index 578e5d5..5592baa 100644
--- a/NOTICE.txt
+++ b/NOTICE.txt
@@ -1,5 +1,5 @@
 Apache S4
-Copyright 2012 The Apache Software Foundation
+Copyright 2013 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/632057fd/config/binrelease/NOTICE.txt
----------------------------------------------------------------------
diff --git a/config/binrelease/NOTICE.txt b/config/binrelease/NOTICE.txt
index cccdafb..b864661 100644
--- a/config/binrelease/NOTICE.txt
+++ b/config/binrelease/NOTICE.txt
@@ -1,5 +1,5 @@
 Apache S4
-Copyright 2012 The Apache Software Foundation
+Copyright 2013 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).


[11/50] [abbrv] git commit: S4-126: Remove duplicate log

Posted by mm...@apache.org.
S4-126: Remove duplicate log

Patch by Aimee Cheng


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

Branch: refs/heads/master
Commit: 23ba4668c369256e26b1118b9ad19e3fd239151d
Parents: c8f070a
Author: Daniel Gómez Ferro <df...@apache.org>
Authored: Thu Mar 7 11:28:53 2013 +0100
Committer: Daniel Gómez Ferro <df...@apache.org>
Committed: Thu Mar 7 11:29:30 2013 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/s4/tools/CreateApp.java   |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/23ba4668/subprojects/s4-tools/src/main/java/org/apache/s4/tools/CreateApp.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/CreateApp.java b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/CreateApp.java
index 3d09186..d15ce87 100644
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/CreateApp.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/CreateApp.java
@@ -121,14 +121,12 @@ public class CreateApp extends S4ArgsBase {
             });
         } catch (Exception e) {
             logger.error("Could not create project due to [{}]. Please check your configuration.", e.getMessage());
-            logger.error("Could not create project due to [{}]. Please check your configuration.", e.getMessage());
         }
     }
 
     private static void createDir(CreateAppArgs appArgs, String dirName) throws Exception {
         String filePath = appArgs.getAppDir() + dirName;
         if (!new File(filePath).mkdirs()) {
-            logger.error("Cannot create directory [{}], exiting.", filePath);
             throw new Exception("Cannot create directory [" + filePath + "]");
         }
     }


[40/50] [abbrv] git commit: Merge branch 'S4-128' into dev

Posted by mm...@apache.org.
Merge branch 'S4-128' into dev


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

Branch: refs/heads/master
Commit: 02cefdae90d7c54c0cca7d0208f769e1978fe246
Parents: 6fd8f1d bd3d43c
Author: Matthieu Morel <mm...@apache.org>
Authored: Wed Mar 13 16:17:40 2013 +0100
Committer: Matthieu Morel <mm...@apache.org>
Committed: Wed Mar 13 16:17:40 2013 +0100

----------------------------------------------------------------------
 .../s4/core/classloader/TestClassLoader.java       |    6 +++---
 .../apache/s4/deploy/TestAutomaticDeployment.java  |    8 ++++----
 .../s4/deploy/prodcon/TestProducerConsumer.java    |   12 ++++++------
 .../src/main/resources/templates/build.gradle      |    2 ++
 .../test/java/org/apache/s4/tools/TestDeploy.java  |    2 +-
 test-apps/consumer-app/build.gradle                |    2 ++
 test-apps/producer-app/build.gradle                |    2 ++
 test-apps/simple-deployable-app-1/build.gradle     |    2 ++
 test-apps/twitter-adapter/build.gradle             |    4 +++-
 test-apps/twitter-counter/build.gradle             |    2 ++
 10 files changed, 27 insertions(+), 15 deletions(-)
----------------------------------------------------------------------



[37/50] [abbrv] git commit: S4-128 updated existing build files and tests

Posted by mm...@apache.org.
S4-128 updated existing build files and tests


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

Branch: refs/heads/master
Commit: 1495a14d165fe755999c581a6a9e44cd9fc68a97
Parents: 1c62659
Author: Daniel Gómez Ferro <df...@apache.org>
Authored: Wed Mar 13 13:23:08 2013 +0100
Committer: Daniel Gómez Ferro <df...@apache.org>
Committed: Wed Mar 13 13:23:08 2013 +0100

----------------------------------------------------------------------
 .../s4/core/classloader/TestClassLoader.java       |    6 +++---
 .../apache/s4/deploy/TestAutomaticDeployment.java  |    8 ++++----
 .../s4/deploy/prodcon/TestProducerConsumer.java    |   12 ++++++------
 test-apps/consumer-app/build.gradle                |    2 ++
 test-apps/producer-app/build.gradle                |    2 ++
 test-apps/simple-deployable-app-1/build.gradle     |    2 ++
 test-apps/twitter-adapter/build.gradle             |    4 +++-
 test-apps/twitter-counter/build.gradle             |    2 ++
 8 files changed, 24 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1495a14d/subprojects/s4-core/src/test/java/org/apache/s4/core/classloader/TestClassLoader.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/test/java/org/apache/s4/core/classloader/TestClassLoader.java b/subprojects/s4-core/src/test/java/org/apache/s4/core/classloader/TestClassLoader.java
index 3e20343..81a9987 100644
--- a/subprojects/s4-core/src/test/java/org/apache/s4/core/classloader/TestClassLoader.java
+++ b/subprojects/s4-core/src/test/java/org/apache/s4/core/classloader/TestClassLoader.java
@@ -73,9 +73,9 @@ public class TestClassLoader {
         CoreTestUtils.callGradleTask(new File(gradlewFile.getParentFile().getAbsolutePath()
                 + "/test-apps/producer-app/build.gradle"), "s4r", new String[] { "-buildFile="
                 + gradlewFile.getParentFile().getAbsolutePath() + "/test-apps/producer-app/build.gradle",
-                "appClass=s4app.ProducerApp"});
+                "appClass=s4app.ProducerApp", "appName=testApp"});
 
-        Assert.assertTrue(new File(producerS4rDir, "producer-app-0.0.0-SNAPSHOT.s4r").exists());
+        Assert.assertTrue(new File(producerS4rDir, "testApp-0.0.0-SNAPSHOT.s4r").exists());
     }
 
     @Before
@@ -100,7 +100,7 @@ public class TestClassLoader {
     @Test
     public void testInitialDeploymentFromFileSystem() throws Exception {
 
-        File producerS4R = new File(producerS4rDir, "producer-app-0.0.0-SNAPSHOT.s4r");
+        File producerS4R = new File(producerS4rDir, "testApp-0.0.0-SNAPSHOT.s4r");
         String uriProducer = producerS4R.toURI().toString();
 
         initializeS4Node();

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1495a14d/subprojects/s4-core/src/test/java/org/apache/s4/deploy/TestAutomaticDeployment.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/test/java/org/apache/s4/deploy/TestAutomaticDeployment.java b/subprojects/s4-core/src/test/java/org/apache/s4/deploy/TestAutomaticDeployment.java
index 488f5f9..c4ee323 100644
--- a/subprojects/s4-core/src/test/java/org/apache/s4/deploy/TestAutomaticDeployment.java
+++ b/subprojects/s4-core/src/test/java/org/apache/s4/deploy/TestAutomaticDeployment.java
@@ -79,8 +79,8 @@ public class TestAutomaticDeployment extends ZkBasedTest {
         CoreTestUtils.callGradleTask(new File(gradlewFile.getParentFile().getAbsolutePath()
                 + "/test-apps/simple-deployable-app-1/build.gradle"), "s4r", new String[] { "-buildFile="
                 + gradlewFile.getParentFile().getAbsolutePath() + "/test-apps/simple-deployable-app-1/build.gradle", 
-                "appClass=org.apache.s4.deploy.TestApp" });
-        Assert.assertTrue(new File(s4rDir, "simple-deployable-app-1-0.0.0-SNAPSHOT.s4r").exists());
+                "appClass=org.apache.s4.deploy.TestApp", "appName=simpleApp" });
+        Assert.assertTrue(new File(s4rDir, "simpleApp-0.0.0-SNAPSHOT.s4r").exists());
     }
 
     @Test
@@ -90,7 +90,7 @@ public class TestAutomaticDeployment extends ZkBasedTest {
 
         Assert.assertFalse(zkClient.exists(AppConstants.INITIALIZED_ZNODE_1));
 
-        final String uri = new File(s4rDir, "simple-deployable-app-1-0.0.0-SNAPSHOT.s4r").toURI().toString();
+        final String uri = new File(s4rDir, "simpleApp-0.0.0-SNAPSHOT.s4r").toURI().toString();
 
         assertDeployment(uri, zkClient, true);
 
@@ -147,7 +147,7 @@ public class TestAutomaticDeployment extends ZkBasedTest {
         File s4rToDeploy = new File(tmpDir, String.valueOf(System.currentTimeMillis()));
 
         Assert.assertTrue(ByteStreams.copy(
-                Files.newInputStreamSupplier(new File(s4rDir, "/simple-deployable-app-1-0.0.0-SNAPSHOT.s4r")),
+                Files.newInputStreamSupplier(new File(s4rDir, "/simpleApp-0.0.0-SNAPSHOT.s4r")),
                 Files.newOutputStreamSupplier(s4rToDeploy)) > 0);
 
         // we start a

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1495a14d/subprojects/s4-core/src/test/java/org/apache/s4/deploy/prodcon/TestProducerConsumer.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/test/java/org/apache/s4/deploy/prodcon/TestProducerConsumer.java b/subprojects/s4-core/src/test/java/org/apache/s4/deploy/prodcon/TestProducerConsumer.java
index dd4f9ec..666db60 100644
--- a/subprojects/s4-core/src/test/java/org/apache/s4/deploy/prodcon/TestProducerConsumer.java
+++ b/subprojects/s4-core/src/test/java/org/apache/s4/deploy/prodcon/TestProducerConsumer.java
@@ -75,9 +75,9 @@ public class TestProducerConsumer {
         CoreTestUtils.callGradleTask(new File(gradlewFile.getParentFile().getAbsolutePath()
                 + "/test-apps/producer-app/build.gradle"), "s4r", new String[] { "-buildFile="
                 + gradlewFile.getParentFile().getAbsolutePath() + "/test-apps/producer-app/build.gradle",
-                "appClass=s4app.ProducerApp" });
+                "appClass=s4app.ProducerApp", "appName=producer" });
 
-        Assert.assertTrue(new File(producerS4rDir, "producer-app-0.0.0-SNAPSHOT.s4r").exists());
+        Assert.assertTrue(new File(producerS4rDir, "producer-0.0.0-SNAPSHOT.s4r").exists());
 
         CoreTestUtils.callGradleTask(new File(gradlewFile.getParentFile().getAbsolutePath()
                 + "/test-apps/consumer-app/build.gradle"), "clean", new String[] { "-buildFile="
@@ -87,9 +87,9 @@ public class TestProducerConsumer {
         CoreTestUtils.callGradleTask(new File(gradlewFile.getParentFile().getAbsolutePath()
                 + "/test-apps/consumer-app/build.gradle"), "s4r", new String[] { "-buildFile="
                 + gradlewFile.getParentFile().getAbsolutePath() + "/test-apps/consumer-app/build.gradle",
-                "appClass=s4app.ConsumerApp" });
+                "appClass=s4app.ConsumerApp", "appName=consumer" });
 
-        Assert.assertTrue(new File(consumerS4rDir, "consumer-app-0.0.0-SNAPSHOT.s4r").exists());
+        Assert.assertTrue(new File(consumerS4rDir, "consumer-0.0.0-SNAPSHOT.s4r").exists());
     }
 
     @Before
@@ -122,10 +122,10 @@ public class TestProducerConsumer {
     @Test
     public void testInitialDeploymentFromFileSystem() throws Exception {
 
-        File producerS4R = new File(producerS4rDir, "producer-app-0.0.0-SNAPSHOT.s4r");
+        File producerS4R = new File(producerS4rDir, "producer-0.0.0-SNAPSHOT.s4r");
         String uriProducer = producerS4R.toURI().toString();
 
-        File consumerS4R = new File(consumerS4rDir, "consumer-app-0.0.0-SNAPSHOT.s4r");
+        File consumerS4R = new File(consumerS4rDir, "consumer-0.0.0-SNAPSHOT.s4r");
         String uriConsumer = consumerS4R.toURI().toString();
 
         initializeS4Node();

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1495a14d/test-apps/consumer-app/build.gradle
----------------------------------------------------------------------
diff --git a/test-apps/consumer-app/build.gradle b/test-apps/consumer-app/build.gradle
index 69e4532..0011e7d 100644
--- a/test-apps/consumer-app/build.gradle
+++ b/test-apps/consumer-app/build.gradle
@@ -38,6 +38,7 @@
 //s4AppInstallDir = "/tmp/s4Apps" // TODO: decide how to standarize dirs, use env var?
 
 project.ext["appClassName"] = hasProperty('appClass')? "$appClass": "UNDEFINED"
+project.ext["appName"] = hasProperty('appName')? "$appName": "UNDEFINED"
 
 project.ext["s4Version"] = '0.6.0-SNAPSHOT'
 description = 'Apache S4 App'
@@ -145,6 +146,7 @@ task s4r(type: Jar) {
    dependsOn cleanCopyDependenciesToLib, copyDependenciesToLib, cleanBuildProjectJar, buildProjectJar
    from { project.libsDir }
    manifest = project.manifest
+   baseName = appName
    extension = 's4r'
    exclude '*.s4r'
    manifest.mainAttributes('S4-App-Class': appClassName)

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1495a14d/test-apps/producer-app/build.gradle
----------------------------------------------------------------------
diff --git a/test-apps/producer-app/build.gradle b/test-apps/producer-app/build.gradle
index b5b25e3..fa4c2d9 100644
--- a/test-apps/producer-app/build.gradle
+++ b/test-apps/producer-app/build.gradle
@@ -38,6 +38,7 @@
 //s4AppInstallDir = "/tmp/s4Apps" // TODO: decide how to standarize dirs, use env var?
 
 project.ext["appClassName"] = hasProperty('appClass')? "$appClass": "UNDEFINED"
+project.ext["appName"] = hasProperty('appName')? "$appName": "UNDEFINED"
 
 project.ext["s4Version"] = '0.6.0-incubating'
 description = 'Apache S4 App'
@@ -145,6 +146,7 @@ task s4r(type: Jar) {
    dependsOn cleanCopyDependenciesToLib, copyDependenciesToLib, cleanBuildProjectJar, buildProjectJar
    from { project.libsDir }
    manifest = project.manifest
+   baseName = appName
    extension = 's4r'
    exclude '*.s4r'
    manifest.mainAttributes('S4-App-Class': appClassName)

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1495a14d/test-apps/simple-deployable-app-1/build.gradle
----------------------------------------------------------------------
diff --git a/test-apps/simple-deployable-app-1/build.gradle b/test-apps/simple-deployable-app-1/build.gradle
index 069f969..e7f6a9f 100644
--- a/test-apps/simple-deployable-app-1/build.gradle
+++ b/test-apps/simple-deployable-app-1/build.gradle
@@ -38,6 +38,7 @@
 //s4AppInstallDir = "/tmp/s4Apps" // TODO: decide how to standarize dirs, use env var?
 
 project.ext["appClassName"] = hasProperty('appClass')? "$appClass": "UNDEFINED"
+project.ext["appName"] = hasProperty('appName')? "$appName": "UNDEFINED"
 
 project.ext["s4Version"] = '0.6.0-incubating'
 description = 'Apache S4 App'
@@ -145,6 +146,7 @@ task s4r(type: Jar) {
    dependsOn cleanCopyDependenciesToLib, copyDependenciesToLib, cleanBuildProjectJar, buildProjectJar
    from { project.libsDir }
    manifest = project.manifest
+   baseName = appName
    extension = 's4r'
    exclude '*.s4r'
    

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1495a14d/test-apps/twitter-adapter/build.gradle
----------------------------------------------------------------------
diff --git a/test-apps/twitter-adapter/build.gradle b/test-apps/twitter-adapter/build.gradle
index 3f68930..0d93fd0 100644
--- a/test-apps/twitter-adapter/build.gradle
+++ b/test-apps/twitter-adapter/build.gradle
@@ -38,6 +38,7 @@
 //s4AppInstallDir = "/tmp/s4Apps" // TODO: decide how to standarize dirs, use env var?
 
 project.ext["appClassName"] = hasProperty('appClass')? "$appClass": "UNDEFINED"
+project.ext["appName"] = hasProperty('appName')? "$appName": "UNDEFINED"
 
 project.ext["s4Version"] = '0.6.0-incubating'
 description = 'Apache S4 App'
@@ -46,7 +47,7 @@ project.ext["distRootFolder"] = "$archivesBaseName-${-> version}"
 
 
 // Append the suffix 'SNAPSHOT' when the build is not for release.
-//version = new Version(major: 0, minor: 0, bugfix: 0, isRelease: false)
+version = new Version(major: 0, minor: 0, bugfix: 0, isRelease: false)
 group = 'org.apache.s4'
 
 apply plugin: 'java'
@@ -131,6 +132,7 @@ task s4r(type: Jar) {
    dependsOn cleanCopyDependenciesToLib, copyDependenciesToLib, cleanBuildProjectJar, buildProjectJar
    from { project.libsDir }
    manifest = project.manifest
+   baseName = appName
    extension = 's4r'
    exclude '*.s4r'
    manifest.mainAttributes('S4-App-Class': appClassName)

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1495a14d/test-apps/twitter-counter/build.gradle
----------------------------------------------------------------------
diff --git a/test-apps/twitter-counter/build.gradle b/test-apps/twitter-counter/build.gradle
index dde352a..58d125f 100644
--- a/test-apps/twitter-counter/build.gradle
+++ b/test-apps/twitter-counter/build.gradle
@@ -38,6 +38,7 @@
 //s4AppInstallDir = "/tmp/s4Apps" // TODO: decide how to standarize dirs, use env var?
 
 project.ext["appClassName"] = hasProperty('appClass')? "$appClass": "UNDEFINED"
+project.ext["appName"] = hasProperty('appName')? "$appName": "UNDEFINED"
 
 project.ext["s4Version"] = '0.6.0-incubating'
 description = 'Apache S4 App'
@@ -129,6 +130,7 @@ task s4r(type: Jar) {
    dependsOn cleanCopyDependenciesToLib, copyDependenciesToLib, cleanBuildProjectJar, buildProjectJar
    from { project.libsDir }
    manifest = project.manifest
+   baseName = appName
    extension = 's4r'
    exclude '*.s4r'
    manifest.mainAttributes('S4-App-Class': appClassName)


[24/50] [abbrv] Update/add license headers

Posted by mm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/ThrottlingSenderExecutorServiceFactory.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/ThrottlingSenderExecutorServiceFactory.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/ThrottlingSenderExecutorServiceFactory.java
index c3eabb3..160cc49 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/ThrottlingSenderExecutorServiceFactory.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/ThrottlingSenderExecutorServiceFactory.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.core.staging;
 
 import java.util.concurrent.ExecutorService;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-core/src/main/java/org/apache/s4/core/util/AppConfig.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/util/AppConfig.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/util/AppConfig.java
index 2a75f28..6c28d7a 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/util/AppConfig.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/util/AppConfig.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.core.util;
 
 import java.util.Arrays;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-core/src/main/java/org/apache/s4/core/util/ArchiveFetchException.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/util/ArchiveFetchException.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/util/ArchiveFetchException.java
index 075c703..a5066c5 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/util/ArchiveFetchException.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/util/ArchiveFetchException.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.core.util;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-core/src/main/java/org/apache/s4/core/util/RemoteFileFetcher.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/util/RemoteFileFetcher.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/util/RemoteFileFetcher.java
index 44707a3..999f979 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/util/RemoteFileFetcher.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/util/RemoteFileFetcher.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.core.util;
 
 import java.io.InputStream;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-core/src/main/java/org/apache/s4/core/util/S4Metrics.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/util/S4Metrics.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/util/S4Metrics.java
index 122f12c..6544c36 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/util/S4Metrics.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/util/S4Metrics.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.core.util;
 
 import java.io.File;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-core/src/main/java/org/apache/s4/deploy/DeploymentUtils.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/deploy/DeploymentUtils.java b/subprojects/s4-core/src/main/java/org/apache/s4/deploy/DeploymentUtils.java
index e9c59e1..0755b92 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/deploy/DeploymentUtils.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/deploy/DeploymentUtils.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.deploy;
 
 import org.I0Itec.zkclient.exception.ZkNodeExistsException;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-core/src/main/resources/default.s4.core.properties
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/resources/default.s4.core.properties b/subprojects/s4-core/src/main/resources/default.s4.core.properties
index cb5e20a..a4ab534 100644
--- a/subprojects/s4-core/src/main/resources/default.s4.core.properties
+++ b/subprojects/s4-core/src/main/resources/default.s4.core.properties
@@ -1 +1,17 @@
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  See the NOTICE file distributed with
+#   this work for additional information regarding copyright ownership.
+#   The ASF licenses this file to You under the Apache License, Version 2.0
+#   (the "License"); you may not use this file except in compliance with
+#   the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
 s4.logger_level = DEBUG

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-core/src/test/java/org/apache/s4/core/moduleloader/ModuleLoaderTestUtils.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/test/java/org/apache/s4/core/moduleloader/ModuleLoaderTestUtils.java b/subprojects/s4-core/src/test/java/org/apache/s4/core/moduleloader/ModuleLoaderTestUtils.java
index ceb610d..529608b 100644
--- a/subprojects/s4-core/src/test/java/org/apache/s4/core/moduleloader/ModuleLoaderTestUtils.java
+++ b/subprojects/s4-core/src/test/java/org/apache/s4/core/moduleloader/ModuleLoaderTestUtils.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.core.moduleloader;
 
 import java.io.File;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-core/src/test/java/org/apache/s4/core/moduleloader/TestModuleLoader.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/test/java/org/apache/s4/core/moduleloader/TestModuleLoader.java b/subprojects/s4-core/src/test/java/org/apache/s4/core/moduleloader/TestModuleLoader.java
index da1f62b..232f62f 100644
--- a/subprojects/s4-core/src/test/java/org/apache/s4/core/moduleloader/TestModuleLoader.java
+++ b/subprojects/s4-core/src/test/java/org/apache/s4/core/moduleloader/TestModuleLoader.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.core.moduleloader;
 
 import org.apache.s4.fixtures.ZkBasedTest;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-core/src/test/java/org/apache/s4/core/moduleloader/TestModuleLoaderRemote.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/test/java/org/apache/s4/core/moduleloader/TestModuleLoaderRemote.java b/subprojects/s4-core/src/test/java/org/apache/s4/core/moduleloader/TestModuleLoaderRemote.java
index 6f57ef6..d5192c4 100644
--- a/subprojects/s4-core/src/test/java/org/apache/s4/core/moduleloader/TestModuleLoaderRemote.java
+++ b/subprojects/s4-core/src/test/java/org/apache/s4/core/moduleloader/TestModuleLoaderRemote.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.core.moduleloader;
 
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-core/src/test/java/org/apache/s4/fixtures/S4RHttpServer.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/test/java/org/apache/s4/fixtures/S4RHttpServer.java b/subprojects/s4-core/src/test/java/org/apache/s4/fixtures/S4RHttpServer.java
index 432475a..535bdfc 100644
--- a/subprojects/s4-core/src/test/java/org/apache/s4/fixtures/S4RHttpServer.java
+++ b/subprojects/s4-core/src/test/java/org/apache/s4/fixtures/S4RHttpServer.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.fixtures;
 
 import java.io.File;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-tools/src/main/java/org/apache/s4/tools/package-info.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/package-info.java b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/package-info.java
index 940025e..44eec33 100644
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/package-info.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/package-info.java
@@ -1,4 +1,22 @@
 /**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
  * Implementations of S4-related commands. Includes parsing, validation and interpretation of the various commands and options available.
  */
 package org.apache.s4.tools;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-tools/src/main/resources/templates/gradlew
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/resources/templates/gradlew b/subprojects/s4-tools/src/main/resources/templates/gradlew
index 93380d1..5348be5 100644
--- a/subprojects/s4-tools/src/main/resources/templates/gradlew
+++ b/subprojects/s4-tools/src/main/resources/templates/gradlew
@@ -1,2 +1,18 @@
 #!/bin/bash
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  See the NOTICE file distributed with
+#   this work for additional information regarding copyright ownership.
+#   The ASF licenses this file to You under the Apache License, Version 2.0
+#   (the "License"); you may not use this file except in compliance with
+#   the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
 <s4_install_dir>/gradlew $@
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-tools/src/main/resources/templates/s4
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/resources/templates/s4 b/subprojects/s4-tools/src/main/resources/templates/s4
index 69e5c78..861a78f 100644
--- a/subprojects/s4-tools/src/main/resources/templates/s4
+++ b/subprojects/s4-tools/src/main/resources/templates/s4
@@ -1,4 +1,20 @@
 #!/bin/bash
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  See the NOTICE file distributed with
+#   this work for additional information regarding copyright ownership.
+#   The ASF licenses this file to You under the Apache License, Version 2.0
+#   (the "License"); you may not use this file except in compliance with
+#   the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
 
 case "$1" in
 "adapter")

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-tools/src/test/java/org/apache/s4/tools/TestStatus.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/test/java/org/apache/s4/tools/TestStatus.java b/subprojects/s4-tools/src/test/java/org/apache/s4/tools/TestStatus.java
index 049152f..8b74bea 100644
--- a/subprojects/s4-tools/src/test/java/org/apache/s4/tools/TestStatus.java
+++ b/subprojects/s4-tools/src/test/java/org/apache/s4/tools/TestStatus.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.tools;
 
 import junit.framework.Assert;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/test-apps/custom-modules/src/main/java/org/apache/s4/TestListener.java
----------------------------------------------------------------------
diff --git a/test-apps/custom-modules/src/main/java/org/apache/s4/TestListener.java b/test-apps/custom-modules/src/main/java/org/apache/s4/TestListener.java
index c3916f0..e00bfbd 100644
--- a/test-apps/custom-modules/src/main/java/org/apache/s4/TestListener.java
+++ b/test-apps/custom-modules/src/main/java/org/apache/s4/TestListener.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4;
 
 import java.net.InetSocketAddress;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/test-apps/custom-modules/src/main/java/org/apache/s4/TestListenerModule.java
----------------------------------------------------------------------
diff --git a/test-apps/custom-modules/src/main/java/org/apache/s4/TestListenerModule.java b/test-apps/custom-modules/src/main/java/org/apache/s4/TestListenerModule.java
index c58264f..b8e37ad 100644
--- a/test-apps/custom-modules/src/main/java/org/apache/s4/TestListenerModule.java
+++ b/test-apps/custom-modules/src/main/java/org/apache/s4/TestListenerModule.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4;
 
 import org.apache.s4.base.Listener;


[44/50] [abbrv] git commit: S4-130 fix metrics config for csv output - also minor update for twitter-adapter s4r name in corresponding build file

Posted by mm...@apache.org.
S4-130 fix metrics config for csv output
- also minor update for twitter-adapter s4r name in corresponding build file


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

Branch: refs/heads/master
Commit: 2a5f92cbc514027930fe2f55ed25aff5d915c841
Parents: 039c11f
Author: Matthieu Morel <mm...@apache.org>
Authored: Fri Mar 15 11:54:15 2013 +0100
Committer: Matthieu Morel <mm...@apache.org>
Committed: Fri Mar 15 12:19:47 2013 +0100

----------------------------------------------------------------------
 .../java/org/apache/s4/core/util/S4Metrics.java    |    8 ++++----
 test-apps/twitter-adapter/build.gradle             |    2 --
 website/content/doc/0.6.0/metrics.md               |    3 ++-
 .../content/doc/0.6.0/twitter_trending_example.md  |   10 ++++------
 4 files changed, 10 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/2a5f92cb/subprojects/s4-core/src/main/java/org/apache/s4/core/util/S4Metrics.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/util/S4Metrics.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/util/S4Metrics.java
index 6544c36..eb637a2 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/util/S4Metrics.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/util/S4Metrics.java
@@ -106,10 +106,10 @@ public class S4Metrics {
             } else {
                 String group1 = matcher.group(1);
 
-                if ("csv".equals(group1)) {
-                    String outputDir = matcher.group(2);
-                    long period = Long.valueOf(matcher.group(3));
-                    TimeUnit timeUnit = TimeUnit.valueOf(matcher.group(4));
+                if (group1.startsWith("csv")) {
+                    String outputDir = group1.substring("csv:".length());
+                    long period = Long.valueOf(matcher.group(2));
+                    TimeUnit timeUnit = TimeUnit.valueOf(matcher.group(3));
                     logger.info("Reporting metrics through csv files in directory [{}] with frequency of [{}] [{}]",
                             new String[] { outputDir, String.valueOf(period), timeUnit.name() });
                     CsvReporter.enable(new File(outputDir), period, timeUnit);

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/2a5f92cb/test-apps/twitter-adapter/build.gradle
----------------------------------------------------------------------
diff --git a/test-apps/twitter-adapter/build.gradle b/test-apps/twitter-adapter/build.gradle
index 0d93fd0..e654957 100644
--- a/test-apps/twitter-adapter/build.gradle
+++ b/test-apps/twitter-adapter/build.gradle
@@ -46,8 +46,6 @@ project.ext["archivesBaseName"] = "$project.name"
 project.ext["distRootFolder"] = "$archivesBaseName-${-> version}"
 
 
-// Append the suffix 'SNAPSHOT' when the build is not for release.
-version = new Version(major: 0, minor: 0, bugfix: 0, isRelease: false)
 group = 'org.apache.s4'
 
 apply plugin: 'java'

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/2a5f92cb/website/content/doc/0.6.0/metrics.md
----------------------------------------------------------------------
diff --git a/website/content/doc/0.6.0/metrics.md b/website/content/doc/0.6.0/metrics.md
index 552df5d..70d08d5 100644
--- a/website/content/doc/0.6.0/metrics.md
+++ b/website/content/doc/0.6.0/metrics.md
@@ -31,7 +31,8 @@ The `s4.metrics.config` parameter enables periodic dumps of aggregated statistic
 Examples:
 	
 	# dump metrics to csv files to /path/to/directory every 10 seconds
-	csv:file://path/to/directory:10:SECONDS
+	# (recommendation: use a clean directory)
+	csv:/path/to/directory:10:SECONDS
 	
 	# dump metrics to the console every minute
 	console:1:MINUTES

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/2a5f92cb/website/content/doc/0.6.0/twitter_trending_example.md
----------------------------------------------------------------------
diff --git a/website/content/doc/0.6.0/twitter_trending_example.md b/website/content/doc/0.6.0/twitter_trending_example.md
index 0787d89..f7fabf4 100644
--- a/website/content/doc/0.6.0/twitter_trending_example.md
+++ b/website/content/doc/0.6.0/twitter_trending_example.md
@@ -47,12 +47,14 @@ Have a look at the code in these directories. You'll note that:
 * Build and deploy twitter-counter app
 
 		./s4 s4r -b=`pwd`/test-apps/twitter-counter/build.gradle -appClass=org.apache.s4.example.twitter.TwitterCounterApp twitter-counter
+		
 		./s4 deploy -appName=twitter-counter -c=cluster1 -s4r=`pwd`/test-apps/twitter-counter/build/libs/twitter-counter.s4r
 		
-* Build and deploy twitter-adapter app. In this example, we don't directly specify the app class of the adapter, we use the deployment approach for apps (remember, the adapter is also an app). Notice that the twitter-adapter package also has a different naming scheme. [^1]
+* Build and deploy twitter-adapter app. In this example, we don't directly specify the app class of the adapter, we use the deployment approach for apps (remember, the adapter is also an app). 
 
 		./s4 s4r -b=`pwd`/test-apps/twitter-adapter/build.gradle -appClass=org.apache.s4.example.twitter.TwitterInputAdapter twitter-adapter
-		./s4 deploy -appName=twitter-adapter -c=cluster2 -s4r=`pwd`/test-apps/twitter-adapter/build/libs/twitter-adapter-0.0.0-SNAPSHOT.s4r -p=s4.adapter.output.stream=RawStatus
+		
+		./s4 deploy -appName=twitter-adapter -c=cluster2 -s4r=`pwd`/test-apps/twitter-adapter/build/libs/twitter-adapter.s4r -p=s4.adapter.output.stream=RawStatus
 		
 * Observe the current 10 most popular topics in file TopNTopics.txt. The file gets updated at regular intervals, and only outputs topics with a minimum of 10 occurrences, so you may have to wait a little before the file is updated :
 
@@ -79,7 +81,3 @@ Last, the [javadoc](http://people.apache.org/~mmorel/apache-s4-0.6.0-incubating-
 We hope this will help you start rapidly, and remember: we're happy to help!
 
 ----
-
-###Footnotes
-
-[^1]: Modifying the `build.gradle` script you can change several aspects of the build process. By default the name of the `s4r` package is the application name provided in the packaging step, but you can attach the version automatically as in this example.
\ No newline at end of file


[25/50] [abbrv] git commit: Update/add license headers

Posted by mm...@apache.org.
Update/add license headers


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

Branch: refs/heads/master
Commit: 12f7a2a4d3dd6f0b8c90ad646125c7191b7cc7f0
Parents: 38c2d6d
Author: Matthieu Morel <mm...@apache.org>
Authored: Sun Mar 10 15:06:18 2013 +0100
Committer: Matthieu Morel <mm...@apache.org>
Committed: Sun Mar 10 15:06:18 2013 +0100

----------------------------------------------------------------------
 s4                                                 |   17 +++++++++++++-
 .../src/main/java/org/apache/s4/base/Receiver.java |   17 ++++++++++++++
 .../src/main/java/org/apache/s4/base/Sender.java   |   17 ++++++++++++++
 .../org/apache/s4/base/util/ModulesLoader.java     |   17 ++++++++++++++
 .../src/main/resources/default.s4.base.properties  |   17 ++++++++++++++
 subprojects/s4-benchmarks/bench-cluster.sh         |   16 +++++++++++++
 .../java/org/apache/s4/benchmark/dag/DagApp.java   |   17 ++++++++++++++
 .../java/org/apache/s4/benchmark/dag/FirstPE.java  |   17 ++++++++++++++
 .../java/org/apache/s4/benchmark/dag/LastPE.java   |   17 ++++++++++++++
 .../java/org/apache/s4/benchmark/dag/PipePE.java   |   17 ++++++++++++++
 .../s4/benchmark/prodcon/ProducerConsumerApp.java  |   17 ++++++++++++++
 .../org/apache/s4/benchmark/prodcon/SimplePE1.java |   17 ++++++++++++++
 .../org/apache/s4/benchmark/prodcon/SimplePE2.java |   17 ++++++++++++++
 .../s4/benchmark/utils/InjectionLimiterModule.java |   17 ++++++++++++++
 .../org/apache/s4/benchmark/utils/Injector.java    |   17 ++++++++++++++
 .../java/org/apache/s4/benchmark/utils/Utils.java  |   17 ++++++++++++++
 subprojects/s4-benchmarks/startInjector.sh         |   16 +++++++++++++
 subprojects/s4-benchmarks/startNode.sh             |   16 +++++++++++++
 .../s4/comm/DeserializerExecutorFactory.java       |   17 ++++++++++++++
 .../org/apache/s4/comm/ModulesLoaderFactory.java   |   17 ++++++++++++++
 .../serialize/SerializerDeserializerFactory.java   |   17 ++++++++++++++
 .../BlockingDeserializerExecutorFactory.java       |   17 ++++++++++++++
 .../staging/BlockingThreadPoolExecutorService.java |   17 ++++++++++++++
 .../MemoryAwareDeserializerExecutorFactory.java    |   17 ++++++++++++++
 .../ThrottlingThreadPoolExecutorService.java       |   17 ++++++++++++++
 .../org/apache/s4/comm/tcp/RemoteEmitters.java     |   17 ++++++++++++++
 .../org/apache/s4/comm/topology/RemoteStreams.java |   17 ++++++++++++++
 .../org/apache/s4/comm/util/EmitterMetrics.java    |   17 ++++++++++++++
 .../src/main/resources/default.s4.comm.properties  |   17 ++++++++++++++
 .../java/org/apache/s4/comm/tcp/TCPBasicTest.java  |   17 ++++++++++++++
 .../java/org/apache/s4/comm/udp/UDPBasicTest.java  |   17 ++++++++++++++
 .../java/org/apache/s4/fixtures/MockReceiver.java  |   17 ++++++++++++++
 .../org/apache/s4/fixtures/MockReceiverModule.java |   17 ++++++++++++++
 .../java/org/apache/s4/fixtures/NoOpReceiver.java  |   17 ++++++++++++++
 .../org/apache/s4/fixtures/NoOpReceiverModule.java |   17 ++++++++++++++
 .../org/apache/s4/fixtures/TCPTransportModule.java |   17 ++++++++++++++
 .../org/apache/s4/fixtures/TestCommModule.java     |   17 ++++++++++++++
 .../org/apache/s4/fixtures/UDPTransportModule.java |   17 ++++++++++++++
 .../src/test/resources/udp.s4.comm.properties      |   16 +++++++++++++
 .../main/java/org/apache/s4/core/AppModule.java    |   17 ++++++++++++++
 .../main/java/org/apache/s4/core/BaseModule.java   |   17 ++++++++++++++
 .../java/org/apache/s4/core/RemoteSenders.java     |   17 ++++++++++++++
 .../main/java/org/apache/s4/core/S4Bootstrap.java  |   17 ++++++++++++++
 .../src/main/java/org/apache/s4/core/S4Node.java   |   17 ++++++++++++++
 .../java/org/apache/s4/core/ZkClientProvider.java  |   17 ++++++++++++++
 ...lockingRemoteSendersExecutorServiceFactory.java |   17 ++++++++++++++
 .../BlockingSenderExecutorServiceFactory.java      |   17 ++++++++++++++
 .../BlockingStreamExecutorServiceFactory.java      |   17 ++++++++++++++
 ...heddingRemoteSendersExecutorServiceFactory.java |   17 ++++++++++++++
 .../LoadSheddingSenderExecutorServiceFactory.java  |   17 ++++++++++++++
 .../LoadSheddingStreamExecutorServiceFactory.java  |   17 ++++++++++++++
 .../RemoteSendersExecutorServiceFactory.java       |   17 ++++++++++++++
 .../core/staging/SenderExecutorServiceFactory.java |   17 ++++++++++++++
 .../core/staging/StreamExecutorServiceFactory.java |   17 ++++++++++++++
 ...ottlingRemoteSendersExecutorServiceFactory.java |   17 ++++++++++++++
 .../ThrottlingSenderExecutorServiceFactory.java    |   17 ++++++++++++++
 .../java/org/apache/s4/core/util/AppConfig.java    |   17 ++++++++++++++
 .../apache/s4/core/util/ArchiveFetchException.java |   17 ++++++++++++++
 .../org/apache/s4/core/util/RemoteFileFetcher.java |   17 ++++++++++++++
 .../java/org/apache/s4/core/util/S4Metrics.java    |   17 ++++++++++++++
 .../java/org/apache/s4/deploy/DeploymentUtils.java |   17 ++++++++++++++
 .../src/main/resources/default.s4.core.properties  |   16 +++++++++++++
 .../core/moduleloader/ModuleLoaderTestUtils.java   |   17 ++++++++++++++
 .../s4/core/moduleloader/TestModuleLoader.java     |   17 ++++++++++++++
 .../core/moduleloader/TestModuleLoaderRemote.java  |   17 ++++++++++++++
 .../java/org/apache/s4/fixtures/S4RHttpServer.java |   17 ++++++++++++++
 .../java/org/apache/s4/tools/package-info.java     |   18 +++++++++++++++
 .../s4-tools/src/main/resources/templates/gradlew  |   16 +++++++++++++
 .../s4-tools/src/main/resources/templates/s4       |   16 +++++++++++++
 .../test/java/org/apache/s4/tools/TestStatus.java  |   17 ++++++++++++++
 .../src/main/java/org/apache/s4/TestListener.java  |   17 ++++++++++++++
 .../java/org/apache/s4/TestListenerModule.java     |   17 ++++++++++++++
 72 files changed, 1217 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/s4
----------------------------------------------------------------------
diff --git a/s4 b/s4
index 6471486..ca6ed47 100755
--- a/s4
+++ b/s4
@@ -1,5 +1,20 @@
 #!/bin/bash
-
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  See the NOTICE file distributed with
+#   this work for additional information regarding copyright ownership.
+#   The ASF licenses this file to You under the Apache License, Version 2.0
+#   (the "License"); you may not use this file except in compliance with
+#   the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
 # NOTE: "./gradlew s4-tools:installApp" will prepare/update the tools subproject and related startup scripts
 
 S4_DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-base/src/main/java/org/apache/s4/base/Receiver.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-base/src/main/java/org/apache/s4/base/Receiver.java b/subprojects/s4-base/src/main/java/org/apache/s4/base/Receiver.java
index be90722..9c91a48 100644
--- a/subprojects/s4-base/src/main/java/org/apache/s4/base/Receiver.java
+++ b/subprojects/s4-base/src/main/java/org/apache/s4/base/Receiver.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.base;
 
 import java.nio.ByteBuffer;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-base/src/main/java/org/apache/s4/base/Sender.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-base/src/main/java/org/apache/s4/base/Sender.java b/subprojects/s4-base/src/main/java/org/apache/s4/base/Sender.java
index c69cc45..2001cf6 100644
--- a/subprojects/s4-base/src/main/java/org/apache/s4/base/Sender.java
+++ b/subprojects/s4-base/src/main/java/org/apache/s4/base/Sender.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.base;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-base/src/main/java/org/apache/s4/base/util/ModulesLoader.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-base/src/main/java/org/apache/s4/base/util/ModulesLoader.java b/subprojects/s4-base/src/main/java/org/apache/s4/base/util/ModulesLoader.java
index 6dab438..7f63637 100644
--- a/subprojects/s4-base/src/main/java/org/apache/s4/base/util/ModulesLoader.java
+++ b/subprojects/s4-base/src/main/java/org/apache/s4/base/util/ModulesLoader.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.base.util;
 
 import java.net.URL;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-base/src/main/resources/default.s4.base.properties
----------------------------------------------------------------------
diff --git a/subprojects/s4-base/src/main/resources/default.s4.base.properties b/subprojects/s4-base/src/main/resources/default.s4.base.properties
index 8acb17c..3cf5979 100644
--- a/subprojects/s4-base/src/main/resources/default.s4.base.properties
+++ b/subprojects/s4-base/src/main/resources/default.s4.base.properties
@@ -1,3 +1,20 @@
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  See the NOTICE file distributed with
+#   this work for additional information regarding copyright ownership.
+#   The ASF licenses this file to You under the Apache License, Version 2.0
+#   (the "License"); you may not use this file except in compliance with
+#   the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
+
 # default properties for bootstraping a node
 s4.cluster.zk_address = localhost:2181
 s4.cluster.zk_session_timeout = 10000

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-benchmarks/bench-cluster.sh
----------------------------------------------------------------------
diff --git a/subprojects/s4-benchmarks/bench-cluster.sh b/subprojects/s4-benchmarks/bench-cluster.sh
index d2d4e36..533f9a5 100755
--- a/subprojects/s4-benchmarks/bench-cluster.sh
+++ b/subprojects/s4-benchmarks/bench-cluster.sh
@@ -1,4 +1,20 @@
 #!/bin/bash -x
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  See the NOTICE file distributed with
+#   this work for additional information regarding copyright ownership.
+#   The ASF licenses this file to You under the Apache License, Version 2.0
+#   (the "License"); you may not use this file except in compliance with
+#   the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
 
 
 HOSTS=$1

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/dag/DagApp.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/dag/DagApp.java b/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/dag/DagApp.java
index c8f463d..f376182 100644
--- a/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/dag/DagApp.java
+++ b/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/dag/DagApp.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.benchmark.dag;
 
 import java.io.File;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/dag/FirstPE.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/dag/FirstPE.java b/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/dag/FirstPE.java
index b70e7b7..0b47003 100644
--- a/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/dag/FirstPE.java
+++ b/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/dag/FirstPE.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.benchmark.dag;
 
 import org.apache.s4.base.Event;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/dag/LastPE.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/dag/LastPE.java b/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/dag/LastPE.java
index c04df7e..dec2a97 100644
--- a/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/dag/LastPE.java
+++ b/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/dag/LastPE.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.benchmark.dag;
 
 import org.apache.s4.base.Event;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/dag/PipePE.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/dag/PipePE.java b/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/dag/PipePE.java
index 96587fc..7926bc5 100644
--- a/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/dag/PipePE.java
+++ b/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/dag/PipePE.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.benchmark.dag;
 
 import org.apache.s4.base.Event;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/prodcon/ProducerConsumerApp.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/prodcon/ProducerConsumerApp.java b/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/prodcon/ProducerConsumerApp.java
index 72eefa4..2260ff0 100644
--- a/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/prodcon/ProducerConsumerApp.java
+++ b/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/prodcon/ProducerConsumerApp.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.benchmark.prodcon;
 
 import java.io.File;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/prodcon/SimplePE1.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/prodcon/SimplePE1.java b/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/prodcon/SimplePE1.java
index 8e5a5fc..4748546 100644
--- a/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/prodcon/SimplePE1.java
+++ b/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/prodcon/SimplePE1.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.benchmark.prodcon;
 
 import org.apache.s4.base.Event;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/prodcon/SimplePE2.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/prodcon/SimplePE2.java b/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/prodcon/SimplePE2.java
index 678710a..3bdbbc6 100644
--- a/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/prodcon/SimplePE2.java
+++ b/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/prodcon/SimplePE2.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.benchmark.prodcon;
 
 import org.apache.s4.base.Event;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/utils/InjectionLimiterModule.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/utils/InjectionLimiterModule.java b/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/utils/InjectionLimiterModule.java
index 886fd32..79b565b 100644
--- a/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/utils/InjectionLimiterModule.java
+++ b/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/utils/InjectionLimiterModule.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.benchmark.utils;
 
 import org.apache.s4.core.staging.RemoteSendersExecutorServiceFactory;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/utils/Injector.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/utils/Injector.java b/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/utils/Injector.java
index 0766e2d..43ff28f 100644
--- a/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/utils/Injector.java
+++ b/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/utils/Injector.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.benchmark.utils;
 
 import java.io.File;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/utils/Utils.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/utils/Utils.java b/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/utils/Utils.java
index 291c50a..c52852f 100644
--- a/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/utils/Utils.java
+++ b/subprojects/s4-benchmarks/src/main/java/org/apache/s4/benchmark/utils/Utils.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.benchmark.utils;
 
 import java.util.List;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-benchmarks/startInjector.sh
----------------------------------------------------------------------
diff --git a/subprojects/s4-benchmarks/startInjector.sh b/subprojects/s4-benchmarks/startInjector.sh
index ff22b68..c809ab5 100755
--- a/subprojects/s4-benchmarks/startInjector.sh
+++ b/subprojects/s4-benchmarks/startInjector.sh
@@ -1,4 +1,20 @@
 #/bin/bash -x
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  See the NOTICE file distributed with
+#   this work for additional information regarding copyright ownership.
+#   The ASF licenses this file to You under the Apache License, Version 2.0
+#   (the "License"); you may not use this file except in compliance with
+#   the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
 
 NB_INJECTORS_PER_NODE=$1
 INJECTOR_CONFIG=$2

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-benchmarks/startNode.sh
----------------------------------------------------------------------
diff --git a/subprojects/s4-benchmarks/startNode.sh b/subprojects/s4-benchmarks/startNode.sh
index c100646..1096711 100755
--- a/subprojects/s4-benchmarks/startNode.sh
+++ b/subprojects/s4-benchmarks/startNode.sh
@@ -1,4 +1,20 @@
 #!/bin/bash -x
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  See the NOTICE file distributed with
+#   this work for additional information regarding copyright ownership.
+#   The ASF licenses this file to You under the Apache License, Version 2.0
+#   (the "License"); you may not use this file except in compliance with
+#   the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
 BENCH_ROOTDIR=$1
 NODE_CONFIG=$2
 

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-comm/src/main/java/org/apache/s4/comm/DeserializerExecutorFactory.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/DeserializerExecutorFactory.java b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/DeserializerExecutorFactory.java
index 40492fd..5900926 100644
--- a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/DeserializerExecutorFactory.java
+++ b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/DeserializerExecutorFactory.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.comm;
 
 import java.util.concurrent.Executor;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-comm/src/main/java/org/apache/s4/comm/ModulesLoaderFactory.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/ModulesLoaderFactory.java b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/ModulesLoaderFactory.java
index 5023e25..52dee9f 100644
--- a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/ModulesLoaderFactory.java
+++ b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/ModulesLoaderFactory.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.comm;
 
 import java.io.File;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-comm/src/main/java/org/apache/s4/comm/serialize/SerializerDeserializerFactory.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/serialize/SerializerDeserializerFactory.java b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/serialize/SerializerDeserializerFactory.java
index f491264..ef23414 100644
--- a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/serialize/SerializerDeserializerFactory.java
+++ b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/serialize/SerializerDeserializerFactory.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.comm.serialize;
 
 import org.apache.s4.base.SerializerDeserializer;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/BlockingDeserializerExecutorFactory.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/BlockingDeserializerExecutorFactory.java b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/BlockingDeserializerExecutorFactory.java
index da2297a..18802b1 100644
--- a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/BlockingDeserializerExecutorFactory.java
+++ b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/BlockingDeserializerExecutorFactory.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.comm.staging;
 
 import java.util.concurrent.Executor;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/BlockingThreadPoolExecutorService.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/BlockingThreadPoolExecutorService.java b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/BlockingThreadPoolExecutorService.java
index 319d382..4633ae8 100644
--- a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/BlockingThreadPoolExecutorService.java
+++ b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/BlockingThreadPoolExecutorService.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.comm.staging;
 
 import java.util.Collection;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/MemoryAwareDeserializerExecutorFactory.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/MemoryAwareDeserializerExecutorFactory.java b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/MemoryAwareDeserializerExecutorFactory.java
index 39f6d70..31c6fae 100644
--- a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/MemoryAwareDeserializerExecutorFactory.java
+++ b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/MemoryAwareDeserializerExecutorFactory.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.comm.staging;
 
 import java.util.concurrent.Executor;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/ThrottlingThreadPoolExecutorService.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/ThrottlingThreadPoolExecutorService.java b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/ThrottlingThreadPoolExecutorService.java
index 7e7b1d0..25e5f12 100644
--- a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/ThrottlingThreadPoolExecutorService.java
+++ b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/ThrottlingThreadPoolExecutorService.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.comm.staging;
 
 import java.util.Collection;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-comm/src/main/java/org/apache/s4/comm/tcp/RemoteEmitters.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/tcp/RemoteEmitters.java b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/tcp/RemoteEmitters.java
index 5cfd3d7..07b5336 100644
--- a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/tcp/RemoteEmitters.java
+++ b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/tcp/RemoteEmitters.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.comm.tcp;
 
 import org.apache.s4.base.RemoteEmitter;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-comm/src/main/java/org/apache/s4/comm/topology/RemoteStreams.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/topology/RemoteStreams.java b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/topology/RemoteStreams.java
index 2f15804..a7d3c19 100644
--- a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/topology/RemoteStreams.java
+++ b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/topology/RemoteStreams.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.comm.topology;
 
 import java.util.Set;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-comm/src/main/java/org/apache/s4/comm/util/EmitterMetrics.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/util/EmitterMetrics.java b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/util/EmitterMetrics.java
index 2fe7e3e..00810f5 100644
--- a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/util/EmitterMetrics.java
+++ b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/util/EmitterMetrics.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.comm.util;
 
 import java.util.concurrent.TimeUnit;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-comm/src/main/resources/default.s4.comm.properties
----------------------------------------------------------------------
diff --git a/subprojects/s4-comm/src/main/resources/default.s4.comm.properties b/subprojects/s4-comm/src/main/resources/default.s4.comm.properties
index 49ad568..a0b4426 100644
--- a/subprojects/s4-comm/src/main/resources/default.s4.comm.properties
+++ b/subprojects/s4-comm/src/main/resources/default.s4.comm.properties
@@ -1,3 +1,20 @@
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  See the NOTICE file distributed with
+#   this work for additional information regarding copyright ownership.
+#   The ASF licenses this file to You under the Apache License, Version 2.0
+#   (the "License"); you may not use this file except in compliance with
+#   the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
+
 s4.comm.emitter.class=org.apache.s4.comm.tcp.TCPEmitter
 s4.comm.emitter.remote.class=org.apache.s4.comm.tcp.TCPRemoteEmitter
 s4.comm.listener.class=org.apache.s4.comm.tcp.TCPListener

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-comm/src/test/java/org/apache/s4/comm/tcp/TCPBasicTest.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-comm/src/test/java/org/apache/s4/comm/tcp/TCPBasicTest.java b/subprojects/s4-comm/src/test/java/org/apache/s4/comm/tcp/TCPBasicTest.java
index e400813..033d5cc 100644
--- a/subprojects/s4-comm/src/test/java/org/apache/s4/comm/tcp/TCPBasicTest.java
+++ b/subprojects/s4-comm/src/test/java/org/apache/s4/comm/tcp/TCPBasicTest.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.comm.tcp;
 
 import java.util.concurrent.TimeUnit;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-comm/src/test/java/org/apache/s4/comm/udp/UDPBasicTest.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-comm/src/test/java/org/apache/s4/comm/udp/UDPBasicTest.java b/subprojects/s4-comm/src/test/java/org/apache/s4/comm/udp/UDPBasicTest.java
index b06734b..5a7af20 100644
--- a/subprojects/s4-comm/src/test/java/org/apache/s4/comm/udp/UDPBasicTest.java
+++ b/subprojects/s4-comm/src/test/java/org/apache/s4/comm/udp/UDPBasicTest.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.comm.udp;
 
 import java.util.concurrent.TimeUnit;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/MockReceiver.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/MockReceiver.java b/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/MockReceiver.java
index 5dde4c2..85fbaa9 100644
--- a/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/MockReceiver.java
+++ b/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/MockReceiver.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.fixtures;
 
 import java.nio.ByteBuffer;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/MockReceiverModule.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/MockReceiverModule.java b/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/MockReceiverModule.java
index 2a5d0a8..98c8107 100644
--- a/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/MockReceiverModule.java
+++ b/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/MockReceiverModule.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.fixtures;
 
 import org.apache.s4.base.Receiver;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/NoOpReceiver.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/NoOpReceiver.java b/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/NoOpReceiver.java
index 01acdd1..afd4822 100644
--- a/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/NoOpReceiver.java
+++ b/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/NoOpReceiver.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.fixtures;
 
 import java.nio.ByteBuffer;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/NoOpReceiverModule.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/NoOpReceiverModule.java b/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/NoOpReceiverModule.java
index 2ee3749..13d9aaa 100644
--- a/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/NoOpReceiverModule.java
+++ b/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/NoOpReceiverModule.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.fixtures;
 
 import org.apache.s4.base.Receiver;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/TCPTransportModule.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/TCPTransportModule.java b/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/TCPTransportModule.java
index 27ae24b..8a1efa3 100644
--- a/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/TCPTransportModule.java
+++ b/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/TCPTransportModule.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.fixtures;
 
 import org.apache.s4.base.Emitter;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/TestCommModule.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/TestCommModule.java b/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/TestCommModule.java
index 55dcaec..f8d79ca 100644
--- a/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/TestCommModule.java
+++ b/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/TestCommModule.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.fixtures;
 
 import java.io.InputStream;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/UDPTransportModule.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/UDPTransportModule.java b/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/UDPTransportModule.java
index 1d1bc7a..51e4b85 100644
--- a/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/UDPTransportModule.java
+++ b/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/UDPTransportModule.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.fixtures;
 
 import org.apache.s4.base.Emitter;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-comm/src/test/resources/udp.s4.comm.properties
----------------------------------------------------------------------
diff --git a/subprojects/s4-comm/src/test/resources/udp.s4.comm.properties b/subprojects/s4-comm/src/test/resources/udp.s4.comm.properties
index f9707ec..a982dca 100644
--- a/subprojects/s4-comm/src/test/resources/udp.s4.comm.properties
+++ b/subprojects/s4-comm/src/test/resources/udp.s4.comm.properties
@@ -1,3 +1,19 @@
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  See the NOTICE file distributed with
+#   this work for additional information regarding copyright ownership.
+#   The ASF licenses this file to You under the Apache License, Version 2.0
+#   (the "License"); you may not use this file except in compliance with
+#   the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
 s4.comm.emitter.class = org.apache.s4.comm.udp.UDPEmitter
 s4.comm.emitter.remote.class = org.apache.s4.comm.udp.UDPRemoteEmitter
 s4.comm.listener.class = org.apache.s4.comm.udp.UDPListener

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-core/src/main/java/org/apache/s4/core/AppModule.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/AppModule.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/AppModule.java
index fcfa7fe..798b57c 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/AppModule.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/AppModule.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.core;
 
 import org.apache.s4.base.Listener;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-core/src/main/java/org/apache/s4/core/BaseModule.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/BaseModule.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/BaseModule.java
index 4468af7..ded0e9e 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/BaseModule.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/BaseModule.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.core;
 
 import java.io.InputStream;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-core/src/main/java/org/apache/s4/core/RemoteSenders.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/RemoteSenders.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/RemoteSenders.java
index 9222450..2b731a4 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/RemoteSenders.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/RemoteSenders.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.core;
 
 import org.apache.s4.base.Event;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Bootstrap.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Bootstrap.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Bootstrap.java
index e36c86e..cedaf26 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Bootstrap.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Bootstrap.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.core;
 
 import java.io.File;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Node.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Node.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Node.java
index f298cde..c5b0151 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Node.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Node.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.core;
 
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-core/src/main/java/org/apache/s4/core/ZkClientProvider.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/ZkClientProvider.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/ZkClientProvider.java
index 7f018e6..5ad1f9f 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/ZkClientProvider.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/ZkClientProvider.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.core;
 
 import org.I0Itec.zkclient.serialize.ZkSerializer;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/BlockingRemoteSendersExecutorServiceFactory.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/BlockingRemoteSendersExecutorServiceFactory.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/BlockingRemoteSendersExecutorServiceFactory.java
index df89d68..2a6253a 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/BlockingRemoteSendersExecutorServiceFactory.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/BlockingRemoteSendersExecutorServiceFactory.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.core.staging;
 
 import com.google.inject.Inject;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/BlockingSenderExecutorServiceFactory.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/BlockingSenderExecutorServiceFactory.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/BlockingSenderExecutorServiceFactory.java
index 3ab73a2..17e9364 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/BlockingSenderExecutorServiceFactory.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/BlockingSenderExecutorServiceFactory.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.core.staging;
 
 import java.util.concurrent.ExecutorService;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/BlockingStreamExecutorServiceFactory.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/BlockingStreamExecutorServiceFactory.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/BlockingStreamExecutorServiceFactory.java
index a77a35e..9d0046f 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/BlockingStreamExecutorServiceFactory.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/BlockingStreamExecutorServiceFactory.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.core.staging;
 
 import java.util.concurrent.ExecutorService;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/LoadSheddingRemoteSendersExecutorServiceFactory.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/LoadSheddingRemoteSendersExecutorServiceFactory.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/LoadSheddingRemoteSendersExecutorServiceFactory.java
index ae508bb..a709949 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/LoadSheddingRemoteSendersExecutorServiceFactory.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/LoadSheddingRemoteSendersExecutorServiceFactory.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.core.staging;
 
 import com.google.inject.Inject;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/LoadSheddingSenderExecutorServiceFactory.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/LoadSheddingSenderExecutorServiceFactory.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/LoadSheddingSenderExecutorServiceFactory.java
index 56fd8fb..945d779 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/LoadSheddingSenderExecutorServiceFactory.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/LoadSheddingSenderExecutorServiceFactory.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.core.staging;
 
 import java.util.concurrent.ArrayBlockingQueue;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/LoadSheddingStreamExecutorServiceFactory.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/LoadSheddingStreamExecutorServiceFactory.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/LoadSheddingStreamExecutorServiceFactory.java
index b9b8597..4af1c12 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/LoadSheddingStreamExecutorServiceFactory.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/LoadSheddingStreamExecutorServiceFactory.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.core.staging;
 
 import java.util.concurrent.ArrayBlockingQueue;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/RemoteSendersExecutorServiceFactory.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/RemoteSendersExecutorServiceFactory.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/RemoteSendersExecutorServiceFactory.java
index a3fd4dc..b1f8630 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/RemoteSendersExecutorServiceFactory.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/RemoteSendersExecutorServiceFactory.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.core.staging;
 
 import java.util.concurrent.ExecutorService;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/SenderExecutorServiceFactory.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/SenderExecutorServiceFactory.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/SenderExecutorServiceFactory.java
index d7393f3..b05017d 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/SenderExecutorServiceFactory.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/SenderExecutorServiceFactory.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.core.staging;
 
 import java.util.concurrent.ExecutorService;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/StreamExecutorServiceFactory.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/StreamExecutorServiceFactory.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/StreamExecutorServiceFactory.java
index 6a7a572..8b4eb8c 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/StreamExecutorServiceFactory.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/StreamExecutorServiceFactory.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.core.staging;
 
 import java.util.concurrent.ExecutorService;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/12f7a2a4/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/ThrottlingRemoteSendersExecutorServiceFactory.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/ThrottlingRemoteSendersExecutorServiceFactory.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/ThrottlingRemoteSendersExecutorServiceFactory.java
index 4d97c47..e15d2cf 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/ThrottlingRemoteSendersExecutorServiceFactory.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/staging/ThrottlingRemoteSendersExecutorServiceFactory.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.s4.core.staging;
 
 import com.google.inject.Inject;


[20/50] [abbrv] git commit: Merge branch 'S4-127' into dev

Posted by mm...@apache.org.
Merge branch 'S4-127' into dev


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

Branch: refs/heads/master
Commit: 80fb90e773a2d6f59fbe51e6f3f9a7a1d0726646
Parents: 0424313 a5aacb1
Author: Daniel Gómez Ferro <df...@apache.org>
Authored: Sat Mar 9 21:32:32 2013 +0100
Committer: Daniel Gómez Ferro <df...@apache.org>
Committed: Sat Mar 9 21:32:32 2013 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/s4/tools/Status.java  |    4 +-
 .../test/java/org/apache/s4/tools/TestStatus.java  |   19 +++++++++++++++
 2 files changed, 21 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[30/50] [abbrv] git commit: Upgrade to gradle 1.4 - faster and should ease artifact publishing

Posted by mm...@apache.org.
Upgrade to gradle 1.4
- faster and should ease artifact publishing


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

Branch: refs/heads/master
Commit: fb559d41352b0f4a1614133c3019ce0c18f30395
Parents: 47620a5
Author: Matthieu Morel <mm...@apache.org>
Authored: Sun Mar 10 21:04:29 2013 +0100
Committer: Matthieu Morel <mm...@apache.org>
Committed: Sun Mar 10 21:04:53 2013 +0100

----------------------------------------------------------------------
 build.gradle                      |   16 ++++++++++------
 gradlew                           |   12 ++++++------
 gradlew.bat                       |    2 +-
 lib/gradle-wrapper-1.0.jar        |  Bin 39752 -> 0 bytes
 lib/gradle-wrapper-1.0.properties |    6 ------
 lib/gradle-wrapper-1.4.jar        |  Bin 0 -> 46735 bytes
 lib/gradle-wrapper-1.4.properties |    6 ++++++
 7 files changed, 23 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/fb559d41/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 00511f9..16f73e1 100644
--- a/build.gradle
+++ b/build.gradle
@@ -84,10 +84,10 @@ project.ext["libraries"] = [
     jcommander:         'com.beust:jcommander:1.25',
     asm:                'org.ow2.asm:asm:4.0',
     javax_inject:       'javax.inject:javax.inject:1',
-    gradle_base_services: 'org.gradle:gradle-base-services:1.0',
-    gradle_core:        'org.gradle:gradle-core:1.0',
-    gradle_tooling_api: 'org.gradle:gradle-tooling-api:1.0',
-    gradle_wrapper:     'gradle-wrapper:gradle-wrapper:1.0',
+    gradle_base_services: 'org.gradle:gradle-base-services:1.4',
+    gradle_core:        'org.gradle:gradle-core:1.4',
+    gradle_tooling_api: 'org.gradle:gradle-tooling-api:1.4',
+    gradle_wrapper:     'gradle-wrapper:gradle-wrapper:1.4',
     metrics:            'com.yammer.metrics:metrics-core:2.1.3'
 ]
 
@@ -96,6 +96,8 @@ subprojects {
     apply plugin: 'eclipse'
     apply plugin: 'idea'
     apply plugin: 'maven'
+    apply plugin: 'maven-publish'
+    
 //    apply plugin: 'checkstyle'
 
     /* Set Java version. */
@@ -169,6 +171,7 @@ subprojects {
         'Implementation-Vendor-Id': 'org.apache',
         'Implementation-Title': 'org.apache.s4.'+project.name.substring(3) // s4-comm becomes org.apache.s4.comm for instance
     )
+    
 }
 
 evaluationDependsOnChildren()
@@ -311,8 +314,8 @@ task clean << {
 /* Generates the gradlew scripts.
  http://www.gradle.org/docs/1.0/userguide/gradle_wrapper.html */
 task wrapper(type: Wrapper) {
-    gradleVersion = '1.0'
-    jarFile='lib/gradle-wrapper-1.0.jar'
+    gradleVersion = '1.4'
+    jarFile='lib/gradle-wrapper-1.4.jar'
 }
 
 class Version {
@@ -325,3 +328,4 @@ class Version {
         "$major.$minor.$bugfix${isRelease ? '' : '-SNAPSHOT'}-incubating"
     }
 }
+

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/fb559d41/gradlew
----------------------------------------------------------------------
diff --git a/gradlew b/gradlew
index 284690e..3f041e5 100755
--- a/gradlew
+++ b/gradlew
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 ##############################################################################
 ##
@@ -61,11 +61,11 @@ while [ -h "$PRG" ] ; do
     fi
 done
 SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/"
+cd "`dirname \"$PRG\"`/" >&-
 APP_HOME="`pwd -P`"
-cd "$SAVED"
+cd "$SAVED" >&-
 
-CLASSPATH=$APP_HOME/lib/gradle-wrapper-1.0.jar
+CLASSPATH=$APP_HOME/lib/gradle-wrapper-1.4.jar
 
 # Determine the Java command to use to start the JVM.
 if [ -n "$JAVA_HOME" ] ; then
@@ -101,13 +101,13 @@ if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
             warn "Could not set maximum file descriptor limit: $MAX_FD"
         fi
     else
-        warn "Could not query businessSystem maximum file descriptor limit: $MAX_FD_LIMIT"
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
     fi
 fi
 
 # For Darwin, add options to specify how the application appears in the dock
 if $darwin; then
-    JAVA_OPTS="$JAVA_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
 fi
 
 # For Cygwin, switch paths to Windows format before running java

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/fb559d41/gradlew.bat
----------------------------------------------------------------------
diff --git a/gradlew.bat b/gradlew.bat
index 1816106..076e37d 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -69,7 +69,7 @@ set CMD_LINE_ARGS=%$
 :execute
 @rem Setup the command line
 
-set CLASSPATH=%APP_HOME%\lib\gradle-wrapper-1.0.jar
+set CLASSPATH=%APP_HOME%\lib\gradle-wrapper-1.4.jar
 
 @rem Execute Gradle
 "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/fb559d41/lib/gradle-wrapper-1.0.jar
----------------------------------------------------------------------
diff --git a/lib/gradle-wrapper-1.0.jar b/lib/gradle-wrapper-1.0.jar
deleted file mode 100644
index ce16961..0000000
Binary files a/lib/gradle-wrapper-1.0.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/fb559d41/lib/gradle-wrapper-1.0.properties
----------------------------------------------------------------------
diff --git a/lib/gradle-wrapper-1.0.properties b/lib/gradle-wrapper-1.0.properties
deleted file mode 100644
index 5ee8821..0000000
--- a/lib/gradle-wrapper-1.0.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Sun Jul 01 12:59:07 CEST 2012
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.0-bin.zip

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/fb559d41/lib/gradle-wrapper-1.4.jar
----------------------------------------------------------------------
diff --git a/lib/gradle-wrapper-1.4.jar b/lib/gradle-wrapper-1.4.jar
new file mode 100644
index 0000000..42d9b0e
Binary files /dev/null and b/lib/gradle-wrapper-1.4.jar differ

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/fb559d41/lib/gradle-wrapper-1.4.properties
----------------------------------------------------------------------
diff --git a/lib/gradle-wrapper-1.4.properties b/lib/gradle-wrapper-1.4.properties
new file mode 100644
index 0000000..6bed864
--- /dev/null
+++ b/lib/gradle-wrapper-1.4.properties
@@ -0,0 +1,6 @@
+#Sun Mar 10 18:48:50 CET 2013
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.4-bin.zip


[47/50] [abbrv] git commit: Doc updates for RC3

Posted by mm...@apache.org.
Doc updates for RC3


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

Branch: refs/heads/master
Commit: 96938d5afe060f8213f66b3269e6c846cfc045e3
Parents: 036d718
Author: Matthieu Morel <mm...@apache.org>
Authored: Mon Mar 18 12:02:51 2013 +0100
Committer: Matthieu Morel <mm...@apache.org>
Committed: Mon Mar 18 12:02:51 2013 +0100

----------------------------------------------------------------------
 RELEASE_NOTES.html                                 |    5 +++--
 build.gradle                                       |    1 +
 .../src/main/java/org/apache/s4/tools/Deploy.java  |    2 +-
 website/content/doc/0.6.0/configuration.md         |   12 +++++++++++-
 website/content/index.haml                         |    2 +-
 5 files changed, 17 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/96938d5a/RELEASE_NOTES.html
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES.html b/RELEASE_NOTES.html
index 03837a8..08ca59f 100644
--- a/RELEASE_NOTES.html
+++ b/RELEASE_NOTES.html
@@ -53,6 +53,8 @@ Apache S4 0.6 contains grounds on the same basis than 0.5 and brings major perfo
 </li>
 <li>[<a href='https://issues.apache.org/jira/browse/S4-129'>S4-129</a>] -         s4 node ignores zk parameter from the command line
 </li>
+<li>[<a href='https://issues.apache.org/jira/browse/S4-130'>S4-130</a>] -         csv output for metrics not working
+</li>
 </ul>
                 
 <h2>        Improvement
@@ -114,5 +116,4 @@ Apache S4 0.6 contains grounds on the same basis than 0.5 and brings major perfo
 </li>
 <li>[<a href='https://issues.apache.org/jira/browse/S4-124'>S4-124</a>] -         Update documentation for 0.6.0 release
 </li>
-</ul>
-                    
\ No newline at end of file
+</ul>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/96938d5a/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 16f73e1..6823f42 100644
--- a/build.gradle
+++ b/build.gradle
@@ -296,6 +296,7 @@ task srcDist(dependsOn: ["javadoc"], type: Zip) {
     exclude ('**/tmp/**')
     exclude ('**/bin/**')
     exclude ('website/**')
+    exclude ('lib/apache-rat-0.8.jar')
     into (baseName+'-'+version+'-'+classifier)
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/96938d5a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
index 695faf3..72c5145 100644
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
@@ -121,7 +121,7 @@ public class Deploy extends S4ArgsBase {
         @Parameter(names = { "-modulesClasses", "-emc", "-mc" }, description = "Fully qualified class names of custom modules")
         List<String> modulesClassesNames = new ArrayList<String>();
 
-        @Parameter(names = { "-namedStringParameters", "-p" }, description = "Comma-separated list of inline configuration parameters, taking precedence over homonymous configuration parameters from configuration files. Syntax: '-p=name1=value1,name2=value2 '", hidden = false, converter = ParsingUtils.InlineConfigParameterConverter.class)
+        @Parameter(names = { "-namedStringParameters", "-p" }, description = "Comma-separated list of inline configuration parameters. Syntax: '-p=name1=value1,name2=value2 '", hidden = false, converter = ParsingUtils.InlineConfigParameterConverter.class)
         List<String> extraNamedParameters = new ArrayList<String>();
 
         @Parameter(names = "-testMode", description = "Special mode for regression testing", hidden = true)

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/96938d5a/website/content/doc/0.6.0/configuration.md
----------------------------------------------------------------------
diff --git a/website/content/doc/0.6.0/configuration.md b/website/content/doc/0.6.0/configuration.md
index 7bd093e..c98ca74 100644
--- a/website/content/doc/0.6.0/configuration.md
+++ b/website/content/doc/0.6.0/configuration.md
@@ -66,6 +66,11 @@ Therefore, for starting an S4 node on a given host, you only need to specify:
 Example:
 `./s4 node -c=cluster1 -zk=host.domain.com`
 
+## Overriding node configuration
+By default, nodes read configuration from configuration files in the classpath `default.s4.base.properties`, `default.s4.comm.properties` and `default.s4.core.properties`.
+
+It is possible to override these parameters by using the `-p` option when starting a node.
+
 
 # Application configuration
 
@@ -130,7 +135,7 @@ int port
 
 ~~~
 
-* specifying the parameter value at node startup (using `-p` inline with the node command, or with the '`@`' syntax)
+* specifying the parameter value when deploying the application (using `-p` inline with the node command, or with the '`@`' syntax)
 
 S4 uses an internal Guice module that automatically injects configuration parameters passed through the deploy command to matching `@Named` parameters.
 
@@ -140,6 +145,11 @@ Both application and platform parameters can be overriden. For instance, specify
 	-emc=org.apache.s4.core.ft.FileSystemBackendCheckpointingModule \ 
 	-p=s4.checkpointing.filesystem.storageRootPath=/custom/path 
 
+
+> Make sure you pass overriding **platform** parameters through the `-p` option in the `node` command, and pass **application** parameters through the `-p` option in the `deploy` command.
+
+
+
 ## File-based configuration
 
 Instead of specifying node parameters inline, you may refer to a file with the '@' notation:

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/96938d5a/website/content/index.haml
----------------------------------------------------------------------
diff --git a/website/content/index.haml b/website/content/index.haml
index 5318e4b..283d3e3 100644
--- a/website/content/index.haml
+++ b/website/content/index.haml
@@ -5,7 +5,7 @@ title: Distributed Stream Computing Platform
   #about{:class=>"span-18 last"}
 
     #notice{:class=>"span-17 last"}
-      #notice_text= "March 2013: <b>S4 0.6.0 Release Candidate</b> <a href='http://people.apache.org/~mmorel/s4-0.6.0-incubating-release-candidate-2/'>available for download</a>. Check the <a href='/doc/0.6.0'>improved documentation</a>!."
+      #notice_text= "March 2013: <b>S4 0.6.0 Release Candidate</b> <a href='http://people.apache.org/~mmorel/s4-0.6.0-incubating-release-candidate-3/'>available for download</a>. Check the <a href='/doc/0.6.0'>improved documentation</a>!."
 
     #notice{:class=>"span-17 last"}
       #notice_text= "August 2012: <b>S4 0.5.0 has been released!</b> Get it <a href='/download'>here</a>!."


[23/50] [abbrv] git commit: S4-123: Javadoc updates

Posted by mm...@apache.org.
S4-123: Javadoc updates


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

Branch: refs/heads/master
Commit: 38c2d6d72824c08df5911d86680ef9d8ebe306ed
Parents: faf0da4 66c81de
Author: Matthieu Morel <mm...@apache.org>
Authored: Sun Mar 10 11:27:06 2013 +0100
Committer: Matthieu Morel <mm...@apache.org>
Committed: Sun Mar 10 13:29:05 2013 +0100

----------------------------------------------------------------------
 build.gradle                                       |   15 +-
 .../src/main/java/org/apache/s4/base/Event.java    |    3 +
 .../java/org/apache/s4/base/GenericKeyFinder.java  |    8 +-
 .../src/main/java/org/apache/s4/base/Key.java      |    2 +-
 .../main/java/org/apache/s4/base/KeyFinder.java    |    3 +
 .../main/java/org/apache/s4/base/package-info.java |    2 +-
 .../java/org/apache/s4/base/util/S4RLoader.java    |    4 +-
 .../org/apache/s4/benchmark/dag/package-info.java  |   22 ++
 .../apache/s4/benchmark/prodcon/package-info.java  |   22 ++
 .../apache/s4/benchmark/utils/package-info.java    |   22 ++
 .../java/org/apache/s4/comm/DefaultCommModule.java |    3 -
 .../org/apache/s4/comm/ModulesLoaderFactory.java   |    4 +-
 .../ThrottlingThreadPoolExecutorService.java       |    3 -
 .../org/apache/s4/comm/staging/package-info.java   |   22 ++
 .../apache/s4/comm/util/ArchiveFetchException.java |   14 -
 .../org/apache/s4/comm/util/ArchiveFetcher.java    |   42 ----
 .../s4/comm/util/FileSystemArchiveFetcher.java     |   41 ----
 .../apache/s4/comm/util/HttpArchiveFetcher.java    |  187 ---------------
 .../org/apache/s4/comm/util/RemoteFileFetcher.java |   23 --
 .../org/apache/s4/fixtures/TestCommModule.java     |    4 -
 .../main/java/org/apache/s4/core/AppModule.java    |   13 +
 .../main/java/org/apache/s4/core/BaseModule.java   |    8 +-
 .../java/org/apache/s4/core/DefaultCoreModule.java |    3 +-
 .../org/apache/s4/core/DefaultRemoteSenders.java   |    3 +
 .../java/org/apache/s4/core/ProcessingElement.java |    4 +-
 .../main/java/org/apache/s4/core/ReceiverImpl.java |    4 +-
 .../main/java/org/apache/s4/core/RemoteSender.java |    2 +-
 .../main/java/org/apache/s4/core/S4Bootstrap.java  |    4 +-
 .../src/main/java/org/apache/s4/core/S4Node.java   |    2 +-
 .../main/java/org/apache/s4/core/SenderImpl.java   |    8 +-
 .../org/apache/s4/core/adapter/AdapterApp.java     |    2 +
 .../main/java/org/apache/s4/core/package-info.java |    4 +-
 ...ottlingRemoteSendersExecutorServiceFactory.java |    3 +-
 .../org/apache/s4/core/staging/package-info.java   |   25 ++
 .../java/org/apache/s4/core/util/AppConfig.java    |    5 +
 .../apache/s4/core/util/ArchiveFetchException.java |   16 ++
 .../org/apache/s4/core/util/ArchiveFetcher.java    |   42 ++++
 .../s4/core/util/FileSystemArchiveFetcher.java     |   41 ++++
 .../apache/s4/core/util/HttpArchiveFetcher.java    |  187 +++++++++++++++
 .../org/apache/s4/core/util/RemoteFileFetcher.java |   23 ++
 .../java/org/apache/s4/core/util/S4Metrics.java    |    4 +
 .../s4/core/window/AbstractSlidingWindowPE.java    |   18 ++-
 .../java/org/apache/s4/core/window/OHCLSlot.java   |   79 ------
 .../java/org/apache/s4/core/window/OHLCSlot.java   |   82 +++++++
 .../org/apache/s4/core/window/package-info.java    |    5 +-
 .../java/org/apache/s4/deploy/DeploymentUtils.java |   15 ++
 .../java/org/apache/s4/deploy/package-info.java    |    3 +-
 .../main/java/org/apache/s4/tools/CreateApp.java   |    3 +
 .../java/org/apache/s4/tools/DefineCluster.java    |    3 +
 .../src/main/java/org/apache/s4/tools/Deploy.java  |    7 +-
 .../org/apache/s4/tools/FileExistsValidator.java   |    3 +
 .../src/main/java/org/apache/s4/tools/Package.java |    6 +-
 .../main/java/org/apache/s4/tools/S4ArgsBase.java  |    3 +
 .../src/main/java/org/apache/s4/tools/Status.java  |    6 +-
 .../src/main/java/org/apache/s4/tools/Tools.java   |    3 +
 .../main/java/org/apache/s4/tools/ZKServer.java    |    4 +
 56 files changed, 652 insertions(+), 437 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/38c2d6d7/build.gradle
----------------------------------------------------------------------
diff --cc build.gradle
index 3193075,3193075..3025030
--- a/build.gradle
+++ b/build.gradle
@@@ -187,15 -187,15 +187,18 @@@ dependencies 
  task javadoc (type: Javadoc) {
      destinationDir = new File(project.rootDir, 'doc/javadoc')
      destinationDir.deleteDir()
--
--    title = "Apache S4 " + version
--    source platformProjects.collect { project ->
--        project.sourceSets.main.allJava
++    excludes = ['org.apache.s4.benchmark']
++    project.ext["documentedProjects"] = new HashSet(platformProjects)
++    documentedProjects.remove(project(':s4-benchmarks'))
++	title = "Apache S4 " + version
++    source documentedProjects.collect { project ->
++        	project.sourceSets.main.allJava
      }
      // Might need a classpath
--    classpath = files(subprojects.collect { project ->
--        project.sourceSets.main.compileClasspath
++    classpath = files(documentedProjects.collect { project ->
++       	project.sourceSets.main.compileClasspath
      })
++    
  }
  
  // TODO parameterize

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/38c2d6d7/subprojects/s4-comm/src/main/java/org/apache/s4/comm/DefaultCommModule.java
----------------------------------------------------------------------
diff --cc subprojects/s4-comm/src/main/java/org/apache/s4/comm/DefaultCommModule.java
index bad2555,bad2555..40c4779
--- a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/DefaultCommModule.java
+++ b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/DefaultCommModule.java
@@@ -61,9 -61,9 +61,6 @@@ public class DefaultCommModule extends 
       * 
       * @param commConfigInputStream
       *            input stream from a configuration file
--     * @param clusterName
--     *            the name of the cluster to which the current node belongs. If specified in the configuration file,
--     *            this parameter will be ignored.
       */
      public DefaultCommModule(InputStream commConfigInputStream) {
          super();

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/38c2d6d7/subprojects/s4-comm/src/main/java/org/apache/s4/comm/ModulesLoaderFactory.java
----------------------------------------------------------------------
diff --cc subprojects/s4-comm/src/main/java/org/apache/s4/comm/ModulesLoaderFactory.java
index 2b89039,2b89039..5023e25
--- a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/ModulesLoaderFactory.java
+++ b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/ModulesLoaderFactory.java
@@@ -38,8 -38,8 +38,8 @@@ public class ModulesLoaderFactory 
       * 
       * Inspired from Hadoop's application classloading implementation (RunJar class).
       * 
--     * @param modulesJarPath
--     *            path to s4r
++     * @param modulesFiles
++     *            files containing modules classes
       * @return classloader that loads resources from the archive in a predefined order
       */
      public ModulesLoader createModulesLoader(Iterable<File> modulesFiles) {

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/38c2d6d7/subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/ThrottlingThreadPoolExecutorService.java
----------------------------------------------------------------------
diff --cc subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/ThrottlingThreadPoolExecutorService.java
index 0b10590,0b10590..7e7b1d0
--- a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/ThrottlingThreadPoolExecutorService.java
+++ b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/staging/ThrottlingThreadPoolExecutorService.java
@@@ -42,9 -42,9 +42,6 @@@ public class ThrottlingThreadPoolExecut
       * 
       * @param parallelism
       *            Maximum number of threads in the pool
--     * @param fairParallelism
--     *            If true, in case of contention, waiting threads will be scheduled in a first-in first-out manner. This
--     *            can help ensure ordering, though there is an associated performance cost (typically small).
       * @param threadName
       *            Naming scheme
       * @param workQueueSize

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/38c2d6d7/subprojects/s4-comm/src/main/java/org/apache/s4/comm/util/ArchiveFetchException.java
----------------------------------------------------------------------
diff --cc subprojects/s4-comm/src/main/java/org/apache/s4/comm/util/ArchiveFetchException.java
index 8567cce,8567cce..0000000
deleted file mode 100644,100644
--- a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/util/ArchiveFetchException.java
+++ /dev/null
@@@ -1,14 -1,14 +1,0 @@@
--package org.apache.s4.comm.util;
--
--
--public class ArchiveFetchException extends Exception {
--
--    public ArchiveFetchException(String string) {
--        super(string);
--    }
--
--    public ArchiveFetchException(String string, Throwable throwable) {
--        super(string, throwable);
--    }
--
--}

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/38c2d6d7/subprojects/s4-comm/src/main/java/org/apache/s4/comm/util/ArchiveFetcher.java
----------------------------------------------------------------------
diff --cc subprojects/s4-comm/src/main/java/org/apache/s4/comm/util/ArchiveFetcher.java
index dbd35ba,dbd35ba..0000000
deleted file mode 100644,100644
--- a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/util/ArchiveFetcher.java
+++ /dev/null
@@@ -1,42 -1,42 +1,0 @@@
--/**
-- * Licensed to the Apache Software Foundation (ASF) under one
-- * or more contributor license agreements.  See the NOTICE file
-- * distributed with this work for additional information
-- * regarding copyright ownership.  The ASF licenses this file
-- * to you under the Apache License, Version 2.0 (the
-- * "License"); you may not use this file except in compliance
-- * with the License.  You may obtain a copy of the License at
-- *
-- *     http://www.apache.org/licenses/LICENSE-2.0
-- *
-- * Unless required by applicable law or agreed to in writing, software
-- * distributed under the License is distributed on an "AS IS" BASIS,
-- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- * See the License for the specific language governing permissions and
-- * limitations under the License.
-- */
--
--package org.apache.s4.comm.util;
--
--import java.io.InputStream;
--import java.net.URI;
--
--/**
-- * This interface defines methods to fetch archive files from a URI (S4R or modules jars). Various protocols can be
-- * supported in the implementation classes (e.g. file system, HTTP etc...)
-- * 
-- */
--public interface ArchiveFetcher {
--
--    /**
--     * Returns a stream to an archive file
--     * 
--     * @param uri
--     *            archive identifier
--     * @return an input stream for accessing the content of the archive file
--     * @throws ArchiveFetchException
--     *             when fetching fails
--     */
--    InputStream fetch(URI uri) throws ArchiveFetchException;
--
--}

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/38c2d6d7/subprojects/s4-comm/src/main/java/org/apache/s4/comm/util/FileSystemArchiveFetcher.java
----------------------------------------------------------------------
diff --cc subprojects/s4-comm/src/main/java/org/apache/s4/comm/util/FileSystemArchiveFetcher.java
index 294877f,294877f..0000000
deleted file mode 100644,100644
--- a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/util/FileSystemArchiveFetcher.java
+++ /dev/null
@@@ -1,41 -1,41 +1,0 @@@
--/**
-- * Licensed to the Apache Software Foundation (ASF) under one
-- * or more contributor license agreements.  See the NOTICE file
-- * distributed with this work for additional information
-- * regarding copyright ownership.  The ASF licenses this file
-- * to you under the Apache License, Version 2.0 (the
-- * "License"); you may not use this file except in compliance
-- * with the License.  You may obtain a copy of the License at
-- *
-- *     http://www.apache.org/licenses/LICENSE-2.0
-- *
-- * Unless required by applicable law or agreed to in writing, software
-- * distributed under the License is distributed on an "AS IS" BASIS,
-- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- * See the License for the specific language governing permissions and
-- * limitations under the License.
-- */
--
--package org.apache.s4.comm.util;
--
--import java.io.File;
--import java.io.FileInputStream;
--import java.io.FileNotFoundException;
--import java.io.InputStream;
--import java.net.URI;
--
--/**
-- * Fetches modules jar files and application S4R files from a file system, possibly distributed.
-- * 
-- */
--public class FileSystemArchiveFetcher implements ArchiveFetcher {
--
--    @Override
--    public InputStream fetch(URI uri) throws ArchiveFetchException {
--        try {
--            return new FileInputStream(new File(uri));
--        } catch (FileNotFoundException e) {
--            throw new ArchiveFetchException("Cannot retrieve file from uri [" + uri.toString() + "]");
--        }
--    }
--}

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/38c2d6d7/subprojects/s4-comm/src/main/java/org/apache/s4/comm/util/HttpArchiveFetcher.java
----------------------------------------------------------------------
diff --cc subprojects/s4-comm/src/main/java/org/apache/s4/comm/util/HttpArchiveFetcher.java
index 39b98d9,39b98d9..0000000
deleted file mode 100644,100644
--- a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/util/HttpArchiveFetcher.java
+++ /dev/null
@@@ -1,187 -1,187 +1,0 @@@
--/**
-- * Licensed to the Apache Software Foundation (ASF) under one
-- * or more contributor license agreements.  See the NOTICE file
-- * distributed with this work for additional information
-- * regarding copyright ownership.  The ASF licenses this file
-- * to you under the Apache License, Version 2.0 (the
-- * "License"); you may not use this file except in compliance
-- * with the License.  You may obtain a copy of the License at
-- *
-- *     http://www.apache.org/licenses/LICENSE-2.0
-- *
-- * Unless required by applicable law or agreed to in writing, software
-- * distributed under the License is distributed on an "AS IS" BASIS,
-- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- * See the License for the specific language governing permissions and
-- * limitations under the License.
-- */
--
--package org.apache.s4.comm.util;
--
--import java.io.File;
--import java.io.FileInputStream;
--import java.io.FileNotFoundException;
--import java.io.FileOutputStream;
--import java.io.IOException;
--import java.io.InputStream;
--import java.net.InetSocketAddress;
--import java.net.URI;
--import java.util.concurrent.Executors;
--
--import org.jboss.netty.bootstrap.ClientBootstrap;
--import org.jboss.netty.buffer.ChannelBuffer;
--import org.jboss.netty.buffer.ChannelBufferInputStream;
--import org.jboss.netty.channel.Channel;
--import org.jboss.netty.channel.ChannelFuture;
--import org.jboss.netty.channel.ChannelHandlerContext;
--import org.jboss.netty.channel.ChannelPipeline;
--import org.jboss.netty.channel.ChannelPipelineFactory;
--import org.jboss.netty.channel.Channels;
--import org.jboss.netty.channel.MessageEvent;
--import org.jboss.netty.channel.SimpleChannelUpstreamHandler;
--import org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory;
--import org.jboss.netty.handler.codec.http.DefaultHttpRequest;
--import org.jboss.netty.handler.codec.http.HttpChunk;
--import org.jboss.netty.handler.codec.http.HttpClientCodec;
--import org.jboss.netty.handler.codec.http.HttpContentDecompressor;
--import org.jboss.netty.handler.codec.http.HttpHeaders;
--import org.jboss.netty.handler.codec.http.HttpMethod;
--import org.jboss.netty.handler.codec.http.HttpRequest;
--import org.jboss.netty.handler.codec.http.HttpResponse;
--import org.jboss.netty.handler.codec.http.HttpVersion;
--import org.slf4j.Logger;
--import org.slf4j.LoggerFactory;
--
--import com.google.common.io.ByteStreams;
--
--/**
-- * <p>
-- * Fetches modules and app archives through HTTP.
-- * </p>
-- * <p>
-- * The underlying implementation uses Netty, and borrows code from the Netty snoop example.</br>
-- * 
-- * @see <a href="http://docs.jboss.org/netty/3.2/xref/org/jboss/netty/example/http/snoop/package-summary.html">Netty
-- *      snoop example</a>
-- * 
-- *      </p>
-- */
--public class HttpArchiveFetcher implements ArchiveFetcher {
--
--    private static Logger logger = LoggerFactory.getLogger(HttpArchiveFetcher.class);
--
--    @Override
--    public InputStream fetch(URI uri) throws ArchiveFetchException {
--        logger.debug("Fetching file through http: {}", uri.toString());
--
--        String host = uri.getHost();
--        int port = uri.getPort();
--        if (port == -1) {
--            if (uri.getScheme().equalsIgnoreCase("http")) {
--                port = 80;
--            } else if (uri.getScheme().equalsIgnoreCase("https")) {
--                port = 443;
--            }
--        }
--
--        ClientBootstrap clientBootstrap = new ClientBootstrap(new NioClientSocketChannelFactory(
--                Executors.newCachedThreadPool(), Executors.newCachedThreadPool()));
--        File tmpFile;
--        try {
--            tmpFile = File.createTempFile("http", "download");
--        } catch (IOException e) {
--            throw new ArchiveFetchException("Cannot create temporary file for fetching archive data from http server",
--                    e);
--        }
--        clientBootstrap.setPipelineFactory(new HttpClientPipelineFactory(tmpFile));
--        ChannelFuture channelFuture = clientBootstrap.connect(new InetSocketAddress(host, port));
--        // TODO timeout?
--        Channel channel = channelFuture.awaitUninterruptibly().getChannel();
--        if (!channelFuture.isSuccess()) {
--            clientBootstrap.releaseExternalResources();
--            throw new ArchiveFetchException("Cannot connect to http uri [" + uri.toString() + "]",
--                    channelFuture.getCause());
--        }
--
--        HttpRequest request = new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, uri.getPath());
--        request.setHeader(HttpHeaders.Names.HOST, host);
--        request.setHeader(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.CLOSE);
--        request.setHeader(HttpHeaders.Names.ACCEPT_ENCODING, HttpHeaders.Values.GZIP);
--
--        channel.write(request);
--
--        channel.getCloseFuture().awaitUninterruptibly();
--
--        clientBootstrap.releaseExternalResources();
--
--        logger.debug("Finished downloading archive file through http {}, as file: {}", uri.toString(),
--                tmpFile.getAbsolutePath());
--        try {
--            return new FileInputStream(tmpFile);
--        } catch (FileNotFoundException e) {
--            throw new ArchiveFetchException("Cannot get input stream from temporary file with s4r data ["
--                    + tmpFile.getAbsolutePath() + "]");
--        }
--    }
--
--    private class HttpClientPipelineFactory implements ChannelPipelineFactory {
--
--        File tmpFile;
--
--        public HttpClientPipelineFactory(File tmpFile) {
--            this.tmpFile = tmpFile;
--        }
--
--        @Override
--        public ChannelPipeline getPipeline() throws Exception {
--            // Create a default pipeline implementation.
--            ChannelPipeline pipeline = Channels.pipeline();
--
--            pipeline.addLast("codec", new HttpClientCodec());
--
--            // Remove the following line if you don't want automatic content decompression.
--            pipeline.addLast("inflater", new HttpContentDecompressor());
--
--            pipeline.addLast("handler", new HttpResponseHandler(tmpFile));
--            return pipeline;
--        }
--    }
--
--    // see http://docs.jboss.org/netty/3.2/xref/org/jboss/netty/example/http/snoop/HttpResponseHandler.html
--    private class HttpResponseHandler extends SimpleChannelUpstreamHandler {
--
--        private boolean readingChunks;
--        FileOutputStream fos;
--
--        public HttpResponseHandler(File tmpFile) throws FileNotFoundException {
--            this.fos = new FileOutputStream(tmpFile);
--        }
--
--        @Override
--        public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) throws Exception {
--            if (!readingChunks) {
--                HttpResponse response = (HttpResponse) e.getMessage();
--
--                if (response.isChunked()) {
--                    readingChunks = true;
--                } else {
--                    copyContentToTmpFile(response.getContent());
--                }
--            } else {
--                HttpChunk chunk = (HttpChunk) e.getMessage();
--                if (chunk.isLast()) {
--                    readingChunks = false;
--                    fos.close();
--                } else {
--                    copyContentToTmpFile(chunk.getContent());
--                }
--            }
--
--        }
--
--        private void copyContentToTmpFile(ChannelBuffer content) throws IOException, FileNotFoundException {
--            ChannelBufferInputStream cbis = new ChannelBufferInputStream(content);
--            ByteStreams.copy(cbis, fos);
--        }
--    }
--}

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/38c2d6d7/subprojects/s4-comm/src/main/java/org/apache/s4/comm/util/RemoteFileFetcher.java
----------------------------------------------------------------------
diff --cc subprojects/s4-comm/src/main/java/org/apache/s4/comm/util/RemoteFileFetcher.java
index f81b81b,f81b81b..0000000
deleted file mode 100644,100644
--- a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/util/RemoteFileFetcher.java
+++ /dev/null
@@@ -1,23 -1,23 +1,0 @@@
--package org.apache.s4.comm.util;
--
--import java.io.InputStream;
--import java.net.URI;
--
--/**
-- * Factory for remote file fetchers depending on the access protocol.
-- * 
-- */
--public class RemoteFileFetcher implements ArchiveFetcher {
--
--    @Override
--    public InputStream fetch(URI uri) throws ArchiveFetchException {
--        String scheme = uri.getScheme();
--        if ("file".equalsIgnoreCase(scheme)) {
--            return new FileSystemArchiveFetcher().fetch(uri);
--        }
--        if ("http".equalsIgnoreCase(scheme) || "https".equalsIgnoreCase(scheme)) {
--            return new HttpArchiveFetcher().fetch(uri);
--        }
--        throw new ArchiveFetchException("Unsupported protocol " + scheme);
--    }
--}

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/38c2d6d7/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/TestCommModule.java
----------------------------------------------------------------------
diff --cc subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/TestCommModule.java
index 827ec42,827ec42..55dcaec
--- a/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/TestCommModule.java
+++ b/subprojects/s4-comm/src/test/java/org/apache/s4/fixtures/TestCommModule.java
@@@ -7,8 -7,8 +7,6 @@@ import org.apache.s4.comm.topology.Assi
  import org.apache.s4.comm.topology.AssignmentFromZK;
  import org.apache.s4.comm.topology.ZNRecordSerializer;
  import org.apache.s4.comm.topology.ZkClient;
--import org.apache.s4.comm.util.ArchiveFetcher;
--import org.apache.s4.comm.util.RemoteFileFetcher;
  
  import com.google.inject.name.Names;
  
@@@ -34,8 -34,8 +32,6 @@@ public class TestCommModule extends Def
          bind(Integer.class).annotatedWith(Names.named("s4.cluster.zk_connection_timeout")).toInstance(10000);
          bind(Assignment.class).to(AssignmentFromZK.class).asEagerSingleton();
  
--        bind(ArchiveFetcher.class).to(RemoteFileFetcher.class);
--
          ZkClient zkClient = new ZkClient(CommTestUtils.ZK_STRING);
          zkClient.setZkSerializer(new ZNRecordSerializer());
          bind(ZkClient.class).toInstance(zkClient);

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/38c2d6d7/subprojects/s4-core/src/main/java/org/apache/s4/core/BaseModule.java
----------------------------------------------------------------------
diff --cc subprojects/s4-core/src/main/java/org/apache/s4/core/BaseModule.java
index 6eda37d,e0bd0e0..4468af7
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/BaseModule.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/BaseModule.java
@@@ -9,8 -9,8 +9,8 @@@ import org.apache.commons.configuration
  import org.apache.s4.comm.topology.Assignment;
  import org.apache.s4.comm.topology.AssignmentFromZK;
  import org.apache.s4.comm.topology.ZkClient;
--import org.apache.s4.comm.util.ArchiveFetcher;
--import org.apache.s4.comm.util.RemoteFileFetcher;
++import org.apache.s4.core.util.ArchiveFetcher;
++import org.apache.s4.core.util.RemoteFileFetcher;
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
  

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/38c2d6d7/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Bootstrap.java
----------------------------------------------------------------------
diff --cc subprojects/s4-core/src/main/java/org/apache/s4/core/S4Bootstrap.java
index 757ce4f,757ce4f..e36c86e
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Bootstrap.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Bootstrap.java
@@@ -22,9 -22,9 +22,9 @@@ import org.apache.s4.comm.DefaultCommMo
  import org.apache.s4.comm.ModulesLoaderFactory;
  import org.apache.s4.comm.topology.ZNRecord;
  import org.apache.s4.comm.topology.ZkClient;
--import org.apache.s4.comm.util.ArchiveFetchException;
--import org.apache.s4.comm.util.ArchiveFetcher;
  import org.apache.s4.core.util.AppConfig;
++import org.apache.s4.core.util.ArchiveFetchException;
++import org.apache.s4.core.util.ArchiveFetcher;
  import org.apache.s4.core.util.ParametersInjectionModule;
  import org.apache.s4.deploy.DeploymentFailedException;
  import org.apache.zookeeper.CreateMode;

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/38c2d6d7/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Node.java
----------------------------------------------------------------------
diff --cc subprojects/s4-core/src/main/java/org/apache/s4/core/S4Node.java
index 907fcb9,907fcb9..f298cde
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Node.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Node.java
@@@ -3,7 -3,7 +3,7 @@@ package org.apache.s4.core
  import java.io.IOException;
  import java.lang.Thread.UncaughtExceptionHandler;
  
--import org.apache.s4.comm.util.ArchiveFetchException;
++import org.apache.s4.core.util.ArchiveFetchException;
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
  

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/38c2d6d7/subprojects/s4-core/src/main/java/org/apache/s4/core/util/ArchiveFetchException.java
----------------------------------------------------------------------
diff --cc subprojects/s4-core/src/main/java/org/apache/s4/core/util/ArchiveFetchException.java
index 0000000,0000000..075c703
new file mode 100644
--- /dev/null
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/util/ArchiveFetchException.java
@@@ -1,0 -1,0 +1,16 @@@
++package org.apache.s4.core.util;
++
++/**
++ * Exception thrown when an archive cannot be fetched correctly
++ */
++public class ArchiveFetchException extends Exception {
++
++    public ArchiveFetchException(String string) {
++        super(string);
++    }
++
++    public ArchiveFetchException(String string, Throwable throwable) {
++        super(string, throwable);
++    }
++
++}

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/38c2d6d7/subprojects/s4-core/src/main/java/org/apache/s4/core/util/ArchiveFetcher.java
----------------------------------------------------------------------
diff --cc subprojects/s4-core/src/main/java/org/apache/s4/core/util/ArchiveFetcher.java
index 0000000,0000000..d6071ff
new file mode 100644
--- /dev/null
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/util/ArchiveFetcher.java
@@@ -1,0 -1,0 +1,42 @@@
++/**
++ * Licensed to the Apache Software Foundation (ASF) under one
++ * or more contributor license agreements.  See the NOTICE file
++ * distributed with this work for additional information
++ * regarding copyright ownership.  The ASF licenses this file
++ * to you under the Apache License, Version 2.0 (the
++ * "License"); you may not use this file except in compliance
++ * with the License.  You may obtain a copy of the License at
++ *
++ *     http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++package org.apache.s4.core.util;
++
++import java.io.InputStream;
++import java.net.URI;
++
++/**
++ * This interface defines methods to fetch archive files from a URI (S4R or modules jars). Various protocols can be
++ * supported in the implementation classes (e.g. file system, HTTP etc...)
++ * 
++ */
++public interface ArchiveFetcher {
++
++    /**
++     * Returns a stream to an archive file
++     * 
++     * @param uri
++     *            archive identifier
++     * @return an input stream for accessing the content of the archive file
++     * @throws ArchiveFetchException
++     *             when fetching fails
++     */
++    InputStream fetch(URI uri) throws ArchiveFetchException;
++
++}

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/38c2d6d7/subprojects/s4-core/src/main/java/org/apache/s4/core/util/FileSystemArchiveFetcher.java
----------------------------------------------------------------------
diff --cc subprojects/s4-core/src/main/java/org/apache/s4/core/util/FileSystemArchiveFetcher.java
index 0000000,0000000..a975919
new file mode 100644
--- /dev/null
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/util/FileSystemArchiveFetcher.java
@@@ -1,0 -1,0 +1,41 @@@
++/**
++ * Licensed to the Apache Software Foundation (ASF) under one
++ * or more contributor license agreements.  See the NOTICE file
++ * distributed with this work for additional information
++ * regarding copyright ownership.  The ASF licenses this file
++ * to you under the Apache License, Version 2.0 (the
++ * "License"); you may not use this file except in compliance
++ * with the License.  You may obtain a copy of the License at
++ *
++ *     http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++package org.apache.s4.core.util;
++
++import java.io.File;
++import java.io.FileInputStream;
++import java.io.FileNotFoundException;
++import java.io.InputStream;
++import java.net.URI;
++
++/**
++ * Fetches modules jar files and application S4R files from a file system, possibly distributed.
++ * 
++ */
++public class FileSystemArchiveFetcher implements ArchiveFetcher {
++
++    @Override
++    public InputStream fetch(URI uri) throws ArchiveFetchException {
++        try {
++            return new FileInputStream(new File(uri));
++        } catch (FileNotFoundException e) {
++            throw new ArchiveFetchException("Cannot retrieve file from uri [" + uri.toString() + "]");
++        }
++    }
++}

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/38c2d6d7/subprojects/s4-core/src/main/java/org/apache/s4/core/util/HttpArchiveFetcher.java
----------------------------------------------------------------------
diff --cc subprojects/s4-core/src/main/java/org/apache/s4/core/util/HttpArchiveFetcher.java
index 0000000,0000000..9d3fa1e
new file mode 100644
--- /dev/null
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/util/HttpArchiveFetcher.java
@@@ -1,0 -1,0 +1,187 @@@
++/**
++ * Licensed to the Apache Software Foundation (ASF) under one
++ * or more contributor license agreements.  See the NOTICE file
++ * distributed with this work for additional information
++ * regarding copyright ownership.  The ASF licenses this file
++ * to you under the Apache License, Version 2.0 (the
++ * "License"); you may not use this file except in compliance
++ * with the License.  You may obtain a copy of the License at
++ *
++ *     http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++package org.apache.s4.core.util;
++
++import java.io.File;
++import java.io.FileInputStream;
++import java.io.FileNotFoundException;
++import java.io.FileOutputStream;
++import java.io.IOException;
++import java.io.InputStream;
++import java.net.InetSocketAddress;
++import java.net.URI;
++import java.util.concurrent.Executors;
++
++import org.jboss.netty.bootstrap.ClientBootstrap;
++import org.jboss.netty.buffer.ChannelBuffer;
++import org.jboss.netty.buffer.ChannelBufferInputStream;
++import org.jboss.netty.channel.Channel;
++import org.jboss.netty.channel.ChannelFuture;
++import org.jboss.netty.channel.ChannelHandlerContext;
++import org.jboss.netty.channel.ChannelPipeline;
++import org.jboss.netty.channel.ChannelPipelineFactory;
++import org.jboss.netty.channel.Channels;
++import org.jboss.netty.channel.MessageEvent;
++import org.jboss.netty.channel.SimpleChannelUpstreamHandler;
++import org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory;
++import org.jboss.netty.handler.codec.http.DefaultHttpRequest;
++import org.jboss.netty.handler.codec.http.HttpChunk;
++import org.jboss.netty.handler.codec.http.HttpClientCodec;
++import org.jboss.netty.handler.codec.http.HttpContentDecompressor;
++import org.jboss.netty.handler.codec.http.HttpHeaders;
++import org.jboss.netty.handler.codec.http.HttpMethod;
++import org.jboss.netty.handler.codec.http.HttpRequest;
++import org.jboss.netty.handler.codec.http.HttpResponse;
++import org.jboss.netty.handler.codec.http.HttpVersion;
++import org.slf4j.Logger;
++import org.slf4j.LoggerFactory;
++
++import com.google.common.io.ByteStreams;
++
++/**
++ * <p>
++ * Fetches modules and app archives through HTTP.
++ * </p>
++ * <p>
++ * The underlying implementation uses Netty, and borrows code from the Netty snoop example.</br>
++ * 
++ * @see <a href="http://docs.jboss.org/netty/3.2/xref/org/jboss/netty/example/http/snoop/package-summary.html">Netty
++ *      snoop example</a>
++ * 
++ *      </p>
++ */
++public class HttpArchiveFetcher implements ArchiveFetcher {
++
++    private static Logger logger = LoggerFactory.getLogger(HttpArchiveFetcher.class);
++
++    @Override
++    public InputStream fetch(URI uri) throws ArchiveFetchException {
++        logger.debug("Fetching file through http: {}", uri.toString());
++
++        String host = uri.getHost();
++        int port = uri.getPort();
++        if (port == -1) {
++            if (uri.getScheme().equalsIgnoreCase("http")) {
++                port = 80;
++            } else if (uri.getScheme().equalsIgnoreCase("https")) {
++                port = 443;
++            }
++        }
++
++        ClientBootstrap clientBootstrap = new ClientBootstrap(new NioClientSocketChannelFactory(
++                Executors.newCachedThreadPool(), Executors.newCachedThreadPool()));
++        File tmpFile;
++        try {
++            tmpFile = File.createTempFile("http", "download");
++        } catch (IOException e) {
++            throw new ArchiveFetchException("Cannot create temporary file for fetching archive data from http server",
++                    e);
++        }
++        clientBootstrap.setPipelineFactory(new HttpClientPipelineFactory(tmpFile));
++        ChannelFuture channelFuture = clientBootstrap.connect(new InetSocketAddress(host, port));
++        // TODO timeout?
++        Channel channel = channelFuture.awaitUninterruptibly().getChannel();
++        if (!channelFuture.isSuccess()) {
++            clientBootstrap.releaseExternalResources();
++            throw new ArchiveFetchException("Cannot connect to http uri [" + uri.toString() + "]",
++                    channelFuture.getCause());
++        }
++
++        HttpRequest request = new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, uri.getPath());
++        request.setHeader(HttpHeaders.Names.HOST, host);
++        request.setHeader(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.CLOSE);
++        request.setHeader(HttpHeaders.Names.ACCEPT_ENCODING, HttpHeaders.Values.GZIP);
++
++        channel.write(request);
++
++        channel.getCloseFuture().awaitUninterruptibly();
++
++        clientBootstrap.releaseExternalResources();
++
++        logger.debug("Finished downloading archive file through http {}, as file: {}", uri.toString(),
++                tmpFile.getAbsolutePath());
++        try {
++            return new FileInputStream(tmpFile);
++        } catch (FileNotFoundException e) {
++            throw new ArchiveFetchException("Cannot get input stream from temporary file with s4r data ["
++                    + tmpFile.getAbsolutePath() + "]");
++        }
++    }
++
++    private class HttpClientPipelineFactory implements ChannelPipelineFactory {
++
++        File tmpFile;
++
++        public HttpClientPipelineFactory(File tmpFile) {
++            this.tmpFile = tmpFile;
++        }
++
++        @Override
++        public ChannelPipeline getPipeline() throws Exception {
++            // Create a default pipeline implementation.
++            ChannelPipeline pipeline = Channels.pipeline();
++
++            pipeline.addLast("codec", new HttpClientCodec());
++
++            // Remove the following line if you don't want automatic content decompression.
++            pipeline.addLast("inflater", new HttpContentDecompressor());
++
++            pipeline.addLast("handler", new HttpResponseHandler(tmpFile));
++            return pipeline;
++        }
++    }
++
++    // see http://docs.jboss.org/netty/3.2/xref/org/jboss/netty/example/http/snoop/HttpResponseHandler.html
++    private class HttpResponseHandler extends SimpleChannelUpstreamHandler {
++
++        private boolean readingChunks;
++        FileOutputStream fos;
++
++        public HttpResponseHandler(File tmpFile) throws FileNotFoundException {
++            this.fos = new FileOutputStream(tmpFile);
++        }
++
++        @Override
++        public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) throws Exception {
++            if (!readingChunks) {
++                HttpResponse response = (HttpResponse) e.getMessage();
++
++                if (response.isChunked()) {
++                    readingChunks = true;
++                } else {
++                    copyContentToTmpFile(response.getContent());
++                }
++            } else {
++                HttpChunk chunk = (HttpChunk) e.getMessage();
++                if (chunk.isLast()) {
++                    readingChunks = false;
++                    fos.close();
++                } else {
++                    copyContentToTmpFile(chunk.getContent());
++                }
++            }
++
++        }
++
++        private void copyContentToTmpFile(ChannelBuffer content) throws IOException, FileNotFoundException {
++            ChannelBufferInputStream cbis = new ChannelBufferInputStream(content);
++            ByteStreams.copy(cbis, fos);
++        }
++    }
++}

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/38c2d6d7/subprojects/s4-core/src/main/java/org/apache/s4/core/util/RemoteFileFetcher.java
----------------------------------------------------------------------
diff --cc subprojects/s4-core/src/main/java/org/apache/s4/core/util/RemoteFileFetcher.java
index 0000000,0000000..44707a3
new file mode 100644
--- /dev/null
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/util/RemoteFileFetcher.java
@@@ -1,0 -1,0 +1,23 @@@
++package org.apache.s4.core.util;
++
++import java.io.InputStream;
++import java.net.URI;
++
++/**
++ * Factory for remote file fetchers depending on the access protocol.
++ * 
++ */
++public class RemoteFileFetcher implements ArchiveFetcher {
++
++    @Override
++    public InputStream fetch(URI uri) throws ArchiveFetchException {
++        String scheme = uri.getScheme();
++        if ("file".equalsIgnoreCase(scheme)) {
++            return new FileSystemArchiveFetcher().fetch(uri);
++        }
++        if ("http".equalsIgnoreCase(scheme) || "https".equalsIgnoreCase(scheme)) {
++            return new HttpArchiveFetcher().fetch(uri);
++        }
++        throw new ArchiveFetchException("Unsupported protocol " + scheme);
++    }
++}

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/38c2d6d7/subprojects/s4-core/src/main/java/org/apache/s4/core/window/AbstractSlidingWindowPE.java
----------------------------------------------------------------------
diff --cc subprojects/s4-core/src/main/java/org/apache/s4/core/window/AbstractSlidingWindowPE.java
index 3c3cd67,e0ec20f..7688c9d
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/window/AbstractSlidingWindowPE.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/window/AbstractSlidingWindowPE.java
@@@ -148,6 -157,9 +157,8 @@@ public abstract class AbstractSlidingWi
       * User provided function that evaluates the whole content of the window. It must iterate across all slots. Current
       * slots are passed as a parameter and the PE instance is expected to be locked so that iteration over the slots is
       * safe.
+      * 
 -     * @param result
 -     *            result of evaluation
++     * @return result of evaluation
       */
      abstract protected V evaluateWindow(Collection<T> slots);
  

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/38c2d6d7/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
----------------------------------------------------------------------
diff --cc subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
index 2165eca,c255bcc..f78b866
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
@@@ -40,10 -40,15 +40,12 @@@ import org.slf4j.LoggerFactory
  import com.beust.jcommander.IStringConverter;
  import com.beust.jcommander.Parameter;
  import com.beust.jcommander.Parameters;
 -import com.beust.jcommander.converters.FileConverter;
  import com.beust.jcommander.internal.Maps;
  import com.google.common.base.Strings;
- import com.google.common.io.Files;
 -import com.google.common.io.ByteStreams;
 -import com.google.common.io.Files;
  
+ /**
+  * Deploys and S4 application configuration into the cluster manager
+  */
  public class Deploy extends S4ArgsBase {
  
      static org.slf4j.Logger logger = LoggerFactory.getLogger(Deploy.class);

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/38c2d6d7/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Package.java
----------------------------------------------------------------------
diff --cc subprojects/s4-tools/src/main/java/org/apache/s4/tools/Package.java
index 084b6e9,c0f3518..f759d26
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Package.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Package.java
@@@ -40,9 -43,10 +43,8 @@@ public class Package extends S4ArgsBas
              // prepare gradle -P parameters, including passed gradle opts
              params.add("appClass=" + packageArgs.appClass);
              params.add("appName=" + packageArgs.appName.get(0));
-             ExecGradle.exec(packageArgs.gradleBuildFile, "s4r", params.toArray(new String[] {}),
-                     packageArgs.debug);
+             ExecGradle.exec(packageArgs.gradleBuildFile, "s4r", params.toArray(new String[] {}), packageArgs.debug);
  
 -            // Explicitly shutdown the JVM since Gradle leaves non-daemon threads running that delay the termination
 -            System.exit(0);
          } catch (Exception e) {
              LoggerFactory.getLogger(Package.class).error("Cannot deploy app", e);
          }

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/38c2d6d7/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Status.java
----------------------------------------------------------------------
diff --cc subprojects/s4-tools/src/main/java/org/apache/s4/tools/Status.java
index 1d9bd45,418f01b..b109259
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Status.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Status.java
@@@ -227,7 -231,7 +231,7 @@@ public class Status extends S4ArgsBase 
       *            cluster list
       * @param clusterAppMap
       *            <cluster,app>
--     * @return
++     * @return formatted string
       */
      private static String getFormatString(Collection<String> clusters, Map<String, String> clusterAppMap) {
          if (clusters == null || clusters.size() == 0) {


[21/50] [abbrv] git commit: S4-127 fix format string

Posted by mm...@apache.org.
S4-127 fix format string


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

Branch: refs/heads/master
Commit: a4b5eefb88da9e2ecc8bf8473d94255e448419a1
Parents: a5aacb1
Author: Daniel Gómez Ferro <df...@apache.org>
Authored: Sat Mar 9 22:26:54 2013 +0100
Committer: Daniel Gómez Ferro <df...@apache.org>
Committed: Sat Mar 9 22:26:54 2013 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/s4/tools/Status.java  |    2 +-
 .../test/java/org/apache/s4/tools/TestStatus.java  |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/a4b5eefb/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Status.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Status.java b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Status.java
index 63fd077..1d9bd45 100644
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Status.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Status.java
@@ -209,7 +209,7 @@ public class Status extends S4ArgsBase {
             content = "UNDEFINED";
         }
         int i = (width - content.length()) / 2;
-        return String.format("%" + (i == 0 ? "" : (i + "s")) + "%s", " ", content);
+        return String.format("%" + (i == 0 ? "s" : (i + "s")) + "%s", " ", content);
     }
 
     private static String generateEdge(int length) {

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/a4b5eefb/subprojects/s4-tools/src/test/java/org/apache/s4/tools/TestStatus.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/test/java/org/apache/s4/tools/TestStatus.java b/subprojects/s4-tools/src/test/java/org/apache/s4/tools/TestStatus.java
index 7c7bae9..049152f 100644
--- a/subprojects/s4-tools/src/test/java/org/apache/s4/tools/TestStatus.java
+++ b/subprojects/s4-tools/src/test/java/org/apache/s4/tools/TestStatus.java
@@ -11,7 +11,9 @@ public class TestStatus {
     @Test
     public void testStringFormatting() {
 
-        Status.inMiddle(Strings.repeat("A", 20), 20);
+        String repeat = Strings.repeat("A", 20);
+        String middle = Status.inMiddle(repeat, 20);
+        Assert.assertTrue(middle.contains(repeat));
         Assert.assertTrue("Failed to parse correctly", true);
 
     }


[07/50] [abbrv] git commit: Test for correct classloader during app init

Posted by mm...@apache.org.
Test for correct classloader during app init


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

Branch: refs/heads/master
Commit: 1c6c6bc60687f9e026491ab020775b754c9bd665
Parents: f86f31b
Author: Daniel Gómez Ferro <df...@apache.org>
Authored: Wed Mar 6 11:33:02 2013 +0100
Committer: Daniel Gómez Ferro <df...@apache.org>
Committed: Wed Mar 6 11:33:02 2013 +0100

----------------------------------------------------------------------
 .../s4/core/classloader/TestClassLoader.java       |  157 +++++++++++++++
 .../src/main/java/s4app/ProducerApp.java           |   10 +
 2 files changed, 167 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1c6c6bc6/subprojects/s4-core/src/test/java/org/apache/s4/core/classloader/TestClassLoader.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/test/java/org/apache/s4/core/classloader/TestClassLoader.java b/subprojects/s4-core/src/test/java/org/apache/s4/core/classloader/TestClassLoader.java
new file mode 100644
index 0000000..7775ac1
--- /dev/null
+++ b/subprojects/s4-core/src/test/java/org/apache/s4/core/classloader/TestClassLoader.java
@@ -0,0 +1,157 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.s4.core.classloader;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import junit.framework.Assert;
+
+import org.I0Itec.zkclient.IZkChildListener;
+import org.I0Itec.zkclient.IZkDataListener;
+import org.apache.commons.configuration.ConfigurationException;
+import org.apache.s4.base.util.S4RLoader;
+import org.apache.s4.comm.tools.TaskSetup;
+import org.apache.s4.comm.topology.ZNRecord;
+import org.apache.s4.comm.topology.ZNRecordSerializer;
+import org.apache.s4.comm.topology.ZkClient;
+import org.apache.s4.core.util.AppConfig;
+import org.apache.s4.deploy.DeploymentUtils;
+import org.apache.s4.fixtures.CommTestUtils;
+import org.apache.s4.fixtures.CoreTestUtils;
+import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.ZooKeeper;
+import org.apache.zookeeper.server.NIOServerCnxn.Factory;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class TestClassLoader {
+
+    private Factory zookeeperServerConnectionFactory;
+    private Process forkedProducerNode;
+    private ZkClient zkClient;
+    private final static String PRODUCER_CLUSTER = "producerCluster";
+    private static File producerS4rDir;
+
+    @BeforeClass
+    public static void createS4RFiles() throws Exception {
+        File gradlewFile = CoreTestUtils.findGradlewInRootDir();
+
+        producerS4rDir = new File(gradlewFile.getParentFile().getAbsolutePath() + "/test-apps/producer-app/build/libs");
+
+        CoreTestUtils.callGradleTask(new File(gradlewFile.getParentFile().getAbsolutePath()
+                + "/test-apps/producer-app/build.gradle"), "clean", new String[] { "-buildFile="
+                + gradlewFile.getParentFile().getAbsolutePath() + "/test-apps/producer-app/build.gradle" });
+        Assert.assertFalse(producerS4rDir.exists());
+
+        CoreTestUtils.callGradleTask(new File(gradlewFile.getParentFile().getAbsolutePath()
+                + "/test-apps/producer-app/build.gradle"), "s4r", new String[] { "-buildFile="
+                + gradlewFile.getParentFile().getAbsolutePath() + "/test-apps/producer-app/build.gradle" });
+
+        Assert.assertTrue(new File(producerS4rDir, "producer-app-0.0.0-SNAPSHOT.s4r").exists());
+    }
+
+    @Before
+    public void prepare() throws Exception {
+        CommTestUtils.cleanupTmpDirs();
+        zookeeperServerConnectionFactory = CommTestUtils.startZookeeperServer();
+        final ZooKeeper zk = CommTestUtils.createZkClient();
+        try {
+            zk.delete("/simpleAppCreated", -1);
+        } catch (Exception ignored) {
+        }
+
+        zk.close();
+    }
+
+    @After
+    public void cleanup() throws Exception {
+        CommTestUtils.stopZookeeperServer(zookeeperServerConnectionFactory);
+        CommTestUtils.killS4App(forkedProducerNode);
+    }
+
+    @Test
+    public void testInitialDeploymentFromFileSystem() throws Exception {
+
+        File producerS4R = new File(producerS4rDir, "producer-app-0.0.0-SNAPSHOT.s4r");
+        String uriProducer = producerS4R.toURI().toString();
+
+        initializeS4Node();
+
+        final BlockingQueue<Object> queue = new ArrayBlockingQueue<Object>(1);
+        zkClient.subscribeDataChanges("/s4/classLoader", new IZkDataListener() {
+
+            @Override
+            public void handleDataDeleted(String dataPath) throws Exception {
+            }
+
+            @Override
+            public void handleDataChange(String dataPath, Object data) throws Exception {
+                queue.put(data);
+            }
+        });
+        DeploymentUtils.initAppConfig(new AppConfig.Builder().appURI(uriProducer).build(), PRODUCER_CLUSTER, true,
+                "localhost:2181");
+
+        Object classLoaderRecord = queue.poll(20, TimeUnit.SECONDS);
+        assertTrue("Stored record has unexpected type", classLoaderRecord instanceof ZNRecord);
+        ZNRecord record = (ZNRecord) classLoaderRecord;
+
+        assertEquals("Unexpected classloader runs the app init()", S4RLoader.class.getName(), record.getId());
+    }
+
+    private void initializeS4Node() throws ConfigurationException, IOException, InterruptedException, KeeperException {
+        // 1. start s4 node. Check that no app is deployed.
+        TaskSetup taskSetup = new TaskSetup("localhost:" + CommTestUtils.ZK_PORT);
+        taskSetup.clean("s4");
+        taskSetup.setup(PRODUCER_CLUSTER, 1, 1300);
+
+        zkClient = new ZkClient("localhost:" + CommTestUtils.ZK_PORT);
+        zkClient.setZkSerializer(new ZNRecordSerializer());
+        List<String> processes = zkClient.getChildren("/s4/clusters/" + PRODUCER_CLUSTER + "/process");
+        Assert.assertTrue(processes.size() == 0);
+        final CountDownLatch signalProcessesReady = new CountDownLatch(1);
+
+        zkClient.subscribeChildChanges("/s4/clusters/" + PRODUCER_CLUSTER + "/process", new IZkChildListener() {
+
+            @Override
+            public void handleChildChange(String parentPath, List<String> currentChilds) throws Exception {
+                if (currentChilds.size() == 1) {
+                    signalProcessesReady.countDown();
+                }
+
+            }
+        });
+
+        forkedProducerNode = CoreTestUtils.forkS4Node(new String[] { "-cluster=" + PRODUCER_CLUSTER }, zkClient, 20,
+                PRODUCER_CLUSTER);
+        Assert.assertTrue(signalProcessesReady.await(20, TimeUnit.SECONDS));
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1c6c6bc6/test-apps/producer-app/src/main/java/s4app/ProducerApp.java
----------------------------------------------------------------------
diff --git a/test-apps/producer-app/src/main/java/s4app/ProducerApp.java b/test-apps/producer-app/src/main/java/s4app/ProducerApp.java
index ac7f251..0b91eb3 100644
--- a/test-apps/producer-app/src/main/java/s4app/ProducerApp.java
+++ b/test-apps/producer-app/src/main/java/s4app/ProducerApp.java
@@ -18,7 +18,11 @@
 
 package s4app;
 
+import org.apache.s4.comm.topology.ZNRecord;
+import org.apache.s4.comm.topology.ZNRecordSerializer;
+import org.apache.s4.comm.topology.ZkClient;
 import org.apache.s4.core.App;
+import org.apache.zookeeper.CreateMode;
 
 public class ProducerApp extends App {
 
@@ -35,6 +39,12 @@ public class ProducerApp extends App {
     protected void onInit() {
         System.out.println("Initing CounterApp...");
 
+        ZkClient zkClient = new ZkClient("localhost:2181");
+
+        zkClient.setZkSerializer(new ZNRecordSerializer());
+        ZNRecord record = new ZNRecord(Thread.currentThread().getContextClassLoader().getClass().getName());
+        zkClient.create("/s4/classLoader", record, CreateMode.PERSISTENT);
+
         producerPE = createPE(ProducerPE.class, "producer");
         producerPE.setStreams(createOutputStream("tickStream"));
 


[32/50] [abbrv] git commit: Added notice for metrics library

Posted by mm...@apache.org.
Added notice for metrics library


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

Branch: refs/heads/master
Commit: 5f4b5da8724d1ee71e0ded4e4f2cb6ac77622188
Parents: 97f55d1
Author: Matthieu Morel <mm...@apache.org>
Authored: Tue Mar 12 11:15:56 2013 +0100
Committer: Matthieu Morel <mm...@apache.org>
Committed: Tue Mar 12 11:15:56 2013 +0100

----------------------------------------------------------------------
 config/binrelease/NOTICE.txt |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/5f4b5da8/config/binrelease/NOTICE.txt
----------------------------------------------------------------------
diff --git a/config/binrelease/NOTICE.txt b/config/binrelease/NOTICE.txt
index 2e79a05..cccdafb 100644
--- a/config/binrelease/NOTICE.txt
+++ b/config/binrelease/NOTICE.txt
@@ -5,4 +5,12 @@ This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
 
 This product includes concurrency annotations, 
-developed by Brian Goetz and Tim Peierls (http://jcip.net/)
\ No newline at end of file
+developed by Brian Goetz and Tim Peierls (http://jcip.net/)
+
+This product includes software developed by Coda Hale and Yammer, Inc, which itself
+includes code derived from the JSR-166 project (ThreadLocalRandom), which was released
+with the following comments:
+
+    Written by Doug Lea with assistance from members of JCP JSR-166
+    Expert Group and released to the public domain, as explained at
+    http://creativecommons.org/publicdomain/zero/1.0/
\ No newline at end of file


[33/50] [abbrv] git commit: Add proper dependency exclusions for custom modules

Posted by mm...@apache.org.
Add proper dependency exclusions for custom modules


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

Branch: refs/heads/master
Commit: 4edffbf9aaf63ef4b7aee8c66c21345cedde37aa
Parents: 5f4b5da
Author: Matthieu Morel <mm...@apache.org>
Authored: Tue Mar 12 12:03:49 2013 +0100
Committer: Matthieu Morel <mm...@apache.org>
Committed: Tue Mar 12 12:03:49 2013 +0100

----------------------------------------------------------------------
 test-apps/custom-modules/build.gradle |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/4edffbf9/test-apps/custom-modules/build.gradle
----------------------------------------------------------------------
diff --git a/test-apps/custom-modules/build.gradle b/test-apps/custom-modules/build.gradle
index 607a7ff..b75015a 100644
--- a/test-apps/custom-modules/build.gradle
+++ b/test-apps/custom-modules/build.gradle
@@ -77,10 +77,15 @@ dependencies {
    compile (libraries.s4_base)
    compile (libraries.s4_comm)
 
-
-
 }
 
+configurations.all {
+        exclude group: 'com.sun.jdmk', module: 'jmxtools'
+        exclude group: 'com.sun.jmx', module: 'jmxri'
+        exclude group: 'javax.jms', module: 'jms'
+        exclude group: 'javax.mail', module: 'mail'
+    }
+    
 /* Set the manifest attributes for the S4 archive here.
 *  TODO: separate custom properties from std ones and set custom properties at the top of the build script.
 */


[22/50] [abbrv] git commit: Merge branch 'S4-127' into dev (take 2) - second merge to include left-over modification in S4-127

Posted by mm...@apache.org.
Merge branch 'S4-127' into dev (take 2)
- second merge to include left-over modification in S4-127


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

Branch: refs/heads/master
Commit: faf0da4262aae184297fa5672375666d8e3e5283
Parents: 80fb90e a4b5eef
Author: Matthieu Morel <mm...@apache.org>
Authored: Sun Mar 10 10:53:33 2013 +0100
Committer: Matthieu Morel <mm...@apache.org>
Committed: Sun Mar 10 11:06:48 2013 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/s4/tools/Status.java  |    2 +-
 .../test/java/org/apache/s4/tools/TestStatus.java  |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[19/50] [abbrv] git commit: Merge branch 'S4-66' into dev

Posted by mm...@apache.org.
Merge branch 'S4-66' into dev

Conflicts:
	subprojects/s4-core/src/test/java/org/apache/s4/deploy/TestAutomaticDeployment.java
	subprojects/s4-core/src/test/java/org/apache/s4/deploy/prodcon/TestProducerConsumer.java
	subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
	subprojects/s4-tools/src/main/resources/templates/build.gradle
	test-apps/consumer-app/build.gradle
	test-apps/producer-app/build.gradle
	test-apps/simple-deployable-app-1/build.gradle
	test-apps/twitter-adapter/build.gradle
	test-apps/twitter-counter/build.gradle


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

Branch: refs/heads/master
Commit: 042431338a51c4481e0cad706de0b66deafe26ca
Parents: eb20b95 858a8af
Author: Daniel Gómez Ferro <df...@apache.org>
Authored: Sat Mar 9 21:22:26 2013 +0100
Committer: Daniel Gómez Ferro <df...@apache.org>
Committed: Sat Mar 9 21:22:26 2013 +0100

----------------------------------------------------------------------
 subprojects/s4-benchmarks/s4-benchmarks.gradle     |    3 -
 .../s4/core/classloader/TestClassLoader.java       |    5 +-
 .../apache/s4/deploy/TestAutomaticDeployment.java  |    3 +-
 .../s4/deploy/prodcon/TestProducerConsumer.java    |    6 +-
 .../src/main/java/org/apache/s4/tools/Deploy.java  |   47 +-------
 .../src/main/java/org/apache/s4/tools/Package.java |    6 +-
 .../src/main/resources/templates/build.gradle      |   88 +++++----------
 test-apps/consumer-app/build.gradle                |   35 ++-----
 test-apps/producer-app/build.gradle                |   35 ++-----
 test-apps/simple-deployable-app-1/build.gradle     |   39 ++-----
 test-apps/twitter-adapter/build.gradle             |   60 ++---------
 test-apps/twitter-counter/build.gradle             |   34 ++-----
 12 files changed, 86 insertions(+), 275 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/04243133/subprojects/s4-benchmarks/s4-benchmarks.gradle
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/04243133/subprojects/s4-core/src/test/java/org/apache/s4/core/classloader/TestClassLoader.java
----------------------------------------------------------------------
diff --cc subprojects/s4-core/src/test/java/org/apache/s4/core/classloader/TestClassLoader.java
index 7775ac1,0000000..3e20343
mode 100644,000000..100644
--- a/subprojects/s4-core/src/test/java/org/apache/s4/core/classloader/TestClassLoader.java
+++ b/subprojects/s4-core/src/test/java/org/apache/s4/core/classloader/TestClassLoader.java
@@@ -1,157 -1,0 +1,158 @@@
 +/**
 + * Licensed to the Apache Software Foundation (ASF) under one
 + * or more contributor license agreements.  See the NOTICE file
 + * distributed with this work for additional information
 + * regarding copyright ownership.  The ASF licenses this file
 + * to you under the Apache License, Version 2.0 (the
 + * "License"); you may not use this file except in compliance
 + * with the License.  You may obtain a copy of the License at
 + *
 + *     http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +
 +package org.apache.s4.core.classloader;
 +
 +import static org.junit.Assert.assertEquals;
 +import static org.junit.Assert.assertTrue;
 +
 +import java.io.File;
 +import java.io.IOException;
 +import java.util.List;
 +import java.util.concurrent.ArrayBlockingQueue;
 +import java.util.concurrent.BlockingQueue;
 +import java.util.concurrent.CountDownLatch;
 +import java.util.concurrent.TimeUnit;
 +
 +import junit.framework.Assert;
 +
 +import org.I0Itec.zkclient.IZkChildListener;
 +import org.I0Itec.zkclient.IZkDataListener;
 +import org.apache.commons.configuration.ConfigurationException;
 +import org.apache.s4.base.util.S4RLoader;
 +import org.apache.s4.comm.tools.TaskSetup;
 +import org.apache.s4.comm.topology.ZNRecord;
 +import org.apache.s4.comm.topology.ZNRecordSerializer;
 +import org.apache.s4.comm.topology.ZkClient;
 +import org.apache.s4.core.util.AppConfig;
 +import org.apache.s4.deploy.DeploymentUtils;
 +import org.apache.s4.fixtures.CommTestUtils;
 +import org.apache.s4.fixtures.CoreTestUtils;
 +import org.apache.zookeeper.KeeperException;
 +import org.apache.zookeeper.ZooKeeper;
 +import org.apache.zookeeper.server.NIOServerCnxn.Factory;
 +import org.junit.After;
 +import org.junit.Before;
 +import org.junit.BeforeClass;
 +import org.junit.Test;
 +
 +public class TestClassLoader {
 +
 +    private Factory zookeeperServerConnectionFactory;
 +    private Process forkedProducerNode;
 +    private ZkClient zkClient;
 +    private final static String PRODUCER_CLUSTER = "producerCluster";
 +    private static File producerS4rDir;
 +
 +    @BeforeClass
 +    public static void createS4RFiles() throws Exception {
 +        File gradlewFile = CoreTestUtils.findGradlewInRootDir();
 +
 +        producerS4rDir = new File(gradlewFile.getParentFile().getAbsolutePath() + "/test-apps/producer-app/build/libs");
 +
 +        CoreTestUtils.callGradleTask(new File(gradlewFile.getParentFile().getAbsolutePath()
 +                + "/test-apps/producer-app/build.gradle"), "clean", new String[] { "-buildFile="
-                 + gradlewFile.getParentFile().getAbsolutePath() + "/test-apps/producer-app/build.gradle" });
++                + gradlewFile.getParentFile().getAbsolutePath() + "/test-apps/producer-app/build.gradle"});
 +        Assert.assertFalse(producerS4rDir.exists());
 +
 +        CoreTestUtils.callGradleTask(new File(gradlewFile.getParentFile().getAbsolutePath()
 +                + "/test-apps/producer-app/build.gradle"), "s4r", new String[] { "-buildFile="
-                 + gradlewFile.getParentFile().getAbsolutePath() + "/test-apps/producer-app/build.gradle" });
++                + gradlewFile.getParentFile().getAbsolutePath() + "/test-apps/producer-app/build.gradle",
++                "appClass=s4app.ProducerApp"});
 +
 +        Assert.assertTrue(new File(producerS4rDir, "producer-app-0.0.0-SNAPSHOT.s4r").exists());
 +    }
 +
 +    @Before
 +    public void prepare() throws Exception {
 +        CommTestUtils.cleanupTmpDirs();
 +        zookeeperServerConnectionFactory = CommTestUtils.startZookeeperServer();
 +        final ZooKeeper zk = CommTestUtils.createZkClient();
 +        try {
 +            zk.delete("/simpleAppCreated", -1);
 +        } catch (Exception ignored) {
 +        }
 +
 +        zk.close();
 +    }
 +
 +    @After
 +    public void cleanup() throws Exception {
 +        CommTestUtils.stopZookeeperServer(zookeeperServerConnectionFactory);
 +        CommTestUtils.killS4App(forkedProducerNode);
 +    }
 +
 +    @Test
 +    public void testInitialDeploymentFromFileSystem() throws Exception {
 +
 +        File producerS4R = new File(producerS4rDir, "producer-app-0.0.0-SNAPSHOT.s4r");
 +        String uriProducer = producerS4R.toURI().toString();
 +
 +        initializeS4Node();
 +
 +        final BlockingQueue<Object> queue = new ArrayBlockingQueue<Object>(1);
 +        zkClient.subscribeDataChanges("/s4/classLoader", new IZkDataListener() {
 +
 +            @Override
 +            public void handleDataDeleted(String dataPath) throws Exception {
 +            }
 +
 +            @Override
 +            public void handleDataChange(String dataPath, Object data) throws Exception {
 +                queue.put(data);
 +            }
 +        });
 +        DeploymentUtils.initAppConfig(new AppConfig.Builder().appURI(uriProducer).build(), PRODUCER_CLUSTER, true,
 +                "localhost:2181");
 +
 +        Object classLoaderRecord = queue.poll(20, TimeUnit.SECONDS);
 +        assertTrue("Stored record has unexpected type", classLoaderRecord instanceof ZNRecord);
 +        ZNRecord record = (ZNRecord) classLoaderRecord;
 +
 +        assertEquals("Unexpected classloader runs the app init()", S4RLoader.class.getName(), record.getId());
 +    }
 +
 +    private void initializeS4Node() throws ConfigurationException, IOException, InterruptedException, KeeperException {
 +        // 1. start s4 node. Check that no app is deployed.
 +        TaskSetup taskSetup = new TaskSetup("localhost:" + CommTestUtils.ZK_PORT);
 +        taskSetup.clean("s4");
 +        taskSetup.setup(PRODUCER_CLUSTER, 1, 1300);
 +
 +        zkClient = new ZkClient("localhost:" + CommTestUtils.ZK_PORT);
 +        zkClient.setZkSerializer(new ZNRecordSerializer());
 +        List<String> processes = zkClient.getChildren("/s4/clusters/" + PRODUCER_CLUSTER + "/process");
 +        Assert.assertTrue(processes.size() == 0);
 +        final CountDownLatch signalProcessesReady = new CountDownLatch(1);
 +
 +        zkClient.subscribeChildChanges("/s4/clusters/" + PRODUCER_CLUSTER + "/process", new IZkChildListener() {
 +
 +            @Override
 +            public void handleChildChange(String parentPath, List<String> currentChilds) throws Exception {
 +                if (currentChilds.size() == 1) {
 +                    signalProcessesReady.countDown();
 +                }
 +
 +            }
 +        });
 +
 +        forkedProducerNode = CoreTestUtils.forkS4Node(new String[] { "-cluster=" + PRODUCER_CLUSTER }, zkClient, 20,
 +                PRODUCER_CLUSTER);
 +        Assert.assertTrue(signalProcessesReady.await(20, TimeUnit.SECONDS));
 +
 +    }
 +}

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/04243133/subprojects/s4-core/src/test/java/org/apache/s4/deploy/TestAutomaticDeployment.java
----------------------------------------------------------------------
diff --cc subprojects/s4-core/src/test/java/org/apache/s4/deploy/TestAutomaticDeployment.java
index 60a256f,3c901d7..488f5f9
--- a/subprojects/s4-core/src/test/java/org/apache/s4/deploy/TestAutomaticDeployment.java
+++ b/subprojects/s4-core/src/test/java/org/apache/s4/deploy/TestAutomaticDeployment.java
@@@ -69,17 -69,11 +69,18 @@@ public class TestAutomaticDeployment ex
  
          File gradlewFile = CoreTestUtils.findGradlewInRootDir();
  
 +        s4rDir = new File(gradlewFile.getParentFile().getAbsolutePath()
 +                + "/test-apps/simple-deployable-app-1/build/libs");
          CoreTestUtils.callGradleTask(new File(gradlewFile.getParentFile().getAbsolutePath()
 -                + "/test-apps/simple-deployable-app-1/build.gradle"), "installS4R", new String[] {
 -                "appsDir=" + tmpAppsDir.getAbsolutePath(), "appClass=org.apache.s4.deploy.TestApp" });
 +                + "/test-apps/simple-deployable-app-1/build.gradle"), "clean", new String[] { "-buildFile="
 +                + gradlewFile.getParentFile().getAbsolutePath() + "/test-apps/simple-deployable-app-1/build.gradle" });
 +        Assert.assertFalse(s4rDir.exists());
  
 +        CoreTestUtils.callGradleTask(new File(gradlewFile.getParentFile().getAbsolutePath()
 +                + "/test-apps/simple-deployable-app-1/build.gradle"), "s4r", new String[] { "-buildFile="
-                 + gradlewFile.getParentFile().getAbsolutePath() + "/test-apps/simple-deployable-app-1/build.gradle" });
++                + gradlewFile.getParentFile().getAbsolutePath() + "/test-apps/simple-deployable-app-1/build.gradle", 
++                "appClass=org.apache.s4.deploy.TestApp" });
 +        Assert.assertTrue(new File(s4rDir, "simple-deployable-app-1-0.0.0-SNAPSHOT.s4r").exists());
      }
  
      @Test

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/04243133/subprojects/s4-core/src/test/java/org/apache/s4/deploy/prodcon/TestProducerConsumer.java
----------------------------------------------------------------------
diff --cc subprojects/s4-core/src/test/java/org/apache/s4/deploy/prodcon/TestProducerConsumer.java
index 9296611,31a08cc..dd4f9ec
--- a/subprojects/s4-core/src/test/java/org/apache/s4/deploy/prodcon/TestProducerConsumer.java
+++ b/subprojects/s4-core/src/test/java/org/apache/s4/deploy/prodcon/TestProducerConsumer.java
@@@ -62,32 -62,18 +62,34 @@@ public class TestProducerConsumer 
  
      @BeforeClass
      public static void createS4RFiles() throws Exception {
 -        tmpAppsDir = Files.createTempDir();
 -
 -        Assert.assertTrue(tmpAppsDir.exists());
          File gradlewFile = CoreTestUtils.findGradlewInRootDir();
  
 +        producerS4rDir = new File(gradlewFile.getParentFile().getAbsolutePath() + "/test-apps/producer-app/build/libs");
 +        consumerS4rDir = new File(gradlewFile.getParentFile().getAbsolutePath() + "/test-apps/consumer-app/build/libs");
 +
 +        CoreTestUtils.callGradleTask(new File(gradlewFile.getParentFile().getAbsolutePath()
 +                + "/test-apps/producer-app/build.gradle"), "clean", new String[] { "-buildFile="
 +                + gradlewFile.getParentFile().getAbsolutePath() + "/test-apps/producer-app/build.gradle" });
 +        Assert.assertFalse(producerS4rDir.exists());
 +
          CoreTestUtils.callGradleTask(new File(gradlewFile.getParentFile().getAbsolutePath()
 -                + "/test-apps/producer-app/build.gradle"), "installS4R",
 -                new String[] { "appsDir=" + tmpAppsDir.getAbsolutePath(), "appClass=s4app.ProducerApp" });
 +                + "/test-apps/producer-app/build.gradle"), "s4r", new String[] { "-buildFile="
-                 + gradlewFile.getParentFile().getAbsolutePath() + "/test-apps/producer-app/build.gradle" });
++                + gradlewFile.getParentFile().getAbsolutePath() + "/test-apps/producer-app/build.gradle",
++                "appClass=s4app.ProducerApp" });
 +
 +        Assert.assertTrue(new File(producerS4rDir, "producer-app-0.0.0-SNAPSHOT.s4r").exists());
 +
 +        CoreTestUtils.callGradleTask(new File(gradlewFile.getParentFile().getAbsolutePath()
 +                + "/test-apps/consumer-app/build.gradle"), "clean", new String[] { "-buildFile="
 +                + gradlewFile.getParentFile().getAbsolutePath() + "/test-apps/consumer-app/build.gradle" });
 +        Assert.assertFalse(consumerS4rDir.exists());
  
          CoreTestUtils.callGradleTask(new File(gradlewFile.getParentFile().getAbsolutePath()
 -                + "/test-apps/consumer-app/build.gradle"), "installS4R",
 -                new String[] { "appsDir=" + tmpAppsDir.getAbsolutePath(), "appClass=s4app.ConsumerApp" });
 +                + "/test-apps/consumer-app/build.gradle"), "s4r", new String[] { "-buildFile="
-                 + gradlewFile.getParentFile().getAbsolutePath() + "/test-apps/consumer-app/build.gradle" });
++                + gradlewFile.getParentFile().getAbsolutePath() + "/test-apps/consumer-app/build.gradle",
++                "appClass=s4app.ConsumerApp" });
 +
 +        Assert.assertTrue(new File(consumerS4rDir, "consumer-app-0.0.0-SNAPSHOT.s4r").exists());
      }
  
      @Before

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/04243133/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
----------------------------------------------------------------------
diff --cc subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
index de145cf,1070e1c..2165eca
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
@@@ -63,11 -62,8 +61,6 @@@ public class Deploy extends S4ArgsBase 
              ZkClient zkClient = new ZkClient(deployArgs.zkConnectionString, deployArgs.timeout);
              zkClient.setZkSerializer(new ZNRecordSerializer());
  
-             if (!Strings.isNullOrEmpty(deployArgs.s4rPath) && !Strings.isNullOrEmpty(deployArgs.generatedS4R)) {
-                 logger.error("-s4r and -generatedS4R options are mutually exclusive");
-                 System.exit(1);
-             }
- 
 -            tmpAppsDir = Files.createTempDir();
 -
              URI s4rURI = null;
  
              if (deployArgs.s4rPath != null) {

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/04243133/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Package.java
----------------------------------------------------------------------
diff --cc subprojects/s4-tools/src/main/java/org/apache/s4/tools/Package.java
index 209b5e9,0c98abc..084b6e9
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Package.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Package.java
@@@ -40,11 -40,8 +40,9 @@@ public class Package extends S4ArgsBas
              // prepare gradle -P parameters, including passed gradle opts
              params.add("appClass=" + packageArgs.appClass);
              params.add("appName=" + packageArgs.appName.get(0));
 -            ExecGradle.exec(packageArgs.gradleBuildFile, "installS4R", params.toArray(new String[] {}));
 +            ExecGradle.exec(packageArgs.gradleBuildFile, "s4r", params.toArray(new String[] {}),
 +                    packageArgs.debug);
  
-             // Explicitly shutdown the JVM since Gradle leaves non-daemon threads running that delay the termination
-             System.exit(0);
          } catch (Exception e) {
              LoggerFactory.getLogger(Package.class).error("Cannot deploy app", e);
          }
@@@ -59,11 -58,8 +59,11 @@@
          @Parameter(names = { "-b", "-buildFile" }, description = "Path to gradle build file for the S4 application", required = true, converter = FileConverter.class, validateWith = FileExistsValidator.class)
          File gradleBuildFile;
  
-         @Parameter(names = { "-a", "-appClass" }, description = "Full class name of the application class (extending App or AdapterApp)", required = false)
+         @Parameter(names = { "-a", "-appClass" }, description = "Full class name of the application class (extending App or AdapterApp)", required = true)
          String appClass = "";
  
 +        @Parameter(names = "-debug", description = "Display debug information from the build system", arity = 0)
 +        boolean debug = false;
 +
      }
  }

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/04243133/subprojects/s4-tools/src/main/resources/templates/build.gradle
----------------------------------------------------------------------
diff --cc subprojects/s4-tools/src/main/resources/templates/build.gradle
index 1122fcc,9a853b4..6d83c9c
--- a/subprojects/s4-tools/src/main/resources/templates/build.gradle
+++ b/subprojects/s4-tools/src/main/resources/templates/build.gradle
@@@ -17,8 -17,12 +17,10 @@@
   */
  
  
 -project.ext["s4AppInstallDir"] = hasProperty('appsDir') ? "$appsDir" : "/tmp/appsDir"
+ project.ext["appClassName"] = hasProperty('appClass')? "$appClass": "UNDEFINED"
+ 
  project.ext["s4Version"] = '0.5.0-incubating'
  description = 'Apache S4 App'
 -//defaultTasks 'installS4R'
  project.ext["archivesBaseName"] = "$project.name"
  project.ext["distRootFolder"] = "$archivesBaseName-${-> version}"
  
@@@ -159,27 -130,33 +128,26 @@@ task cp << 
      new File("classpath.txt").write(sourceSets.main.output.classesDir.path + File.pathSeparator + <s4_install_dir> + '/lib/*' + File.pathSeparator + <s4_install_dir> + '/subprojects/s4-tools/build/install/s4-tools/lib/*')
  }
  
- /* Parse source file to get the app classname so we can use it in the manifest.
- * TODO: Use a real Java parser. (This is not skipping comments for example.)
- */
- def getAppClassname(file) {
-    def classname = "UNKNOWN"
-    def lines= file.readLines()
-    def packageName = ""
-    for(line in lines) {
- 
-        def pn = line =~ /.*package\s+([\w\.]+)\s*;.*/
-        if(pn) {
-            packageName = pn[0][1] + "."
-        }
-        def an = line =~ /.*public\s+class\s+(\w+)\s+extends.+App.*\{/
- 
-        if (an) {
-            classname = packageName + an[0][1]
-            println "Found app class name: " + classname
-            break
-        }
 -/* Install the S4 archive to the install directory. */
 -task installS4R (type: Copy) {
 -   dependsOn s4r
 -   from s4r.archivePath
 -   into s4AppInstallDir
 -}
 -
+ /*Check whether the defined appClass exists and extends App*/
+ void checkAppClass() {
  
+    def loader = this.getClass().getClassLoader()
+ 
+    def jardir = new File( project.libsDir.path,'lib' )
+    def jars = jardir.listFiles().findAll { it.name.endsWith('.jar') }
+    jars.each {
+       loader.addURL(it.toURI().toURL())
     }
-    classname
+ 
+    def appJar = project.libsDir.path+"/app/"+"$project.name"+".jar"
+    loader.addURL(new URL("file://"+appJar))
+ 
+    def userClass = Class.forName(appClassName, true, this.getClass().getClassLoader())
+    def appClass = Class.forName('org.apache.s4.core.App', true, this.getClass().getClassLoader())
+ 
+    if (!(appClass.isAssignableFrom(userClass))){
+       throw new InvalidUserDataException("App class " + appClassName + " does not extend org.apache.s4.core.App")
+    }
+ 
  }
+ 

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/04243133/test-apps/consumer-app/build.gradle
----------------------------------------------------------------------
diff --cc test-apps/consumer-app/build.gradle
index 663e095,eae3228..e78e83f
--- a/test-apps/consumer-app/build.gradle
+++ b/test-apps/consumer-app/build.gradle
@@@ -34,8 -34,15 +34,13 @@@
  *
  */
  
+ /* Set the destination where we want to install the apps. */
+ //s4AppInstallDir = "/tmp/s4Apps" // TODO: decide how to standarize dirs, use env var?
+ 
 -project.ext["s4AppInstallDir"] = hasProperty('appsDir') ? "$appsDir" : "/tmp/appsDir"
+ project.ext["appClassName"] = hasProperty('appClass')? "$appClass": "UNDEFINED"
+ 
  project.ext["s4Version"] = '0.5.0-SNAPSHOT'
  description = 'Apache S4 App'
 -//defaultTasks 'installS4R'
  archivesBaseName = "$project.name"
  distRootFolder = "$archivesBaseName-${-> version}"
  

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/04243133/test-apps/producer-app/build.gradle
----------------------------------------------------------------------
diff --cc test-apps/producer-app/build.gradle
index 7524cd1,eae3228..75cd3fe
--- a/test-apps/producer-app/build.gradle
+++ b/test-apps/producer-app/build.gradle
@@@ -34,8 -34,15 +34,13 @@@
  *
  */
  
+ /* Set the destination where we want to install the apps. */
+ //s4AppInstallDir = "/tmp/s4Apps" // TODO: decide how to standarize dirs, use env var?
+ 
 -project.ext["s4AppInstallDir"] = hasProperty('appsDir') ? "$appsDir" : "/tmp/appsDir"
+ project.ext["appClassName"] = hasProperty('appClass')? "$appClass": "UNDEFINED"
+ 
  project.ext["s4Version"] = '0.5.0-SNAPSHOT'
  description = 'Apache S4 App'
 -//defaultTasks 'installS4R'
  archivesBaseName = "$project.name"
  distRootFolder = "$archivesBaseName-${-> version}"
  

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/04243133/test-apps/simple-deployable-app-1/build.gradle
----------------------------------------------------------------------
diff --cc test-apps/simple-deployable-app-1/build.gradle
index 7524cd1,f1763e8..3a45073
--- a/test-apps/simple-deployable-app-1/build.gradle
+++ b/test-apps/simple-deployable-app-1/build.gradle
@@@ -34,8 -34,15 +34,13 @@@
  *
  */
  
+ /* Set the destination where we want to install the apps. */
+ //s4AppInstallDir = "/tmp/s4Apps" // TODO: decide how to standarize dirs, use env var?
+ 
 -project.ext["s4AppInstallDir"] = hasProperty('appsDir') ? "$appsDir" : "/tmp/appsDir"
+ project.ext["appClassName"] = hasProperty('appClass')? "$appClass": "UNDEFINED"
+ 
  project.ext["s4Version"] = '0.5.0-SNAPSHOT'
  description = 'Apache S4 App'
 -//defaultTasks 'installS4R'
  archivesBaseName = "$project.name"
  distRootFolder = "$archivesBaseName-${-> version}"
  

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/04243133/test-apps/twitter-adapter/build.gradle
----------------------------------------------------------------------
diff --cc test-apps/twitter-adapter/build.gradle
index 1eeeb69,b8a11d0..80341bb
--- a/test-apps/twitter-adapter/build.gradle
+++ b/test-apps/twitter-adapter/build.gradle
@@@ -34,8 -34,15 +34,13 @@@
  *
  */
  
+ /* Set the destination where we want to install the apps. */
+ //s4AppInstallDir = "/tmp/s4Apps" // TODO: decide how to standarize dirs, use env var?
+ 
 -project.ext["s4AppInstallDir"] = hasProperty('appsDir') ? "$appsDir" : "/tmp/appsDir"
+ project.ext["appClassName"] = hasProperty('appClass')? "$appClass": "UNDEFINED"
+ 
  project.ext["s4Version"] = '0.5.0-incubating'
  description = 'Apache S4 App'
 -//defaultTasks 'installS4R'
  project.ext["archivesBaseName"] = "$project.name"
  project.ext["distRootFolder"] = "$archivesBaseName-${-> version}"
  

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/04243133/test-apps/twitter-counter/build.gradle
----------------------------------------------------------------------
diff --cc test-apps/twitter-counter/build.gradle
index 89db544,6149a13..a09962d
--- a/test-apps/twitter-counter/build.gradle
+++ b/test-apps/twitter-counter/build.gradle
@@@ -34,8 -34,15 +34,13 @@@
  *
  */
  
+ /* Set the destination where we want to install the apps. */
+ //s4AppInstallDir = "/tmp/s4Apps" // TODO: decide how to standarize dirs, use env var?
+ 
 -project.ext["s4AppInstallDir"] = hasProperty('appsDir') ? "$appsDir" : "/tmp/appsDir"
+ project.ext["appClassName"] = hasProperty('appClass')? "$appClass": "UNDEFINED"
+ 
  project.ext["s4Version"] = '0.5.0-incubating'
  description = 'Apache S4 App'
 -//defaultTasks 'installS4R'
  project.ext["archivesBaseName"] = "$project.name"
  project.ext["distRootFolder"] = "$archivesBaseName-${-> version}"
  


[09/50] [abbrv] git commit: Merge branch 'S4-102' into dev

Posted by mm...@apache.org.
Merge branch 'S4-102' into dev

Conflicts:
	subprojects/s4-core/src/main/java/org/apache/s4/core/App.java
	subprojects/s4-core/src/main/java/org/apache/s4/core/ReceiverImpl.java
	subprojects/s4-core/src/main/java/org/apache/s4/core/Sender.java
	subprojects/s4-core/src/test/java/org/apache/s4/fixtures/MockCoreModule.java


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

Branch: refs/heads/master
Commit: bac9cb2017d600e2f5d982c913fc4f41cf7c4204
Parents: 0f037e5 bbbaba4
Author: Daniel Gómez Ferro <df...@apache.org>
Authored: Thu Mar 7 10:28:35 2013 +0100
Committer: Daniel Gómez Ferro <df...@apache.org>
Committed: Thu Mar 7 10:28:35 2013 +0100

----------------------------------------------------------------------
 .../java/org/apache/s4/comm/DefaultCommModule.java |    3 +-
 .../src/main/java/org/apache/s4/core/App.java      |   25 +++++++++++++-
 .../java/org/apache/s4/core/DefaultCoreModule.java |    3 +-
 .../main/java/org/apache/s4/core/SenderImpl.java   |   18 +++++++++-
 .../org/apache/s4/fixtures/MockCoreModule.java     |    1 -
 .../org/apache/s4/wordcount/WordCounterPE.java     |   26 +++++++++------
 .../s4/example/twitter/TwitterCounterApp.java      |    2 +-
 7 files changed, 60 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/bac9cb20/subprojects/s4-comm/src/main/java/org/apache/s4/comm/DefaultCommModule.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/bac9cb20/subprojects/s4-core/src/main/java/org/apache/s4/core/App.java
----------------------------------------------------------------------
diff --cc subprojects/s4-core/src/main/java/org/apache/s4/core/App.java
index ccb02e8,673d0bb..b3c0586
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/App.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/App.java
@@@ -26,13 -26,11 +26,14 @@@ import java.util.concurrent.TimeUnit
  import org.apache.s4.base.Event;
  import org.apache.s4.base.Hasher;
  import org.apache.s4.base.KeyFinder;
 +import org.apache.s4.base.Sender;
  import org.apache.s4.base.SerializerDeserializer;
 -import org.apache.s4.comm.serialize.KryoSerDeser;
 +import org.apache.s4.comm.serialize.SerializerDeserializerFactory;
+ import org.apache.s4.comm.topology.Cluster;
  import org.apache.s4.comm.topology.RemoteStreams;
  import org.apache.s4.core.ft.CheckpointingFramework;
 +import org.apache.s4.core.staging.StreamExecutorServiceFactory;
 +import org.apache.s4.core.util.S4Metrics;
  import org.apache.s4.core.window.AbstractSlidingWindowPE;
  import org.apache.s4.core.window.SlotFactory;
  import org.slf4j.Logger;
@@@ -68,9 -66,12 +69,12 @@@ public abstract class App 
      @Inject
      private Sender sender;
      @Inject
 -    private Receiver receiver;
 +    private ReceiverImpl receiver;
  
      @Inject
+     private Cluster cluster;
+ 
+     @Inject
      private RemoteSenders remoteSenders;
  
      @Inject

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/bac9cb20/subprojects/s4-core/src/main/java/org/apache/s4/core/DefaultCoreModule.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/bac9cb20/subprojects/s4-core/src/main/java/org/apache/s4/core/SenderImpl.java
----------------------------------------------------------------------
diff --cc subprojects/s4-core/src/main/java/org/apache/s4/core/SenderImpl.java
index b103ad8,0000000..70e159a
mode 100644,000000..100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/SenderImpl.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/SenderImpl.java
@@@ -1,178 -1,0 +1,192 @@@
 +/**
 + * Licensed to the Apache Software Foundation (ASF) under one
 + * or more contributor license agreements.  See the NOTICE file
 + * distributed with this work for additional information
 + * regarding copyright ownership.  The ASF licenses this file
 + * to you under the Apache License, Version 2.0 (the
 + * "License"); you may not use this file except in compliance
 + * with the License.  You may obtain a copy of the License at
 + *
 + *     http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +
 +package org.apache.s4.core;
 +
 +import java.nio.ByteBuffer;
 +import java.util.concurrent.ExecutorService;
 +
 +import org.apache.s4.base.Emitter;
 +import org.apache.s4.base.Event;
 +import org.apache.s4.base.Hasher;
 +import org.apache.s4.base.Sender;
 +import org.apache.s4.base.SerializerDeserializer;
 +import org.apache.s4.comm.topology.Assignment;
++import org.apache.s4.comm.topology.Cluster;
++import org.apache.s4.comm.topology.ClusterChangeListener;
 +import org.apache.s4.comm.topology.ClusterNode;
 +import org.apache.s4.core.staging.SenderExecutorServiceFactory;
 +import org.apache.s4.core.util.S4Metrics;
 +import org.slf4j.Logger;
 +import org.slf4j.LoggerFactory;
 +
 +import com.google.inject.Inject;
 +
 +/**
 + * The {@link SenderImpl} and its counterpart {@link ReceiverImpl} are the top level classes of the communication layer.
 + * <p>
 + * {@link SenderImpl} is responsible for sending an event to a {@link ProcessingElement} instance using a hashKey.
 + * <p>
 + * Details on how the cluster is partitioned and how events are serialized and transmitted to its destination are hidden
 + * from the application developer.
 + */
- public class SenderImpl implements Sender {
++public class SenderImpl implements Sender, ClusterChangeListener {
 +
 +    private static Logger logger = LoggerFactory.getLogger(SenderImpl.class);
 +
 +    final private Emitter emitter;
 +    final private SerializerDeserializer serDeser;
 +    final private Hasher hasher;
++    private Cluster cluster;
 +
 +    Assignment assignment;
 +    private int localPartitionId = -1;
 +
 +    private final ExecutorService tpe;
 +
 +    @Inject
 +    S4Metrics metrics;
 +
 +    /**
 +     * 
 +     * @param emitter
 +     *            the emitter implements the low level communication layer.
 +     * @param serDeser
 +     *            a serialization mechanism.
 +     * @param hasher
 +     *            a hashing function to map keys to partition IDs.
 +     */
 +    @Inject
 +    public SenderImpl(Emitter emitter, SerializerDeserializer serDeser, Hasher hasher, Assignment assignment,
-             SenderExecutorServiceFactory senderExecutorServiceFactory) {
++            SenderExecutorServiceFactory senderExecutorServiceFactory, Cluster cluster) {
 +        this.emitter = emitter;
 +        this.serDeser = serDeser;
 +        this.hasher = hasher;
 +        this.assignment = assignment;
 +        this.tpe = senderExecutorServiceFactory.create();
++        this.cluster = cluster;
 +    }
 +
 +    @Inject
++    private void init() {
++        cluster.addListener(this);
++        resolveLocalPartitionId();
++    }
++
 +    private void resolveLocalPartitionId() {
 +        ClusterNode node = assignment.assignClusterNode();
 +        if (node != null) {
 +            localPartitionId = node.getPartition();
 +        }
 +    }
 +
 +    /*
 +     * (non-Javadoc)
 +     * 
 +     * @see org.apache.s4.core.Sender#checkAndSendIfNotLocal(java.lang.String, org.apache.s4.base.Event)
 +     */
 +    @Override
 +    public boolean checkAndSendIfNotLocal(String hashKey, Event event) {
 +        int partition = (int) (hasher.hash(hashKey) % emitter.getPartitionCount());
 +        if (partition == localPartitionId) {
 +            metrics.sentLocal();
 +            /* Hey we are in the same JVM, don't use the network. */
 +            return false;
 +        }
 +        send(partition, event);
 +        metrics.sentEvent(partition);
 +        return true;
 +    }
 +
 +    private void send(int partition, Event event) {
 +        tpe.submit(new SerializeAndSendToRemotePartitionTask(event, partition));
 +    }
 +
 +    /*
 +     * (non-Javadoc)
 +     * 
 +     * @see org.apache.s4.core.Sender#sendToRemotePartitions(org.apache.s4.base.Event)
 +     */
 +    @Override
 +    public void sendToAllRemotePartitions(Event event) {
 +        tpe.submit(new SerializeAndSendToAllRemotePartitionsTask(event));
 +
 +    }
 +
 +    class SerializeAndSendToRemotePartitionTask implements Runnable {
 +        Event event;
 +        int remotePartitionId;
 +
 +        public SerializeAndSendToRemotePartitionTask(Event event, int remotePartitionId) {
 +            this.event = event;
 +            this.remotePartitionId = remotePartitionId;
 +        }
 +
 +        @Override
 +        public void run() {
 +            ByteBuffer serializedEvent = serDeser.serialize(event);
 +            try {
 +                emitter.send(remotePartitionId, serializedEvent);
 +            } catch (InterruptedException e) {
 +                logger.error("Interrupted blocking send operation for event {}. Event is lost.", event);
 +                Thread.currentThread().interrupt();
 +            }
 +
 +        }
 +
 +    }
 +
 +    class SerializeAndSendToAllRemotePartitionsTask implements Runnable {
 +
 +        Event event;
 +
 +        public SerializeAndSendToAllRemotePartitionsTask(Event event) {
 +            super();
 +            this.event = event;
 +        }
 +
 +        @Override
 +        public void run() {
 +            ByteBuffer serializedEvent = serDeser.serialize(event);
 +
 +            for (int i = 0; i < emitter.getPartitionCount(); i++) {
 +
 +                /* Don't use the comm layer when we send to the same partition. */
 +                if (localPartitionId != i) {
 +                    try {
 +                        emitter.send(i, serializedEvent);
 +                        metrics.sentEvent(i);
 +                    } catch (InterruptedException e) {
 +                        logger.error("Interrupted blocking send operation for event {}. Event is lost.", event);
 +                        // no reason to continue: we were interrupted, so we reset the interrupt status and leave
 +                        Thread.currentThread().interrupt();
 +                        break;
 +                    }
 +                }
 +            }
 +
 +        }
 +
 +    }
 +
++    @Override
++    public void onChange() {
++        resolveLocalPartitionId();
++    }
++
 +}

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/bac9cb20/subprojects/s4-core/src/test/java/org/apache/s4/fixtures/MockCoreModule.java
----------------------------------------------------------------------
diff --cc subprojects/s4-core/src/test/java/org/apache/s4/fixtures/MockCoreModule.java
index 7bacf3b,6a60ec5..29a43e8
--- a/subprojects/s4-core/src/test/java/org/apache/s4/fixtures/MockCoreModule.java
+++ b/subprojects/s4-core/src/test/java/org/apache/s4/fixtures/MockCoreModule.java
@@@ -47,22 -45,12 +47,21 @@@ public class MockCoreModule extends Abs
  
      @Override
      protected void configure() {
 -        bind(DeploymentManager.class).to(NoOpDeploymentManager.class);
 -        bind(Emitter.class).toInstance(Mockito.mock(Emitter.class));
 -        bind(Listener.class).toInstance(Mockito.mock(Listener.class));
 -        bind(Receiver.class).toInstance(Mockito.mock(Receiver.class));
 -        Cluster clusterMock = Mockito.mock(Cluster.class);
 -        Mockito.when(clusterMock.getPhysicalCluster()).thenReturn(new PhysicalCluster(1));
 -        bind(Cluster.class).toInstance(clusterMock);
 +        // Although we want to mock as much as possible, most tests still require the machinery for routing events
 +        // within a stream/node, therefore sender and stream executors are not mocked
 +
 +        // NOTE: we use a blocking executor so that events don't get dropped in simple tests
 +        bind(StreamExecutorServiceFactory.class).to(BlockingStreamExecutorServiceFactory.class);
 +
 +        bind(SenderExecutorServiceFactory.class).to(BlockingSenderExecutorServiceFactory.class);
 +        bind(DeserializerExecutorFactory.class).to(MemoryAwareDeserializerExecutorFactory.class);
 +
 +        bind(RemoteStreams.class).toInstance(Mockito.mock(RemoteStreams.class));
 +        bind(RemoteSenders.class).toInstance(Mockito.mock(RemoteSenders.class));
 +
 +        bind(Integer.class).annotatedWith(Names.named("s4.sender.parallelism")).toInstance(8);
 +        bind(Integer.class).annotatedWith(Names.named("s4.sender.workQueueSize")).toInstance(10000);
 +
 +        bind(Integer.class).annotatedWith(Names.named("s4.stream.workQueueSize")).toInstance(10000);
- 
      }
  }

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/bac9cb20/test-apps/twitter-counter/src/main/java/org/apache/s4/example/twitter/TwitterCounterApp.java
----------------------------------------------------------------------
diff --cc test-apps/twitter-counter/src/main/java/org/apache/s4/example/twitter/TwitterCounterApp.java
index 456305a,5d7855f..50ee64f
--- a/test-apps/twitter-counter/src/main/java/org/apache/s4/example/twitter/TwitterCounterApp.java
+++ b/test-apps/twitter-counter/src/main/java/org/apache/s4/example/twitter/TwitterCounterApp.java
@@@ -85,19 -77,6 +85,19 @@@ public class TwitterCounterApp extends 
          }
      }
  
 +    private void prepareMetricsOutputs() throws IOException {
-         File metricsDirForPartition = new File("metrics/" + getReceiver().getPartitionId());
++        File metricsDirForPartition = new File("metrics/" + getPartitionId());
 +        if (metricsDirForPartition.exists()) {
 +            FileUtils.deleteDirectory(metricsDirForPartition);
 +        }
 +        // activate metrics csv dump
 +        if (!metricsDirForPartition.mkdirs()) {
 +            LoggerFactory.getLogger(getClass()).error("Cannot create directory {}",
 +                    new File("metrics").getAbsolutePath());
 +        }
 +        CsvReporter.enable(metricsDirForPartition, 10, TimeUnit.SECONDS);
 +    }
 +
      @Override
      protected void onStart() {
  


[02/50] [abbrv] git commit: Merge branch 'S4-122' into dev

Posted by mm...@apache.org.
Merge branch 'S4-122' into dev


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

Branch: refs/heads/master
Commit: b7bd59424af5aba0870fe4e296ec50617057f6e4
Parents: 457844d 45da696
Author: Daniel Gómez Ferro <df...@apache.org>
Authored: Tue Mar 5 12:48:03 2013 +0100
Committer: Daniel Gómez Ferro <df...@apache.org>
Committed: Tue Mar 5 12:48:03 2013 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/s4/tools/Deploy.java  |   12 +++++++++---
 .../src/main/java/org/apache/s4/tools/Package.java |    6 +++++-
 2 files changed, 14 insertions(+), 4 deletions(-)
----------------------------------------------------------------------



[04/50] [abbrv] git commit: Merge branch 'S4-117' into dev

Posted by mm...@apache.org.
Merge branch 'S4-117' into dev


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

Branch: refs/heads/master
Commit: 4429bef802ac2980b078f4f1a43a99fe75294509
Parents: 40ab313 f83a82a
Author: Daniel Gómez Ferro <df...@apache.org>
Authored: Tue Mar 5 15:36:51 2013 +0100
Committer: Daniel Gómez Ferro <df...@apache.org>
Committed: Tue Mar 5 15:36:51 2013 +0100

----------------------------------------------------------------------
 README.md                                          |    2 +-
 .../java/org/apache/s4/core/DefaultCoreModule.java |    4 -
 .../main/java/org/apache/s4/core/S4Bootstrap.java  |  234 +++++++++++----
 .../src/main/java/org/apache/s4/core/Server.java   |  145 ---------
 .../org/apache/s4/deploy/DeploymentManager.java    |   30 --
 .../s4/deploy/DistributedDeploymentManager.java    |  194 ------------
 .../apache/s4/deploy/NoOpDeploymentManager.java    |   31 --
 .../org/apache/s4/core/ft/FTWordCountTest.java     |    4 +-
 .../java/org/apache/s4/core/ft/RecoveryTest.java   |    8 +-
 .../core/moduleloader/ModuleLoaderTestUtils.java   |    3 +-
 .../apache/s4/deploy/TestAutomaticDeployment.java  |   19 +-
 .../s4/deploy/prodcon/TestProducerConsumer.java    |    8 +-
 .../java/org/apache/s4/fixtures/CoreTestUtils.java |   44 +++-
 .../org/apache/s4/fixtures/MockCoreModule.java     |    4 -
 .../src/main/java/org/apache/s4/tools/Status.java  |    3 +
 .../test/java/org/apache/s4/tools/TestDeploy.java  |   23 +--
 16 files changed, 229 insertions(+), 527 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/4429bef8/subprojects/s4-core/src/test/java/org/apache/s4/deploy/TestAutomaticDeployment.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/4429bef8/subprojects/s4-core/src/test/java/org/apache/s4/deploy/prodcon/TestProducerConsumer.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/4429bef8/subprojects/s4-tools/src/test/java/org/apache/s4/tools/TestDeploy.java
----------------------------------------------------------------------


[03/50] [abbrv] git commit: Merge branch 'S4-73' into dev

Posted by mm...@apache.org.
Merge branch 'S4-73' into dev

Conflicts:
	subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
	subprojects/s4-tools/src/main/java/org/apache/s4/tools/Package.java


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

Branch: refs/heads/master
Commit: 40ab313fe90f497abfe41aa5ec1d5d6b31755f08
Parents: b7bd594 a638839
Author: Daniel Gómez Ferro <df...@apache.org>
Authored: Tue Mar 5 14:56:13 2013 +0100
Committer: Daniel Gómez Ferro <df...@apache.org>
Committed: Tue Mar 5 14:56:13 2013 +0100

----------------------------------------------------------------------
 subprojects/s4-benchmarks/s4-benchmarks.gradle     |    3 -
 .../apache/s4/deploy/TestAutomaticDeployment.java  |   26 +++++-----
 .../s4/deploy/prodcon/TestProducerConsumer.java    |   36 ++++++++++-----
 .../src/main/java/org/apache/s4/tools/Deploy.java  |   20 ++++-----
 .../src/main/java/org/apache/s4/tools/Package.java |    2 +-
 .../src/main/resources/templates/build.gradle      |   10 ----
 .../test/java/org/apache/s4/tools/TestDeploy.java  |    5 +-
 test-apps/consumer-app/build.gradle                |   16 -------
 test-apps/custom-modules/build.gradle              |    6 ---
 test-apps/producer-app/build.gradle                |   15 ------
 test-apps/simple-deployable-app-1/build.gradle     |   15 ------
 test-apps/twitter-adapter/build.gradle             |   13 -----
 test-apps/twitter-counter/build.gradle             |   13 -----
 13 files changed, 50 insertions(+), 130 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/40ab313f/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
----------------------------------------------------------------------
diff --cc subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
index ab162d5,cae6266..de145cf
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
@@@ -89,12 -86,13 +86,13 @@@ public class Deploy extends S4ArgsBase 
                  List<String> params = new ArrayList<String>();
                  // prepare gradle -P parameters, including passed gradle opts
                  params.addAll(deployArgs.gradleOpts);
-                 params.add("appClass=" + deployArgs.appClass);
-                 params.add("appsDir=" + tmpAppsDir.getAbsolutePath());
-                 params.add("appName=" + deployArgs.appName);
-                 ExecGradle.exec(deployArgs.gradleBuildFile, "installS4R", params.toArray(new String[] {}),
+                 params.add("-appClass=" + deployArgs.appClass);
 -                // params.add("-appsDir=" + tmpAppsDir.getAbsolutePath());
+                 params.add("-appName=" + deployArgs.appName);
+                 params.add(deployArgs.appName);
 -                ExecGradle.exec(deployArgs.gradleBuildFile, "s4r", params.toArray(new String[] {}));
++                ExecGradle.exec(deployArgs.gradleBuildFile, "s4r", params.toArray(new String[] {}),
 +                        deployArgs.debug);
-                 File tmpS4R = new File(tmpAppsDir.getAbsolutePath() + "/" + deployArgs.appName + ".s4r");
+                 File s4rFile = new File(deployArgs.gradleBuildFile.getParentFile(), "/build/libs/" + deployArgs.appName
+                         + ".s4r");
                  if (!Strings.isNullOrEmpty(deployArgs.generatedS4R)) {
                      logger.info("Copying generated S4R to [{}]", deployArgs.generatedS4R);
                      s4rURI = new URI(deployArgs.generatedS4R);

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/40ab313f/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Package.java
----------------------------------------------------------------------
diff --cc subprojects/s4-tools/src/main/java/org/apache/s4/tools/Package.java
index 28e4bdb,0b315ba..209b5e9
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Package.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Package.java
@@@ -40,8 -40,7 +40,8 @@@ public class Package extends S4ArgsBas
              // prepare gradle -P parameters, including passed gradle opts
              params.add("appClass=" + packageArgs.appClass);
              params.add("appName=" + packageArgs.appName.get(0));
-             ExecGradle.exec(packageArgs.gradleBuildFile, "installS4R", params.toArray(new String[] {}),
 -            ExecGradle.exec(packageArgs.gradleBuildFile, "s4r", params.toArray(new String[] {}));
++            ExecGradle.exec(packageArgs.gradleBuildFile, "s4r", params.toArray(new String[] {}),
 +                    packageArgs.debug);
  
              // Explicitly shutdown the JVM since Gradle leaves non-daemon threads running that delay the termination
              System.exit(0);


[43/50] [abbrv] git commit: Added svn location to README

Posted by mm...@apache.org.
Added svn location to README


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

Branch: refs/heads/master
Commit: 039c11fe761ae5f4d78c68136cd4d819fb485578
Parents: ff6f7e2
Author: Daniel Gómez Ferro <df...@apache.org>
Authored: Thu Mar 14 16:12:07 2013 +0100
Committer: Daniel Gómez Ferro <df...@apache.org>
Committed: Thu Mar 14 16:12:07 2013 +0100

----------------------------------------------------------------------
 website/README.markdown |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/039c11fe/website/README.markdown
----------------------------------------------------------------------
diff --git a/website/README.markdown b/website/README.markdown
index 11d4ca9..e1f1c67 100644
--- a/website/README.markdown
+++ b/website/README.markdown
@@ -19,6 +19,8 @@ We also use pygments for code syntax highlighting. It's a python program, see [h
 
 # To upload the site to apache, commit the generated website to svn (site/ directory)
 
+The svn is located at [https://svn.apache.org/repos/asf/incubator/s4/](https://svn.apache.org/repos/asf/incubator/s4/)
+
 	cp -R output/* $S4_SVN_LOC/site
 	cd $S4_SVN_LOC
 	svn update
@@ -26,4 +28,4 @@ We also use pygments for code syntax highlighting. It's a python program, see [h
 	svn add <whatever is missing>
 	svn commit --username <apache username> -m "commit message"
 
-With svnpubsub, the website is automatically updated
\ No newline at end of file
+With svnpubsub, the website is automatically updated


[41/50] [abbrv] git commit: Update release notes + readme

Posted by mm...@apache.org.
Update release notes + readme


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

Branch: refs/heads/master
Commit: 0638a2a65f137485055fe9f1a9de386d88333e38
Parents: 02cefda
Author: Matthieu Morel <mm...@apache.org>
Authored: Wed Mar 13 17:03:37 2013 +0100
Committer: Matthieu Morel <mm...@apache.org>
Committed: Wed Mar 13 17:03:37 2013 +0100

----------------------------------------------------------------------
 README.md          |    8 ++++++--
 RELEASE_NOTES.html |    4 ++++
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/0638a2a6/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 8bf991b..57ee04e 100644
--- a/README.md
+++ b/README.md
@@ -43,16 +43,20 @@ We use gradle http://gradle.org as the build system.
 
 * From the root directory of the S4 project:
 
-./gradlew install
+		./gradlew install
 
 This will build the packages and install the artifacts in the local maven repository.
 
 * Then, build the tools:
 
-./gradlew s4-tools:installApp
+		./gradlew s4-tools:installApp
 
 This will build the tools so that you can drive the platform through the "s4" command.
 
+* You may also run regression tests, after artifacts are installed:
+
+		./gradlew test
+
 
 Directory structure
 -------------------

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/0638a2a6/RELEASE_NOTES.html
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES.html b/RELEASE_NOTES.html
index c2ea03e..03837a8 100644
--- a/RELEASE_NOTES.html
+++ b/RELEASE_NOTES.html
@@ -49,6 +49,10 @@ Apache S4 0.6 contains grounds on the same basis than 0.5 and brings major perfo
 </li>
 <li>[<a href='https://issues.apache.org/jira/browse/S4-127'>S4-127</a>] -         S4 status error due to invalid parsing
 </li>
+<li>[<a href='https://issues.apache.org/jira/browse/S4-128'>S4-128</a>] -         s4r task ignores appName parameter
+</li>
+<li>[<a href='https://issues.apache.org/jira/browse/S4-129'>S4-129</a>] -         s4 node ignores zk parameter from the command line
+</li>
 </ul>
                 
 <h2>        Improvement


[38/50] [abbrv] git commit: Merge branch 'S4-129' into dev

Posted by mm...@apache.org.
Merge branch 'S4-129' into dev


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

Branch: refs/heads/master
Commit: 6fd8f1dc0f37f3ed91dcb99db9fac219cb70c747
Parents: 632057f 1cd3c5d
Author: Daniel Gómez Ferro <df...@apache.org>
Authored: Wed Mar 13 13:44:10 2013 +0100
Committer: Daniel Gómez Ferro <df...@apache.org>
Committed: Wed Mar 13 13:44:10 2013 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/s4/core/S4Node.java   |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------



[10/50] [abbrv] git commit: Merge branch 'S4-103' into dev

Posted by mm...@apache.org.
Merge branch 'S4-103' into dev


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

Branch: refs/heads/master
Commit: c8f070a1c800f0117e995821d9841d6a7f4c0bef
Parents: bac9cb2 cd8f28a
Author: Daniel Gómez Ferro <df...@apache.org>
Authored: Thu Mar 7 10:57:45 2013 +0100
Committer: Daniel Gómez Ferro <df...@apache.org>
Committed: Thu Mar 7 10:57:45 2013 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/s4/base/Event.java    |   33 ++-------------
 .../org/apache/s4/comm/topology/RemoteStreams.java |   18 ++++++--
 .../apache/s4/comm/topology/StreamConsumer.java    |   11 +----
 .../apache/s4/comm/topology/ZkRemoteStreams.java   |   23 ++++------
 .../src/main/java/org/apache/s4/core/App.java      |   18 +--------
 .../org/apache/s4/core/DefaultRemoteSenders.java   |    3 +-
 .../main/java/org/apache/s4/core/ReceiverImpl.java |   27 +++---------
 .../main/java/org/apache/s4/core/RemoteStream.java |    3 +-
 .../src/main/java/org/apache/s4/core/Stream.java   |    1 -
 9 files changed, 38 insertions(+), 99 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/c8f070a1/subprojects/s4-core/src/main/java/org/apache/s4/core/App.java
----------------------------------------------------------------------
diff --cc subprojects/s4-core/src/main/java/org/apache/s4/core/App.java
index b3c0586,8a5a276..bd3848e
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/App.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/App.java
@@@ -61,10 -60,9 +61,9 @@@ public abstract class App 
      final private List<Streamable<Event>> streams = new ArrayList<Streamable<Event>>();
  
      /* Pes indexed by name. */
 -    Map<String, ProcessingElement> peByName = Maps.newHashMap();
 +    final Map<String, ProcessingElement> peByName = Maps.newHashMap();
  
      private ClockType clockType = ClockType.WALL_CLOCK;
-     private int id = -1;
  
      @Inject
      private Sender sender;


[29/50] [abbrv] git commit: Update release notes + fix distribution build

Posted by mm...@apache.org.
Update release notes + fix distribution build


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

Branch: refs/heads/master
Commit: 47620a5f7929ce66176648f2837a9c2bd5475e94
Parents: 96f04a6
Author: Matthieu Morel <mm...@apache.org>
Authored: Sun Mar 10 16:51:26 2013 +0100
Committer: Matthieu Morel <mm...@apache.org>
Committed: Sun Mar 10 17:50:22 2013 +0100

----------------------------------------------------------------------
 RELEASE_NOTES.html                                 |  109 +++++++--------
 build.gradle                                       |    1 +
 subprojects/s4-benchmarks/s4-benchmarks.gradle     |    1 -
 .../src/main/resources/templates/newApp.README     |    2 +-
 4 files changed, 54 insertions(+), 59 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/47620a5f/RELEASE_NOTES.html
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES.html b/RELEASE_NOTES.html
index afe12e6..c2ea03e 100644
--- a/RELEASE_NOTES.html
+++ b/RELEASE_NOTES.html
@@ -1,119 +1,114 @@
 
 <p>
-        Release Notes - Apache S4 - Version 0.5.0
+        Release Notes - Apache S4 - Version 0.6.0
 </p>
 <p>
-S4 is a general-purpose, distributed, scalable, partially fault-tolerant, pluggable platform 
+S4 is a general-purpose, distributed, scalable, fault-tolerant, pluggable platform 
 that allows programmers to easily develop applications for processing continuous unbounded streams of data.
 </p>
 <p>
-Apache S4 0.5.0 is the first release of S4 as an Apache Incubator project. 
-It is also a complete refactoring of the previous S4 codebase.
-</p>
-    
-<h2>        Sub-task
+
+Apache S4 0.6 contains grounds on the same basis than 0.5 and brings major performance and usability improvements.
+                
+<h2>        Bug
 </h2>
 <ul>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-24'>S4-24</a>] -         Dynamic deployment of S4 applications from a remote repository
-</li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-29'>S4-29</a>] -         Remove file-based configurations
-</li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-33'>S4-33</a>] -         TestUtils and modules should be split across s4-comm and s4-core
+<li>[<a href='https://issues.apache.org/jira/browse/S4-54'>S4-54</a>] -         script can&#39;t be executed on cygwin
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-36'>S4-36</a>] -         CommTests should use ZkBasedClusterManagement
+<li>[<a href='https://issues.apache.org/jira/browse/S4-55'>S4-55</a>] -         s4-piper can‘t be executed success on cygwin
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-65'>S4-65</a>] -         Create s4 status command
+<li>[<a href='https://issues.apache.org/jira/browse/S4-64'>S4-64</a>] -         S4-piper cannot be built on RHEL 5 Linux
 </li>
-</ul>
-            
-<h2>        Bug
-</h2>
-<ul>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-12'>S4-12</a>] -         Dynamic Method Dispatching
+<li>[<a href='https://issues.apache.org/jira/browse/S4-68'>S4-68</a>] -         PE Prototypes are created from a Thread with the wrong ClassLoader
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-14'>S4-14</a>] -         Listener.recv() behavior when interrupted
+<li>[<a href='https://issues.apache.org/jira/browse/S4-90'>S4-90</a>] -         &quot;unchecked or unsafe operations&quot; warning
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-18'>S4-18</a>] -         gradle test fails
+<li>[<a href='https://issues.apache.org/jira/browse/S4-98'>S4-98</a>] -         Remove duplicate Key class
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-23'>S4-23</a>] -         NettyEmitter -- 1. Infinitely waiting on connection, 2. numPartitions is same as numClusterNodes
+<li>[<a href='https://issues.apache.org/jira/browse/S4-103'>S4-103</a>] -         Inconsistent Event API on streamName/streamId
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-26'>S4-26</a>] -         standalone application build script fails when the source directory contains more than 1 class
+<li>[<a href='https://issues.apache.org/jira/browse/S4-105'>S4-105</a>] -         Incorrect method implementation in org.apache.s4.core.Stream
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-43'>S4-43</a>] -         Replace deprecated method in Gradle
+<li>[<a href='https://issues.apache.org/jira/browse/S4-106'>S4-106</a>] -         OverloadDispatcherGenerator generates a lot of files under the /tmp folder
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-56'>S4-56</a>] -         Prevent concurrent access to published s4r files
+<li>[<a href='https://issues.apache.org/jira/browse/S4-107'>S4-107</a>] -         zkClient connect timeout when deploy application 
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-61'>S4-61</a>] -         Threads running the PEs don&#39;t have a Context Class Loader
+<li>[<a href='https://issues.apache.org/jira/browse/S4-109'>S4-109</a>] -         TCPEmitter#send() should return false when it doesn&#39;t send a packet across
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-63'>S4-63</a>] -         onTime() events are not synchronized correctly
+<li>[<a href='https://issues.apache.org/jira/browse/S4-111'>S4-111</a>] -         Deployment fails getting the .s4r file from the web
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-70'>S4-70</a>] -         s4 node command ignores -zk parameter
+<li>[<a href='https://issues.apache.org/jira/browse/S4-112'>S4-112</a>] -         Gradle doesn&#39;t resolve dependencies when they are partially in the maven repository
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-71'>S4-71</a>] -         s4 deploy mismanages s4r URI
+<li>[<a href='https://issues.apache.org/jira/browse/S4-116'>S4-116</a>] -         Multiple bindings of RemoteEmitters in DefaultCommModule
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-74'>S4-74</a>] -         NullPointerException on TCPEmitter.onChange() 
+<li>[<a href='https://issues.apache.org/jira/browse/S4-120'>S4-120</a>] -         User singleton scope for injections that should have a unique instance
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-82'>S4-82</a>] -         Fix local communication optimization
+<li>[<a href='https://issues.apache.org/jira/browse/S4-123'>S4-123</a>] -         Fix incomplete javadoc in AbstractSlidingWindowPE + other javadoc updates
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-87'>S4-87</a>] -         Checkpointing: recovery : avoid rejections upon fetching
+<li>[<a href='https://issues.apache.org/jira/browse/S4-126'>S4-126</a>] -         Log two times when error happens during create App
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-89'>S4-89</a>] -         Fix references to S4 libs when resolving classpath for adapter in new S4 application
+<li>[<a href='https://issues.apache.org/jira/browse/S4-127'>S4-127</a>] -         S4 status error due to invalid parsing
 </li>
 </ul>
-            
+                
 <h2>        Improvement
 </h2>
 <ul>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-6'>S4-6</a>] -         Netty initialization
+<li>[<a href='https://issues.apache.org/jira/browse/S4-8'>S4-8</a>] -         Blocking stream queues in cluster mode
+</li>
+<li>[<a href='https://issues.apache.org/jira/browse/S4-48'>S4-48</a>] -         When Emitter buffers fill up, enable App-specific behavior to drop/block/throttle input 
+</li>
+<li>[<a href='https://issues.apache.org/jira/browse/S4-59'>S4-59</a>] -         Resource loading from the S4 node classpath
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-17'>S4-17</a>] -         Put tmp dir under build
+<li>[<a href='https://issues.apache.org/jira/browse/S4-62'>S4-62</a>] -         Multithreaded Streams
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-21'>S4-21</a>] -         Create standard PEs, and Event classes
+<li>[<a href='https://issues.apache.org/jira/browse/S4-66'>S4-66</a>] -         S4R packaging: improve app class resolution
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-22'>S4-22</a>] -         Adaptor + inter app communication
+<li>[<a href='https://issues.apache.org/jira/browse/S4-73'>S4-73</a>] -         Remove appsDir concept
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-27'>S4-27</a>] -         extensions to cluster configuration through Zookeeper
+<li>[<a href='https://issues.apache.org/jira/browse/S4-76'>S4-76</a>] -         Remove unused appId identifiers
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-34'>S4-34</a>] -         Rename s4.comm.netty and constituents to s4.comm.tcp
+<li>[<a href='https://issues.apache.org/jira/browse/S4-79'>S4-79</a>] -         Validate -appClass parameter of s4r command
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-44'>S4-44</a>] -         optional backoff upon multiple consecutive failed checkpoint fetches
+<li>[<a href='https://issues.apache.org/jira/browse/S4-94'>S4-94</a>] -         Update kryo to version 2
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-57'>S4-57</a>] -         Document and improve the windowing PE
+<li>[<a href='https://issues.apache.org/jira/browse/S4-95'>S4-95</a>] -         Performance improvements
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-60'>S4-60</a>] -         Development mode for rapid application development and testing
+<li>[<a href='https://issues.apache.org/jira/browse/S4-96'>S4-96</a>] -         Log uncaught exception in spawned threads
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-67'>S4-67</a>] -         S4R packaging: improve packaging of dependencies
+<li>[<a href='https://issues.apache.org/jira/browse/S4-99'>S4-99</a>] -         Provide injectable load shedding mechanism
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-69'>S4-69</a>] -         Update gradle to 1.0
+<li>[<a href='https://issues.apache.org/jira/browse/S4-102'>S4-102</a>] -         Add facilities for accessing partition information from the application
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-72'>S4-72</a>] -         Resource loading from S4R
+<li>[<a href='https://issues.apache.org/jira/browse/S4-108'>S4-108</a>] -         Share ZooKeeper client connections from S4 nodes
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-75'>S4-75</a>] -         Code improvements in comm layer
+<li>[<a href='https://issues.apache.org/jira/browse/S4-117'>S4-117</a>] -         Improve initialization and bootstrapping
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-78'>S4-78</a>] -         Gradle tasks don&#39;t finish as soon as possible
+<li>[<a href='https://issues.apache.org/jira/browse/S4-118'>S4-118</a>] -         Check whether the app class exists when build s4r file
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-81'>S4-81</a>] -         S4 tools syntax: remove curly braces + expose custom modules config
+<li>[<a href='https://issues.apache.org/jira/browse/S4-119'>S4-119</a>] -         Publish S4 maven artifacts on public maven repository
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-85'>S4-85</a>] -         Improve handling of ZK connection changes 
+<li>[<a href='https://issues.apache.org/jira/browse/S4-122'>S4-122</a>] -         Add debug option for s4 tools
 </li>
 </ul>
     
 <h2>        New Feature
 </h2>
 <ul>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-4'>S4-4</a>] -         Dynamic App Loading
+<li>[<a href='https://issues.apache.org/jira/browse/S4-5'>S4-5</a>] -         Prototype app builder
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-11'>S4-11</a>] -         add checkpointing mechanism to s4-piper
+<li>[<a href='https://issues.apache.org/jira/browse/S4-83'>S4-83</a>] -         S4 command for preparing S4 projects for IDEs: eclipsify|idealize etc..
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-38'>S4-38</a>] -         S4 command line utility
+<li>[<a href='https://issues.apache.org/jira/browse/S4-86'>S4-86</a>] -         Metrics
 </li>
 </ul>
-                            
+                        
 <h2>        Task
 </h2>
 <ul>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-31'>S4-31</a>] -         Facilities for packaging example and test apps
+<li>[<a href='https://issues.apache.org/jira/browse/S4-97'>S4-97</a>] -         Add a build task for easily running Apache Creadur/Rat
 </li>
-<li>[<a href='https://issues.apache.org/jira/browse/S4-88'>S4-88</a>] -         Prepare 0.5.0 release
+<li>[<a href='https://issues.apache.org/jira/browse/S4-124'>S4-124</a>] -         Update documentation for 0.6.0 release
 </li>
 </ul>
+                    
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/47620a5f/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index b5428a0..00511f9 100644
--- a/build.gradle
+++ b/build.gradle
@@ -292,6 +292,7 @@ task srcDist(dependsOn: ["javadoc"], type: Zip) {
     exclude ('**/build/**')
     exclude ('**/tmp/**')
     exclude ('**/bin/**')
+    exclude ('website/**')
     into (baseName+'-'+version+'-'+classifier)
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/47620a5f/subprojects/s4-benchmarks/s4-benchmarks.gradle
----------------------------------------------------------------------
diff --git a/subprojects/s4-benchmarks/s4-benchmarks.gradle b/subprojects/s4-benchmarks/s4-benchmarks.gradle
index 222d1b4..5ed58c0 100644
--- a/subprojects/s4-benchmarks/s4-benchmarks.gradle
+++ b/subprojects/s4-benchmarks/s4-benchmarks.gradle
@@ -31,7 +31,6 @@ group = 'org.apache.s4'
 apply plugin: 'java'
 apply plugin: 'eclipse'
 apply plugin: 'idea'
-apply plugin:'application'
 
 /* Set Java version. */
 sourceCompatibility = 1.6

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/47620a5f/subprojects/s4-tools/src/main/resources/templates/newApp.README
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/resources/templates/newApp.README b/subprojects/s4-tools/src/main/resources/templates/newApp.README
index e572737..69975c7 100644
--- a/subprojects/s4-tools/src/main/resources/templates/newApp.README
+++ b/subprojects/s4-tools/src/main/resources/templates/newApp.README
@@ -24,7 +24,7 @@
  2. define a logical cluster for your application "./s4 newCluster -cluster=<nameOfTheCluster> -nbTasks=<number of partitions> -flp=<a port number for the first node, other nodes use an increment on this initial port>"
  3. start a node and attach it to the cluster "./s4 node -cluster=<nameOfTheCluster>"
  4. package the application "./s4 s4r -a=<app class> -b=`pwd`/build.gradle <package name>
- 5. deploy the application "./s4 deploy -s4r=`pwd`/build/libs/<package name>.s4r -c=<nameOfTheCluster> -appName=<app name in Zookeeper>"
+ 5. deploy (configure) the application "./s4 deploy -s4r=`pwd`/build/libs/<package name>.s4r -c=<nameOfTheCluster> -appName=<app name in Zookeeper>"
  6. check the status of the S4 cluster "s4 status"
 
  If you want to inject events from application 2 into application 1 on cluster 1:


[45/50] [abbrv] git commit: S4-130 Update and document parameters initialization from nodes - applicable to csv metrics logging configuration - also: license update for some xml files

Posted by mm...@apache.org.
S4-130 Update and document parameters initialization from nodes
- applicable to csv metrics logging configuration
- also: license update for some xml files


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

Branch: refs/heads/master
Commit: 394622b224ebc8eabf26311466cc8f06f27e503e
Parents: 2a5f92c
Author: Matthieu Morel <mm...@apache.org>
Authored: Fri Mar 15 17:28:59 2013 +0100
Committer: Matthieu Morel <mm...@apache.org>
Committed: Fri Mar 15 17:29:51 2013 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/s4/core/S4Node.java   |   21 ++++-
 .../java/org/apache/s4/core/util/ParsingUtils.java |   66 +++++++++++++++
 subprojects/s4-edsl/src/main/diezel/s4/s4-impl.xml |   16 ++++
 subprojects/s4-edsl/src/main/diezel/s4/s4.xml      |   16 ++++
 .../src/main/java/org/apache/s4/tools/Deploy.java  |   42 +--------
 website/content/doc/0.6.0/metrics.md               |    9 ++-
 6 files changed, 126 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/394622b2/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Node.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Node.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Node.java
index 7aafe90..fb8f6e4 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Node.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Node.java
@@ -19,16 +19,20 @@ package org.apache.s4.core;
 
 import java.io.IOException;
 import java.lang.Thread.UncaughtExceptionHandler;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
 
 import org.apache.s4.core.util.ArchiveFetchException;
 import org.apache.s4.core.util.ParametersInjectionModule;
+import org.apache.s4.core.util.ParsingUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.beust.jcommander.JCommander;
 import com.beust.jcommander.Parameter;
 import com.beust.jcommander.Parameters;
-import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Maps;
 import com.google.common.io.Resources;
 import com.google.inject.Guice;
 import com.google.inject.Injector;
@@ -68,10 +72,15 @@ public class S4Node {
             }
         });
 
+        // inject parameter from the command line, including zk string
+        Map<String, String> inlineParameters = Maps.newHashMap(ParsingUtils
+                .convertListArgsToMap(nodeArgs.extraNamedParameters));
+        inlineParameters.put("s4.cluster.zk_address", nodeArgs.zkConnectionString);
+
         Injector injector = Guice.createInjector(Modules.override(
                 new BaseModule(Resources.getResource("default.s4.base.properties").openStream(), nodeArgs.clusterName))
-                .with(new ParametersInjectionModule(ImmutableMap.of("s4.cluster.zk_address",
-                        nodeArgs.zkConnectionString))));
+                .with(new ParametersInjectionModule(inlineParameters)));
+
         S4Bootstrap bootstrap = injector.getInstance(S4Bootstrap.class);
         try {
             bootstrap.start(injector);
@@ -96,5 +105,11 @@ public class S4Node {
         @Parameter(names = "-zk", description = "Zookeeper connection string", required = false)
         String zkConnectionString = "localhost:2181";
 
+        @Parameter(names = { "-namedStringParameters", "-p" }, description = "Comma-separated list of "
+                + "inline configuration parameters, taking precedence over homonymous configuration parameters from "
+                + "configuration files. Syntax: '-p=name1=value1,name2=value2 '. "
+                + "NOTE: application parameters should be injected in the application configuration/deployment step."
+                + "Only parameters relevant to the node should be injected here, e.g. metrics logging configuration", hidden = false, converter = ParsingUtils.InlineConfigParameterConverter.class)
+        List<String> extraNamedParameters = new ArrayList<String>();
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/394622b2/subprojects/s4-core/src/main/java/org/apache/s4/core/util/ParsingUtils.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/util/ParsingUtils.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/util/ParsingUtils.java
new file mode 100644
index 0000000..37e18de
--- /dev/null
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/util/ParsingUtils.java
@@ -0,0 +1,66 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.s4.core.util;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.beust.jcommander.IStringConverter;
+import com.beust.jcommander.internal.Maps;
+
+/**
+ * Utilities for parsing command line parameters
+ */
+public class ParsingUtils {
+
+    public static Map<String, String> convertListArgsToMap(List<String> args) {
+        Map<String, String> result = Maps.newHashMap();
+        for (String arg : args) {
+            String[] split = arg.split("[=]");
+            if (!(split.length == 2)) {
+                throw new RuntimeException("Invalid args: " + Arrays.toString(args.toArray(new String[] {})));
+            }
+            result.put(split[0], split[1]);
+        }
+        return result;
+    }
+
+    public static class InlineConfigParameterConverter implements IStringConverter<String> {
+
+        private static Logger logger = LoggerFactory.getLogger(InlineConfigParameterConverter.class);
+
+        @Override
+        public String convert(String arg) {
+            Pattern parameterPattern = Pattern.compile("(\\S+=\\S+)");
+            logger.info("processing inline configuration parameter {}", arg);
+            Matcher parameterMatcher = parameterPattern.matcher(arg);
+            if (!parameterMatcher.find()) {
+                throw new IllegalArgumentException("Cannot understand parameter " + arg);
+            }
+            return parameterMatcher.group(1);
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/394622b2/subprojects/s4-edsl/src/main/diezel/s4/s4-impl.xml
----------------------------------------------------------------------
diff --git a/subprojects/s4-edsl/src/main/diezel/s4/s4-impl.xml b/subprojects/s4-edsl/src/main/diezel/s4/s4-impl.xml
index 796a781..e562800 100644
--- a/subprojects/s4-edsl/src/main/diezel/s4/s4-impl.xml
+++ b/subprojects/s4-edsl/src/main/diezel/s4/s4-impl.xml
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License.-->
 <diezelImplementation xmlns="http://diezel.ericaro.net/2.0.0/">
 	<package>org.apache.s4.edsl</package>
 	<name>Builder</name>

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/394622b2/subprojects/s4-edsl/src/main/diezel/s4/s4.xml
----------------------------------------------------------------------
diff --git a/subprojects/s4-edsl/src/main/diezel/s4/s4.xml b/subprojects/s4-edsl/src/main/diezel/s4/s4.xml
index 90764b2..c019141 100644
--- a/subprojects/s4-edsl/src/main/diezel/s4/s4.xml
+++ b/subprojects/s4-edsl/src/main/diezel/s4/s4.xml
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License. -->
 <diezel xmlns="http://diezel.ericaro.net/2.0.0/">
 	<package>org.apache.s4.edsl</package>
 	<name>S4DSL</name>

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/394622b2/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
index f78b866..695faf3 100644
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/Deploy.java
@@ -23,13 +23,11 @@ import java.net.URI;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
 
 import org.I0Itec.zkclient.ZkClient;
 import org.apache.s4.comm.topology.ZNRecordSerializer;
 import org.apache.s4.core.util.AppConfig;
+import org.apache.s4.core.util.ParsingUtils;
 import org.apache.s4.deploy.DeploymentUtils;
 import org.gradle.tooling.BuildLauncher;
 import org.gradle.tooling.GradleConnector;
@@ -37,10 +35,8 @@ import org.gradle.tooling.ProgressListener;
 import org.gradle.tooling.ProjectConnection;
 import org.slf4j.LoggerFactory;
 
-import com.beust.jcommander.IStringConverter;
 import com.beust.jcommander.Parameter;
 import com.beust.jcommander.Parameters;
-import com.beust.jcommander.internal.Maps;
 import com.google.common.base.Strings;
 
 /**
@@ -86,8 +82,8 @@ public class Deploy extends S4ArgsBase {
                             .appURI(s4rURI == null ? null : s4rURI.toString())
                             .customModulesNames(deployArgs.modulesClassesNames)
                             .customModulesURIs(deployArgs.modulesURIs).appClassName(deployArgs.appClass)
-                            .namedParameters(convertListArgsToMap(deployArgs.extraNamedParameters)).build(),
-                    deployArgs.clusterName, false, deployArgs.zkConnectionString);
+                            .namedParameters(ParsingUtils.convertListArgsToMap(deployArgs.extraNamedParameters))
+                            .build(), deployArgs.clusterName, false, deployArgs.zkConnectionString);
             // Explicitly shutdown the JVM since Gradle leaves non-daemon threads running that delay the termination
             if (!deployArgs.testMode) {
                 System.exit(0);
@@ -98,18 +94,6 @@ public class Deploy extends S4ArgsBase {
 
     }
 
-    private static Map<String, String> convertListArgsToMap(List<String> args) {
-        Map<String, String> result = Maps.newHashMap();
-        for (String arg : args) {
-            String[] split = arg.split("[=]");
-            if (!(split.length == 2)) {
-                throw new RuntimeException("Invalid args: " + Arrays.toString(args.toArray(new String[] {})));
-            }
-            result.put(split[0], split[1]);
-        }
-        return result;
-    }
-
     @Parameters(commandNames = "s4 deploy", commandDescription = "Package and deploy application to S4 cluster", separators = "=")
     static class DeployAppArgs extends S4ArgsBase {
 
@@ -137,7 +121,7 @@ public class Deploy extends S4ArgsBase {
         @Parameter(names = { "-modulesClasses", "-emc", "-mc" }, description = "Fully qualified class names of custom modules")
         List<String> modulesClassesNames = new ArrayList<String>();
 
-        @Parameter(names = { "-namedStringParameters", "-p" }, description = "Comma-separated list of inline configuration parameters, taking precedence over homonymous configuration parameters from configuration files. Syntax: '-p=name1=value1,name2=value2 '", hidden = false, converter = InlineConfigParameterConverter.class)
+        @Parameter(names = { "-namedStringParameters", "-p" }, description = "Comma-separated list of inline configuration parameters, taking precedence over homonymous configuration parameters from configuration files. Syntax: '-p=name1=value1,name2=value2 '", hidden = false, converter = ParsingUtils.InlineConfigParameterConverter.class)
         List<String> extraNamedParameters = new ArrayList<String>();
 
         @Parameter(names = "-testMode", description = "Special mode for regression testing", hidden = true)
@@ -147,24 +131,6 @@ public class Deploy extends S4ArgsBase {
         boolean debug = false;
     }
 
-    /**
-     * Parameters parsing utility.
-     * 
-     */
-    public static class InlineConfigParameterConverter implements IStringConverter<String> {
-
-        @Override
-        public String convert(String arg) {
-            Pattern parameterPattern = Pattern.compile("(\\S+=\\S+)");
-            logger.info("processing inline configuration parameter {}", arg);
-            Matcher parameterMatcher = parameterPattern.matcher(arg);
-            if (!parameterMatcher.find()) {
-                throw new IllegalArgumentException("Cannot understand parameter " + arg);
-            }
-            return parameterMatcher.group(1);
-        }
-    }
-
     static class ExecGradle {
 
         public static void exec(File buildFile, String taskName, String[] params, boolean debug) throws Exception {

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/394622b2/website/content/doc/0.6.0/metrics.md
----------------------------------------------------------------------
diff --git a/website/content/doc/0.6.0/metrics.md b/website/content/doc/0.6.0/metrics.md
index 70d08d5..cdc2469 100644
--- a/website/content/doc/0.6.0/metrics.md
+++ b/website/content/doc/0.6.0/metrics.md
@@ -24,14 +24,14 @@ You can also monitor your own PEs. Simply add new probes (`Meter`, `Gauge`, etc.
 
 By default, metrics are exposed by each node through JMX.
 
-The `s4.metrics.config` parameter enables periodic dumps of aggregated statistics to the **console** or to **files** in csv format. This parameter is specified as an application parameter, and must match the following regular expression: 
+The `s4.metrics.config` parameter enables periodic dumps of aggregated statistics to the **console** or to **files** in csv format. This parameter is specified as a node or application parameter [^1], and must match the following regular expression: 
 
 	(csv:.+|console):(\d+):(DAYS|HOURS|MICROSECONDS|MILLISECONDS|MINUTES|NANOSECONDS|SECONDS)
 
 Examples:
 	
 	# dump metrics to csv files to /path/to/directory every 10 seconds
-	# (recommendation: use a clean directory)
+	# (recommendation: use a different and clean directory for each of the nodes)
 	csv:/path/to/directory:10:SECONDS
 	
 	# dump metrics to the console every minute
@@ -39,4 +39,7 @@ Examples:
 	
 	
 
-Reporting to Ganglia or Graphite is not provided out of the box with S4, but it's quite easy to add. You simply have to add the corresponding dependencies to your project and enable reporting to these systems during the initialization of your application. See the [metrics](http://metrics.codahale.com) documentation for more information.
\ No newline at end of file
+Reporting to Ganglia or Graphite is not provided out of the box with S4, but it's quite easy to add. You simply have to add the corresponding dependencies to your project and enable reporting to these systems during the initialization of your application. See the [metrics](http://metrics.codahale.com) documentation for more information.
+
+
+[^1]: csv-based metrics logging are usually specified as a node configuration, and must point to a clean directory, different for each node. Otherwise the metrics logging system will try to create multiple new files with the same name, and depending on your setup, that may not be possible.
\ No newline at end of file


[39/50] [abbrv] git commit: S4-128 Fix TestDeploy

Posted by mm...@apache.org.
S4-128 Fix TestDeploy


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

Branch: refs/heads/master
Commit: bd3d43cfe7839d649af52f82abf6f1101596a8cc
Parents: 1495a14
Author: Daniel Gómez Ferro <df...@apache.org>
Authored: Wed Mar 13 16:10:17 2013 +0100
Committer: Daniel Gómez Ferro <df...@apache.org>
Committed: Wed Mar 13 16:10:17 2013 +0100

----------------------------------------------------------------------
 .../test/java/org/apache/s4/tools/TestDeploy.java  |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/bd3d43cf/subprojects/s4-tools/src/test/java/org/apache/s4/tools/TestDeploy.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/test/java/org/apache/s4/tools/TestDeploy.java b/subprojects/s4-tools/src/test/java/org/apache/s4/tools/TestDeploy.java
index 65be613..b1019ba 100644
--- a/subprojects/s4-tools/src/test/java/org/apache/s4/tools/TestDeploy.java
+++ b/subprojects/s4-tools/src/test/java/org/apache/s4/tools/TestDeploy.java
@@ -62,7 +62,7 @@ public class TestDeploy extends ZkBasedTest {
         File s4rToDeploy = new File(tmpDir, String.valueOf(System.currentTimeMillis()));
 
         Assert.assertTrue(ByteStreams.copy(Files.newInputStreamSupplier(new File(TestAutomaticDeployment.s4rDir,
-                "simple-deployable-app-1-0.0.0-SNAPSHOT.s4r")), Files.newOutputStreamSupplier(s4rToDeploy)) > 0);
+                "simpleApp-0.0.0-SNAPSHOT.s4r")), Files.newOutputStreamSupplier(s4rToDeploy)) > 0);
 
         s4rHttpServer = new S4RHttpServer(8080, tmpDir);
         s4rHttpServer.start();