You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wayang.apache.org by be...@apache.org on 2021/09/22 15:21:45 UTC

[incubator-wayang] 04/15: [WAYANG-28] javadoc to sniffer package

This is an automated email from the ASF dual-hosted git repository.

bertty pushed a commit to branch WAYANG-28
in repository https://gitbox.apache.org/repos/asf/incubator-wayang.git

commit 428d3283b952393c47ab660460daf9f04bf80f06
Author: Bertty Contreras-Rojas <be...@scalytics.io>
AuthorDate: Mon May 10 13:59:33 2021 -0400

    [WAYANG-28] javadoc to sniffer package
---
 .../plugin/hackit/core/sniffer/HackitSniffer.java  | 80 ++++++++++++++--------
 .../plugin/hackit/core/sniffer/actor/Actor.java    |  1 +
 .../hackit/core/sniffer/inject/EmptyInjector.java  |  3 +-
 .../hackit/core/sniffer/inject/Injector.java       | 15 ++--
 .../hackit/core/sniffer/shipper/PSProtocol.java    |  3 +-
 .../hackit/core/sniffer/shipper/Shipper.java       | 60 ++++++++--------
 .../sniffer/shipper/receiver/BufferReceiver.java   | 22 +++++-
 .../sniffer/shipper/receiver/EmptyReceiver.java    |  3 +-
 .../core/sniffer/shipper/receiver/Receiver.java    | 15 ++--
 .../core/sniffer/shipper/sender/EmptySender.java   |  2 +-
 .../hackit/core/sniffer/shipper/sender/Sender.java | 13 ++--
 .../core/sniffer/sniff/CollectionTagsToSniff.java  |  2 +-
 .../core/sniffer/sniff/SingleTagToSniff.java       |  2 +-
 .../plugin/hackit/core/sniffer/sniff/Sniff.java    | 10 ++-
 14 files changed, 150 insertions(+), 81 deletions(-)

diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/HackitSniffer.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/HackitSniffer.java
index 6740265..58e0366 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/HackitSniffer.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/HackitSniffer.java
@@ -31,12 +31,14 @@ import java.util.Iterator;
 import java.util.function.Function;
 
 /**
+ * {@link HackitSniffer} is the one of the main function on Hackit, this function have the resposability of execute the
+ * logic of sniff the tuples and apply the logic of {@link #apply(HackitTuple)}
  *
- * @param <K>
- * @param <T>
- * @param <SentType>
- * @param <SenderObj>
- * @param <ReceiverObj>
+ * @param <K> type of key that it handle the {@link org.apache.wayang.plugin.hackit.core.tuple.header.Header}
+ * @param <T> type that wrapped by {@link HackitTuple}
+ * @param <SentType> Type of the element that it will be send out by {@link Sender}
+ * @param <SenderObj> Object class of the implementation of {@link Sender}
+ * @param <ReceiverObj>Object class of the implementation of {@link Receiver}
  */
 public class
     HackitSniffer<
