incubator-s4-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmo...@apache.org
Subject [4/12] git commit: S4-123 Javadoc updates
Date Sun, 10 Mar 2013 20:07:10 GMT
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/dev
Commit: 66c81de070e438e090092eeb30688e34ae7309a1
Parents: eb20b95
Author: Matthieu Morel <mmorel@apache.org>
Authored: Sat Mar 9 15:49:00 2013 +0100
Committer: Matthieu Morel <mmorel@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";


Mime
View raw message