@@ -54,42 +56,43 @@ public class
         Serializable {
 
     /**
-     *
+     * Indicate if the first execution or not, because some function will need that information
+     * to get instantiated
      */
     private transient boolean not_first = false;
 
     /**
-     *
+     * {@link Injector} instance that will be use by {@link HackitSniffer} as component
      */
     private Injector<HackitTuple<K, T>> hackItInjector;
 
     /**
-     *
+     * {@link Actor} instance that will be use by {@link HackitSniffer} as component
      */
     private Actor<HackitTuple<K, T>> actorFunction;
 
     /**
-     *
+     * {@link Shipper} instance that will be use by {@link HackitSniffer} as component
      */
     private Shipper<HackitTuple<K, T>, SentType, SenderObj, ReceiverObj> shipper;
 
     /**
-     *
+     * {@link Sniff} instance that will be use by {@link HackitSniffer} as component
      */
     private Sniff<HackitTuple<K, T>> hackItSniff;
 
     /**
-     *
+     * {@link Cloner} instance that will be use by {@link HackitSniffer} as component
      */
     private Cloner<HackitTuple<K, T>, SentType> hackItCloner;
 
     /**
-     *
-     * @param hackItInjector
-     * @param actorFunction
-     * @param shipper
-     * @param hackItSniff
-     * @param hackItCloner
+     * Construct with the components as parameters
+     * @param hackItInjector {@link Injector} instance that will be use by {@link HackitSniffer} as component
+     * @param actorFunction {@link Actor} instance that will be use by {@link HackitSniffer} as component
+     * @param shipper {@link Shipper} instance that will be use by {@link HackitSniffer} as component
+     * @param hackItSniff {@link Sniff} instance that will be use by {@link HackitSniffer} as component
+     * @param hackItCloner {@link Cloner} instance that will be use by {@link HackitSniffer} as component
      */
     //TODO: it may private, because need to be executed just at the creation moment
     public HackitSniffer(
@@ -115,6 +118,24 @@ public class
         this.not_first = false;
     }
 
+    /**
+     * apply contains the logic that need to be executed at each tuple that is process by the main pipeline,
+     * <ol>
+     *     <li>If is the first exection the function perform the connection between the sidecar and the main pipeline</li>
+     *     <li>Validate if the tuple need to be sniffed</li>
+     *     <li>
+     *         <ol>
+     *             <li>validate if the element have the condition to be sent out</li>
+     *             <li>The tuple is cloned </li>
+     *             <li>The Tuple is sended out by publishing it</li>
+     *         </ol>
+     *     </li>
+     *     <li>From the shipper it looks if exist new elements to be injected</li>
+     * </ol>
+     *
+     * @param ktHackItTuple
+     * @return
+     */
     @Override
     public Iterator<HackitTuple<K, T>> apply(HackitTuple<K, T> ktHackItTuple) {
         if(!this.not_first){
@@ -136,9 +157,10 @@ public class
     }
 
     /**
+     * set {@link Injector} instance that will be use by {@link HackitSniffer} as component
      *
-     * @param hackItInjector
-     * @return
+     * @param hackItInjector {@link Injector} instance
+     * @return self instance of the {@link HackitSniffer}
      */
     public HackitSniffer<K, T, SentType, SenderObj, ReceiverObj> setHackItInjector(Injector<HackitTuple<K, T>> hackItInjector) {
         this.hackItInjector = hackItInjector;
@@ -146,9 +168,10 @@ public class
     }
 
     /**
+     * set {@link Actor} instance that will be use by {@link HackitSniffer} as component
      *
-     * @param actorFunction
-     * @return
+     * @param actorFunction {@link Actor} instance
+     * @return self instance of the {@link HackitSniffer}
      */
     public HackitSniffer<K, T, SentType, SenderObj, ReceiverObj> setActorFunction(Actor<HackitTuple<K, T>> actorFunction) {
         this.actorFunction = actorFunction;
@@ -156,9 +179,10 @@ public class
     }
 
     /**
+     * set {@link Shipper} instance that will be use by {@link HackitSniffer} as component
      *
-     * @param shipper
-     * @return
+     * @param shipper {@link Shipper} instance
+     * @return self instance of the {@link HackitSniffer}
      */
     public HackitSniffer<K, T, SentType, SenderObj, ReceiverObj> setShipper(Shipper<HackitTuple<K, T>, SentType, SenderObj, ReceiverObj> shipper) {
         this.shipper = shipper;
@@ -166,9 +190,10 @@ public class
     }
 
     /**
+     * set {@link Sniff} instance that will be use by {@link HackitSniffer} as component
      *
-     * @param hackItSniff
-     * @return
+     * @param hackItSniff {@link Sniff} instance
+     * @return self instance of the {@link HackitSniffer}
      */
     public HackitSniffer<K, T, SentType, SenderObj, ReceiverObj> setHackItSniff(Sniff<HackitTuple<K, T>> hackItSniff) {
         this.hackItSniff = hackItSniff;
@@ -176,9 +201,10 @@ public class
     }
 
     /**
+     * set {@link Cloner} instance that will be use by {@link HackitSniffer} as component
      *
-     * @param hackItCloner
-     * @return
+     * @param hackItCloner {@link Cloner} instance
+     * @return self instance of the {@link HackitSniffer}
      */
     public HackitSniffer<K, T, SentType, SenderObj, ReceiverObj> setHackItCloner(Cloner<HackitTuple<K, T>, SentType> hackItCloner) {
         this.hackItCloner = hackItCloner;
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/actor/Actor.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/actor/Actor.java
index 0deffd8..555c63b 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/actor/Actor.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/actor/Actor.java
@@ -23,6 +23,7 @@ import java.io.Serializable;
  *
  * @param <T>
  */
+//TODO it may deleted, but validate if is need it
 public interface Actor<T> extends Serializable {
 
     /**
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/inject/EmptyInjector.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/inject/EmptyInjector.java
index cacca18..ece3404 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/inject/EmptyInjector.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/inject/EmptyInjector.java
@@ -25,8 +25,9 @@ import java.util.Spliterators;
 import java.util.stream.StreamSupport;
 
 /**
+ * EmptyInjector is a dummy implementation of the {@link Injector} to show how it need to looks and Inyector implementation
  *
- * @param <T>
+ * @param <T> type of the element processed.
  */
 public class EmptyInjector<T> implements Injector<T>{
 
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/inject/Injector.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/inject/Injector.java
index fb26604..edf1bc2 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/inject/Injector.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/inject/Injector.java
@@ -21,13 +21,16 @@ import java.io.Serializable;
 import java.util.Iterator;
 
 /**
+ * Injector is the component on the Sniffer that it get looking to get a {@link org.apache.wayang.plugin.hackit.core.tuple.HackitTuple}
+ * form outside and added on the current process
  *
- * @param <T>
+ * @param <T> type of the tuple that need to be process
  */
 public interface Injector<T> extends Serializable {
 
     /**
      *
+     *
      * @param element
      * @param iterator
      * @return
@@ -35,16 +38,18 @@ public interface Injector<T> extends Serializable {
     Iterator<T> inject(T element, Iterator<T> iterator);
 
     /**
+     * Evaluate if the <code>element</code> need to skipped or process
      *
-     * @param element
-     * @return
+     * @param element that is evaluated
+     * @return True is need to be process, False in other cases
      */
     boolean is_skip_element(T element);
 
     /**
+     * Evaluate if the <code>element</code> need to halt the job or not
      *
-     * @param element
-     * @return
+     * @param element that is evaluated
+     * @return True if the process need to be halt, False in other cases
      */
     boolean is_halt_job(T element);
 }
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/PSProtocol.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/PSProtocol.java
index 703074c..8994f52 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/PSProtocol.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/PSProtocol.java
@@ -23,6 +23,7 @@ package org.apache.wayang.plugin.hackit.core.sniffer.shipper;
 public interface PSProtocol {
 
     /**
+     * Add the topics on the server and messages
      *
      * @param topic
      * @return
@@ -30,7 +31,7 @@ public interface PSProtocol {
     public PSProtocol addTopic(String... topic);
 
     /**
-     *
+     * Add places where the data need to be published or retrieved
      * @param exchange
      * @return
      */
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/Shipper.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/Shipper.java
index a9881af..ad01d32 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/Shipper.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/Shipper.java
@@ -24,41 +24,46 @@ import java.io.Serializable;
 import java.util.Iterator;
 
 /**
+ * Shipper is the component that it handle the reception and emision of the message from the main pipeline and sidecar
+ * pipeline to enable a smoothly connection between them.
  *
- * @param <T>
- * @param <ST>
- * @param <SenderObj>
- * @param <ReceiverObj>
+ * @param <T_IN> type of the tuple that it come from the sidecar to the main pipeline
+ * @param <T_OUT> type of the tuple that it go from the main to sidecar pipeline
+ * @param <SenderObj> type of {@link Sender} that the shipper will use
+ * @param <ReceiverObj> type of {@link Receiver} that the shipper will use
  */
-public abstract class Shipper<T, ST, SenderObj extends Sender<ST>, ReceiverObj extends Receiver<T>> implements Iterator<T>, Serializable {
+public abstract class Shipper<T_IN, T_OUT, SenderObj extends Sender<T_OUT>, ReceiverObj extends Receiver<T_IN>> implements Iterator<T_IN>, Serializable {
 
     /**
-     *
+     * <code>sender_instance</code> instance that have {@link Sender} implementation
      */
     protected Sender sender_instance;
 
     /**
-     *
+     * <code>receiver_instance</code> instance that have {@link Receiver} implementation
      */
     protected Receiver receiver_instance;
 
     /**
+     * Generate an instance of the {@link Sender}, it could be take it by configurations
      *
-     * @return
+     * @return {@link Sender} instance
      */
     protected abstract Sender createSenderInstance();
 
     /**
+     * Generate an instance of the {@link Receiver}, it could be take it by configurations
      *
-     * @return
+     * @return {@link Receiver} instance
      */
     protected abstract Receiver createReceiverInstance();
 
     /**
-     * Connect with the a Message queue service
-     * @param value
+     * Connect with the a Message queue service and send the message
+     *
+     * @param value is the element that it will be send out form the main pipeline
      */
-    public void publish(ST value){
+    public void publish(T_OUT value){
         if(this.sender_instance == null){
             throw new RuntimeException("The Sender of the Shipper is not instanciated");
         }
@@ -74,17 +79,16 @@ public abstract class Shipper<T, ST, SenderObj extends Sender<ST>, ReceiverObj e
     }
 
     /**
-     *
-     * @param topic
+     * @see #subscribeAsProducer()
+     * @param topic list of topic where the messages need to be seeded
      */
     public void subscribeAsProducer(String... topic){
         this.subscribeAsProducer("default", topic);
     }
 
     /**
-     *
-     * @param metatopic
-     * @param topic
+     * @see #subscribeAsProducer(String...)
+     * @param metatopic If the metatopic is different to the Default, need to be provided here
      */
     public void subscribeAsProducer(String metatopic, String... topic){
         this.subscribeAsProducer();
@@ -95,7 +99,7 @@ public abstract class Shipper<T, ST, SenderObj extends Sender<ST>, ReceiverObj e
     }
 
     /**
-     * Close connection
+     * Close connection and send the remaind elements
      */
     public void unsubscribeAsProducer(){
         if( this.sender_instance == null) return;
@@ -113,17 +117,16 @@ public abstract class Shipper<T, ST, SenderObj extends Sender<ST>, ReceiverObj e
     }
 
     /**
-     *
-     * @param topic
+     * @see #subscribeAsConsumer()
+     * @param topic list of topic where the consumer it will be consuming
      */
     public void subscribeAsConsumer(String... topic){
         this.subscribeAsProducer("default", topic);
     }
 
     /**
-     *
-     * @param metatopic
-     * @param topic
+     * @see #subscribeAsProducer(String...)
+     * @param metatopic If the metatopic is different to the Default, need to be provided here
      */
     public void subscribeAsConsumer(String metatopic, String... topic){
         this.subscribeAsConsumer();
@@ -134,7 +137,7 @@ public abstract class Shipper<T, ST, SenderObj extends Sender<ST>, ReceiverObj e
     }
 
     /**
-     * Close connection
+     * Close connection and stop consuming elements form the sidecar pipeline
      */
     public void unsubscribeAsConsumer() {
         if( this.receiver_instance == null) return;
@@ -142,7 +145,7 @@ public abstract class Shipper<T, ST, SenderObj extends Sender<ST>, ReceiverObj e
     }
 
     /**
-     *
+     * Close the {@link Sender} and {@link Receiver}
      */
     public void close(){
         this.unsubscribeAsConsumer();
@@ -153,13 +156,14 @@ public abstract class Shipper<T, ST, SenderObj extends Sender<ST>, ReceiverObj e
     public abstract boolean hasNext();
 
     @Override
-    public abstract T next();
+    public abstract T_IN next();
 
     /**
+     * Get the last elements received to be injected on the main pipeline.
      *
-     * @return
+     * @return {@link Iterator} with the last element on the {@link org.apache.wayang.plugin.hackit.core.sniffer.shipper.receiver.BufferReceiver}
      */
-    public Iterator<T> getNexts(){
+    public Iterator<T_IN> getNexts(){
         if( this.receiver_instance == null){
             throw new RuntimeException("The Receiver of the Shipper is not instanciated");
         }
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/receiver/BufferReceiver.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/receiver/BufferReceiver.java
index a13cabb..5e38a35 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/receiver/BufferReceiver.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/receiver/BufferReceiver.java
@@ -22,27 +22,45 @@ import java.util.Queue;
 import java.util.concurrent.LinkedBlockingQueue;
 
 /**
+ * BufferReceiver is component where the element getted by the {@link Receiver} are stored waiting for be consumed
  *
- * @param <T>
+ * @param <T> type of the element that it will receive
  */
+//TODO: Implement this class well
 public class BufferReceiver<T> implements Serializable {
+
     //TODO implement the doble buffering
+    /**
+     * queue is a {@link Queue} where the element are storage waiting to be consumed
+     */
     private transient Queue<T> queue;
 
+    /**
+     * Start the Buffer to be enable to get new {@link org.apache.wayang.plugin.hackit.core.tuple.HackitTuple}
+     *
+     * @return True if the Buffer start without problem, False in other cases
+     */
     //TODO implement the server to receive the messages
     public boolean start(){
         return true;
     }
 
-    //TODO registrer on the rest of the worker
+
+    //TODO registrer on the rest of the worker; validate if is need
     public boolean register(){
         return true;
     }
 
+    //TODO Validate if is need
     public boolean existQueue(){
         return false;
     }
 
+    /**
+     * Insert a new value on the {@link BufferReceiver}
+     *
+     * @param value to be insert on the buffer
+     */
     public void put(T value){
         if(this.queue == null){
             this.queue = new LinkedBlockingQueue<>();
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/receiver/EmptyReceiver.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/receiver/EmptyReceiver.java
index fdfe139..ece71cc 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/receiver/EmptyReceiver.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/receiver/EmptyReceiver.java
@@ -22,8 +22,9 @@ import java.util.Collections;
 import java.util.Iterator;
 
 /**
+ * EmptyReceiver is a dummy implementation of {@link Receiver}
  *
- * @param <T>
+ * @param <T> type of process data
  */
 public class EmptyReceiver<T> extends Receiver<T> {
 
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/receiver/Receiver.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/receiver/Receiver.java
index 80f9a9d..a529161 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/receiver/Receiver.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/receiver/Receiver.java
@@ -21,29 +21,32 @@ import java.io.Serializable;
 import java.util.Iterator;
 
 /**
+ * Receiver is the component that handle the connection with the side car, and get
+ * external elements, this can be instructions to perform or new {@link org.apache.wayang.plugin.hackit.core.tuple.HackitTuple}
  *
- * @param <T>
+ * @param <T> Type of received elements
  */
 public abstract class Receiver<T> implements Serializable {
 
     /**
-     *
+     * bufferReceiver is an instance of {@link BufferReceiver}
      */
-    private transient BufferReceiver<T> bufferReceive;
+    private transient BufferReceiver<T> bufferReceiver;
 
     /**
-     *
+     * Start the the Receiver service that will be waiting the new elements.
      */
     public abstract void init();
 
     /**
+     * Provide the newest elements received, either the process {@link #init()} or the previous call of {@link #getElements()}
      *
-     * @return
+     * @return {@link Iterator} with the elements
      */
     public abstract Iterator<T> getElements();
 
     /**
-     *
+     * Stop the service and clean the {@link BufferReceiver}
      */
     public abstract void close();
 }
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/sender/EmptySender.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/sender/EmptySender.java
index 1a2c459..d4a1e1f 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/sender/EmptySender.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/sender/EmptySender.java
@@ -19,7 +19,7 @@
 package org.apache.wayang.plugin.hackit.core.sniffer.shipper.sender;
 
 /**
- *
+ * EmptySender is a dummy implementation of the {@link Sender}
  * @param <T>
  */
 public class EmptySender<T> implements Sender<T> {
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/sender/Sender.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/sender/Sender.java
index 82a491c..2e6ad41 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/sender/Sender.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/sender/Sender.java
@@ -20,24 +20,29 @@ package org.apache.wayang.plugin.hackit.core.sniffer.shipper.sender;
 import java.io.Serializable;
 
 /**
+ * Sender is the component that send the {@link org.apache.wayang.plugin.hackit.core.tuple.HackitTuple} out from
+ * the main pipeline
  *
- * @param <T>
+ * @param <T> type of the {@link org.apache.wayang.plugin.hackit.core.tuple.HackitTuple} that will be send out
  */
 public interface Sender<T> extends Serializable {
 
     /**
-     *
+     * Start the service or connect to the server where the {@link org.apache.wayang.plugin.hackit.core.tuple.HackitTuple}
+     * need to be sended it
      */
     void init();
 
     /**
+     * Place in a buffer or send inmediatly the {@link org.apache.wayang.plugin.hackit.core.tuple.HackitTuple} this will
+     * depends on the configuration
      *
-     * @param value
+     * @param value to be send out
      */
     void send(T value);
 
     /**
-     *
+     * Terminate the connection and clean the buffers if is need
      */
     void close();
 }
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/sniff/CollectionTagsToSniff.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/sniff/CollectionTagsToSniff.java
index 16419db..6e49b3a 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/sniff/CollectionTagsToSniff.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/sniff/CollectionTagsToSniff.java
@@ -24,7 +24,7 @@ import java.util.HashSet;
 import java.util.Set;
 
 /**
- *
+ * TODO validate if is correct implementation
  */
 public class CollectionTagsToSniff implements Sniff {
 
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/sniff/SingleTagToSniff.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/sniff/SingleTagToSniff.java
index 42da261..9fcf1b7 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/sniff/SingleTagToSniff.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/sniff/SingleTagToSniff.java
@@ -21,7 +21,7 @@ package org.apache.wayang.plugin.hackit.core.sniffer.sniff;
 import org.apache.wayang.plugin.hackit.core.tags.HackitTag;
 
 /**
- *
+ * TODO validate if is correct implementation
  */
 public class SingleTagToSniff implements Sniff {
 
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/sniff/Sniff.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/sniff/Sniff.java
index 3a57c6f..cd4461b 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/sniff/Sniff.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/sniff/Sniff.java
@@ -20,15 +20,19 @@ package org.apache.wayang.plugin.hackit.core.sniffer.sniff;
 import java.io.Serializable;
 
 /**
+ * Sniff is the component that evaluate if some {@link org.apache.wayang.plugin.hackit.core.tuple.HackitTuple} need to
+ * be treated on some way
  *
- * @param <I>
+ * @param <I> type of the element that will be evaluated
  */
 public interface Sniff<I> extends Serializable {
 
     /**
+     * sniff evaluate if the <code>input</code> need to be treated on some way or contains some {@link org.apache.wayang.plugin.hackit.core.tags.HackitTag}
+     * to enable the sniff
      *
-     * @param input
-     * @return
+     * @param input element to evaluate if is sniffable
+     * @return True if the <code>input</code> need to be sniffed, False in other cases
      */
     boolean sniff(I input);
 }