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/05/05 05:22:18 UTC

[incubator-wayang] branch debugger updated (dea33ea -> e8d1d89)

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

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


    from dea33ea  [WAYANG-28] creation module wayang-hackit-sidecar
     new 12d9afa  [WAYANG-28] Add javadoc to tags package
     new 0890650  [WAYANG-28] Add javadoc to tagger package
     new e8d1d89  [WAYANG-28] template of javadoc to sniffer package

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../plugin/hackit/core/sniffer/HackitSniffer.java  | 90 +++++++++++++++++++++-
 .../plugin/hackit/core/sniffer/actor/Actor.java    | 11 ++-
 .../hackit/core/sniffer/clone/BasicCloner.java     |  6 ++
 .../plugin/hackit/core/sniffer/clone/Cloner.java   | 16 +++-
 .../hackit/core/sniffer/inject/EmptyInjector.java  |  4 +
 .../hackit/core/sniffer/inject/Injector.java       | 26 ++++++-
 .../hackit/core/sniffer/shipper/PSProtocol.java    | 12 +++
 .../hackit/core/sniffer/shipper/Shipper.java       | 72 +++++++++++++++--
 .../sniffer/shipper/receiver/BufferReceiver.java   |  4 +
 .../sniffer/shipper/receiver/EmptyReceiver.java    |  4 +
 .../core/sniffer/shipper/receiver/Receiver.java    | 17 ++++
 .../core/sniffer/shipper/sender/EmptySender.java   |  8 +-
 .../hackit/core/sniffer/shipper/sender/Sender.java | 20 ++++-
 .../core/sniffer/sniff/CollectionTagsToSniff.java  | 18 +++++
 .../core/sniffer/sniff/SingleTagToSniff.java       | 15 ++++
 .../plugin/hackit/core/sniffer/sniff/Sniff.java    | 11 ++-
 .../plugin/hackit/core/tagger/HackitTagger.java    | 76 ++++++++++++++++++
 .../plugin/hackit/core/tagger/TaggerFunction.java  | 19 ++++-
 .../core/tagger/wrapper/FlatmapWrapperHackit.java  | 21 ++++-
 .../core/tagger/wrapper/FunctionWrapperHackit.java | 22 +++++-
 .../tagger/wrapper/PredicateWrapperHackit.java     | 21 ++++-
 .../tagger/wrapper/template/FlatMapTemplate.java   | 15 ++++
 .../tagger/wrapper/template/FunctionTemplate.java  | 13 ++++
 .../wayang/plugin/hackit/core/tags/CrashTag.java   | 15 ++++
 .../wayang/plugin/hackit/core/tags/DebugTag.java   | 15 ++++
 .../wayang/plugin/hackit/core/tags/DisplayTag.java | 16 ++++
 .../wayang/plugin/hackit/core/tags/HackitTag.java  | 34 ++++++++
 .../plugin/hackit/core/tags/HackitTagBuilder.java  |  1 +
 .../wayang/plugin/hackit/core/tags/LogTag.java     | 17 ++++
 .../wayang/plugin/hackit/core/tags/PauseTag.java   | 16 ++++
 .../wayang/plugin/hackit/core/tags/SkipTag.java    | 17 ++++
 .../wayang/plugin/hackit/core/tags/TraceTag.java   | 16 ++++
 32 files changed, 640 insertions(+), 28 deletions(-)

[incubator-wayang] 02/03: [WAYANG-28] Add javadoc to tagger package

Posted by be...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 0890650638428cac7a1a37392855a5cf796a27b9
Author: Bertty Contreras-Rojas <be...@scalytics.io>
AuthorDate: Wed May 5 00:39:03 2021 -0400

    [WAYANG-28] Add javadoc to tagger package
---
 .../plugin/hackit/core/tagger/HackitTagger.java    | 76 ++++++++++++++++++++++
 .../plugin/hackit/core/tagger/TaggerFunction.java  | 19 +++++-
 .../core/tagger/wrapper/FlatmapWrapperHackit.java  | 21 +++++-
 .../core/tagger/wrapper/FunctionWrapperHackit.java | 22 ++++++-
 .../tagger/wrapper/PredicateWrapperHackit.java     | 21 +++++-
 .../tagger/wrapper/template/FlatMapTemplate.java   | 15 +++++
 .../tagger/wrapper/template/FunctionTemplate.java  | 13 ++++
 7 files changed, 180 insertions(+), 7 deletions(-)

diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/HackitTagger.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/HackitTagger.java
index 87a01c9..48002de 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/HackitTagger.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/HackitTagger.java
@@ -27,13 +27,38 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
+/**
+ * HackitTagger is class where is allocated all the logic that need to be perform during the
+ * tagging step in Hackit, this logic have and pre and post processing and they are acting like
+ * template that follow same behaivor in every tagger
+ */
 public class HackitTagger implements Serializable {
 
+    /**
+     * {@link List} of {@link HackitTag} that are added previous of the execution of the
+     * original function
+     */
+    //TODO: It may change by a set
     protected List<HackitTag> pre_tags;
+
+    /**
+     * {@link List} of {@link HackitTag} that are added after of the execution of the
+     * original function
+     */
+    //TODO: It may change by a set
     protected List<HackitTag> post_tags;
 
+    /**
+     * Default Construct
+     */
     public HackitTagger(){}
 
+    /**
+     * Add a {@link HackitTag} to {@link List} of <code>pre_tags</code>
+     *
+     * @param tag is a {@link HackitTag} added to change the future behavior
+     * @return {@link HackitTagger} as it self reference
+     */
     public HackitTagger addPreTag(HackitTag tag){
         if(this.pre_tags == null){
             this.pre_tags = new ArrayList<>();
@@ -42,6 +67,12 @@ public class HackitTagger implements Serializable {
         return this;
     }
 
+    /**
+     * Add a {@link HackitTag} to {@link List} of <code>post_tags</code>
+     *
+     * @param tag is a {@link HackitTag} added to change the future behavior
+     * @return {@link HackitTagger} as it self reference
+     */
     public HackitTagger addPostTag(HackitTag tag){
         if(this.post_tags == null){
             this.post_tags = new ArrayList<>();
@@ -50,20 +81,51 @@ public class HackitTagger implements Serializable {
         return this;
     }
 
+    /**
+     * add to the {@link HackitTuple} all the {@link HackitTag}'s add pre-tagging phase are available at that moment
+     *
+     * @param tuple is a {@link HackitTuple} where that {@link HackitTag} will be added
+     */
     public void preTaggingTuple(HackitTuple tuple){
         if(this.pre_tags != null)
             taggingTuple(tuple, this.pre_tags);
     }
 
+    /**
+     * add to the {@link HackitTuple} all the {@link HackitTag}'s add post-tagging phase are available at that moment
+     *
+     * @param tuple is a {@link HackitTuple} where that {@link HackitTag} will be added
+     */
     public void postTaggingTuple(HackitTuple tuple){
         if(this.post_tags != null)
             taggingTuple(tuple, this.post_tags);
     }
 
+    /**
+     * add all the {@link HackitTag}'s available on the {@link List} to the {@link HackitTuple}
+     *
+     * @param tuple is {@link HackitTuple} where the tags will be added
+     * @param tags {@link List} of {@link HackitTag}'s that will add to {@link HackitTuple}
+     */
     public void taggingTuple(HackitTuple tuple, List<HackitTag> tags){
+        //TODO: change this code for an efficient one
         tags.stream().forEach(tag -> tuple.addTag(tag.getInstance()));
     }
 
+    /**
+     * It take the original {@link HackitTuple} and extract the {@link Header} and start creating the children
+     * from that {@link Header} this enable to follow the lineage of the after a several elements come out from
+     * one {@link HackitTuple}. This generation is possible by inserting a new step at the iterator using {@link HackitIterator}
+     * that allow append a new instruction in the process that will be perform on the original {@link Iterator}
+     *
+     * @param origin Original {@link HackitTuple} that it was transformed
+     * @param result is the transformation output inside of an {@link Iterator}
+     * @param <K> type of the identifier of {@link HackitTuple}
+     * @param <I> type of the original element inside of {@link HackitTuple} that it was transformed
+     * @param <O> type of the output in the transformation
+     *
+     * @return {@link Iterator} that is wrapper of the original with the add instruction using {@link HackitIterator}
+     */
     public <K, I, O> Iterator<HackitTuple<K,O>> postTaggingTuple(HackitTuple<K, I> origin, Iterator<O>result){
         Header<K> header = origin.getHeader();
         Iterator<HackitTuple<K, O>> iter_result = new HackitIterator<K, O>(
@@ -80,6 +142,20 @@ public class HackitTagger implements Serializable {
         return iter_result;
     }
 
+    /**
+     * It take the original {@link HackitTuple} and extract the {@link Header} to be enable to follow the lineage of the
+     * same value transformed, then is generate a new {@link HackitTuple} with the <code>result</code> as the wrapped
+     * element, it also add the new {@link HackitTag}'s to the {@link Header}
+     *
+     *
+     * @param origin Original {@link HackitTuple} that it was transformed
+     * @param result is the transformation output
+     * @param <K> type of the identifier of {@link HackitTuple}
+     * @param <I> type of the original element inside of {@link HackitTuple} that it was transformed
+     * @param <O> type of the output in the transformation
+     *
+     * @return {@link HackitTuple} with the new {@link HackitTag}
+     */
     public <K, I, O> HackitTuple<K, O> postTaggingTuple(HackitTuple<K, I> origin, O result){
         HackitTuple<K, O> hackItTuple_result = new HackitTuple<K, O>(origin.getHeader(), result);
         this.postTaggingTuple(hackItTuple_result);
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/TaggerFunction.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/TaggerFunction.java
index 186b327..eb26a4b 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/TaggerFunction.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/TaggerFunction.java
@@ -17,9 +17,24 @@
  */
 package org.apache.wayang.plugin.hackit.core.tagger;
 
+/**
+ * TaggerFunction is the template for the function that will be use inside of {@link HackitTagger}
+ *
+ * @param <T> output type of the execution
+ */
 public interface TaggerFunction<T> {
-    public T execute();
+    /**
+     * It execute the function of tagger, and generate and output
+     *
+     * @return result of the execution
+     */
+    T execute();
 
-    public String getName();
+    /**
+     * Get the name of the function, this is use a identifier
+     *
+     * @return {@link String} that contains the name of the {@link TaggerFunction}
+     */
+    String getName();
 
 }
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/wrapper/FlatmapWrapperHackit.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/wrapper/FlatmapWrapperHackit.java
index a57cd23..9100c99 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/wrapper/FlatmapWrapperHackit.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/wrapper/FlatmapWrapperHackit.java
@@ -23,15 +23,30 @@ import org.apache.wayang.plugin.hackit.core.tuple.HackitTuple;
 
 import java.util.Iterator;
 
+/**
+ * FlatmapWrapperHackit is an implementation of {@link FlatMapTemplate} where Hackit manage the logic
+ * before and after of tagging process, also it perform the unwrap of the tuple to be handle by the
+ * original function
+ *
+ * @param <IDType> Type of {@link org.apache.wayang.plugin.hackit.core.tuple.header.Header} key of the {@link HackitTuple}
+ * @param <I> Input Type of the original Tuple
+ * @param <O> Output Type after the perform the Function
+ */
 public class FlatmapWrapperHackit<IDType, I, O>
         extends HackitTagger
         implements FlatMapTemplate<HackitTuple<IDType, I>, HackitTuple<IDType, O>> {
 
+    /**
+     * Original function that will transform the data
+     */
     private FlatMapTemplate<I, O> function;
 
-    public FlatmapWrapperHackit(
-            FlatMapTemplate<I, O> function
-    ) {
+    /**
+     * Default Construct
+     *
+     * @param function is the function that will be Wrapped by the {@link FlatmapWrapperHackit}
+     */
+    public FlatmapWrapperHackit( FlatMapTemplate<I, O> function ) {
         this.function = function;
     }
 
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/wrapper/FunctionWrapperHackit.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/wrapper/FunctionWrapperHackit.java
index c244eb0..99e4b37 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/wrapper/FunctionWrapperHackit.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/wrapper/FunctionWrapperHackit.java
@@ -18,13 +18,33 @@
 package org.apache.wayang.plugin.hackit.core.tagger.wrapper;
 
 import org.apache.wayang.plugin.hackit.core.tagger.HackitTagger;
+import org.apache.wayang.plugin.hackit.core.tagger.wrapper.template.FlatMapTemplate;
 import org.apache.wayang.plugin.hackit.core.tagger.wrapper.template.FunctionTemplate;
 import org.apache.wayang.plugin.hackit.core.tuple.HackitTuple;
 
-public class FunctionWrapperHackit <IDType, I, O> extends HackitTagger implements FunctionTemplate<HackitTuple<IDType, I>, HackitTuple<IDType, O>> {
+/**
+ * FunctionWrapperHackit is an implementation of {@link FunctionTemplate} where Hackit manage the logic
+ * before and after of tagging process, also it perform the unwrap of the tuple to be handle by the
+ * original function
+ *
+ * @param <IDType> Type of {@link org.apache.wayang.plugin.hackit.core.tuple.header.Header} key of the {@link HackitTuple}
+ * @param <I> Input Type of the original Tuple
+ * @param <O> Output Type after the perform the Function
+ */
+public class FunctionWrapperHackit <IDType, I, O>
+        extends HackitTagger
+        implements FunctionTemplate<HackitTuple<IDType, I>, HackitTuple<IDType, O>> {
 
+    /**
+     * Original function that will transform the data
+     */
     private FunctionTemplate<I, O> function;
 
+    /**
+     * Default Construct
+     *
+     * @param function is the function that will be Wrapped by the {@link FunctionWrapperHackit}
+     */
     public FunctionWrapperHackit(FunctionTemplate<I, O> function) {
         this.function = function;
     }
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/wrapper/PredicateWrapperHackit.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/wrapper/PredicateWrapperHackit.java
index c2636e2..7249fdf 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/wrapper/PredicateWrapperHackit.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/wrapper/PredicateWrapperHackit.java
@@ -21,10 +21,29 @@ import org.apache.wayang.plugin.hackit.core.tagger.HackitTagger;
 import org.apache.wayang.plugin.hackit.core.tagger.wrapper.template.FunctionTemplate;
 import org.apache.wayang.plugin.hackit.core.tuple.HackitTuple;
 
-public class PredicateWrapperHackit<IDType, I> extends HackitTagger implements FunctionTemplate<HackitTuple<IDType, I>, Boolean> {
+/**
+ * PredicateWrapperHackit is an implementation of {@link FunctionTemplate} where Hackit manage the logic
+ * before and after of tagging process, also it perform the unwrap of the tuple to be handle by the
+ * original function. The original {@link FunctionTemplate} it an predicate function because return a
+ * {@link Boolean}
+ *
+ * @param <IDType> Type of {@link org.apache.wayang.plugin.hackit.core.tuple.header.Header} key of the {@link HackitTuple}
+ * @param <I> Input Type of the original Tuple to be evaluated
+ */
+public class PredicateWrapperHackit<IDType, I>
+        extends HackitTagger
+        implements FunctionTemplate<HackitTuple<IDType, I>, Boolean> {
 
+    /**
+     * Original predicate that will evaluate the data to give a True or False value
+     */
     private FunctionTemplate<I, Boolean> function;
 
+    /**
+     * Default Construct
+     *
+     * @param function is the predicate that will be Wrapped by the {@link PredicateWrapperHackit}
+     */
     public PredicateWrapperHackit(FunctionTemplate<I, Boolean> function) {
         this.function = function;
     }
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/wrapper/template/FlatMapTemplate.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/wrapper/template/FlatMapTemplate.java
index abe6471..6c68f0c 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/wrapper/template/FlatMapTemplate.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/wrapper/template/FlatMapTemplate.java
@@ -19,7 +19,22 @@ package org.apache.wayang.plugin.hackit.core.tagger.wrapper.template;
 
 import java.util.Iterator;
 
+/**
+ * FlatMapTemplate is the template that provide the abstraction to work with Flatmap operations and also
+ * allows to wrap some function made by the user.
+ *
+ * FlatMapTemplate generate as output a {@link Iterator} this could be an extension of {@link org.apache.wayang.plugin.hackit.core.iterator.HackitIterator}
+ *
+ * @param <I> Input type of the original Function
+ * @param <O> Output type of the original function
+ */
 public interface FlatMapTemplate<I, O> {
 
+    /**
+     * Execute the logic over one element and generate as output a {@link Iterator}
+     *
+     * @param input element to transform
+     * @return {@link Iterator} that contains the output's
+     */
     public Iterator<O> execute(I input);
 }
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/wrapper/template/FunctionTemplate.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/wrapper/template/FunctionTemplate.java
index 9e5cb65..e33ad77 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/wrapper/template/FunctionTemplate.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tagger/wrapper/template/FunctionTemplate.java
@@ -17,7 +17,20 @@
  */
 package org.apache.wayang.plugin.hackit.core.tagger.wrapper.template;
 
+/**
+ * FunctionTemplate is the template that provide the abstraction to work with Transformation operations and also
+ * allows to wrap some function made by the user.
+ *
+ * @param <I> Input type of the original Function
+ * @param <O> Output type of the original function
+ */
 public interface FunctionTemplate<I, O> {
 
+    /**
+     * Execute the logic over one element and generate as output <code>T</code>
+     *
+     * @param input element to transform
+     * @return <code>O</code> that is the transformation of the <code>input</code>
+     */
     public O execute(I input);
 }

[incubator-wayang] 01/03: [WAYANG-28] Add javadoc to tags package

Posted by be...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 12d9afa9e406195ae030ae7d0a009e1ade919bb7
Author: Bertty Contreras-Rojas <be...@scalytics.io>
AuthorDate: Tue May 4 12:14:05 2021 -0400

    [WAYANG-28] Add javadoc to tags package
---
 .../wayang/plugin/hackit/core/tags/CrashTag.java   | 15 ++++++++++
 .../wayang/plugin/hackit/core/tags/DebugTag.java   | 15 ++++++++++
 .../wayang/plugin/hackit/core/tags/DisplayTag.java | 16 ++++++++++
 .../wayang/plugin/hackit/core/tags/HackitTag.java  | 34 ++++++++++++++++++++++
 .../plugin/hackit/core/tags/HackitTagBuilder.java  |  1 +
 .../wayang/plugin/hackit/core/tags/LogTag.java     | 17 +++++++++++
 .../wayang/plugin/hackit/core/tags/PauseTag.java   | 16 ++++++++++
 .../wayang/plugin/hackit/core/tags/SkipTag.java    | 17 +++++++++++
 .../wayang/plugin/hackit/core/tags/TraceTag.java   | 16 ++++++++++
 9 files changed, 147 insertions(+)

diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/CrashTag.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/CrashTag.java
index 94fd98e..dca602a 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/CrashTag.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/CrashTag.java
@@ -17,31 +17,46 @@
  */
 package org.apache.wayang.plugin.hackit.core.tags;
 
+/**
+ * CrashTag is the {@link HackitTag} that identify the {@link org.apache.wayang.plugin.hackit.core.tuple.HackitTuple} that
+ * produce and exception that goes from UDF context and could make that the process stop.
+ */
 public class CrashTag extends HackitTag {
 
+    /**
+     * seed is the element that allow to have small overhead in memory, is like use
+     * singleton.
+     */
     private static CrashTag seed = null;
 
+    /**
+     * default construct
+     */
     private CrashTag(){
         super();
     }
 
     @Override
     public boolean isSendOut() {
+        //TODO: set the correct value to this return
         return false;
     }
 
     @Override
     public boolean isSkip() {
+        //TODO: set the correct value to this return
         return false;
     }
 
     @Override
     public boolean isHaltJob() {
+        //TODO: set the correct value to this return
         return false;
     }
 
     @Override
     public boolean hasCallback() {
+        //TODO: set the correct value to this return
         return false;
     }
 
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/DebugTag.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/DebugTag.java
index ec2ad70..7c7a834 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/DebugTag.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/DebugTag.java
@@ -17,31 +17,46 @@
  */
 package org.apache.wayang.plugin.hackit.core.tags;
 
+/**
+ * DebugTag is the {@link HackitTag} that identify the {@link org.apache.wayang.plugin.hackit.core.tuple.HackitTuple}
+ * as an element that need to capture the timestamp and send it out to analyse the values
+ */
 public class DebugTag extends HackitTag  {
 
+    /**
+     * seed is the element that allow to have small overhead in memory, is like use
+     * singleton.
+     */
     private static DebugTag seed = null;
 
+    /**
+     * default construct
+     */
     private DebugTag(){
         super();
     }
 
     @Override
     public boolean isSendOut() {
+        //TODO: set the correct value to this return
         return false;
     }
 
     @Override
     public boolean isSkip() {
+        //TODO: set the correct value to this return
         return false;
     }
 
     @Override
     public boolean isHaltJob() {
+        //TODO: set the correct value to this return
         return false;
     }
 
     @Override
     public boolean hasCallback() {
+        //TODO: set the correct value to this return
         return false;
     }
 
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/DisplayTag.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/DisplayTag.java
index 19a673d..d584159 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/DisplayTag.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/DisplayTag.java
@@ -17,30 +17,46 @@
  */
 package org.apache.wayang.plugin.hackit.core.tags;
 
+/**
+ * Display is the {@link HackitTag} that identify the {@link org.apache.wayang.plugin.hackit.core.tuple.HackitTuple}
+ * as an element that need to be sent it out to just print the values
+ */
 public class DisplayTag extends HackitTag  {
+
+    /**
+     * seed is the element that allow to have small overhead in memory, is like use
+     * singleton.
+     */
     private static DisplayTag seed = null;
 
+    /**
+     * default construct
+     */
     private DisplayTag(){
         super();
     }
 
     @Override
     public boolean isSendOut() {
+        //TODO: set the correct value to this return
         return false;
     }
 
     @Override
     public boolean isSkip() {
+        //TODO: set the correct value to this return
         return false;
     }
 
     @Override
     public boolean isHaltJob() {
+        //TODO: set the correct value to this return
         return false;
     }
 
     @Override
     public boolean hasCallback() {
+        //TODO: set the correct value to this return
         return false;
     }
 
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/HackitTag.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/HackitTag.java
index 6fdcdb4..9d4c813 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/HackitTag.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/HackitTag.java
@@ -26,16 +26,38 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+/**
+ * HackitTag extend from {@link ActionGroup} becuase is the element that allows to create
+ * an element that contains the flags for the {@link org.apache.wayang.plugin.hackit.core.tagger.HackitTagger}
+ * and {@link org.apache.wayang.plugin.hackit.core.sniffer.HackitSniffer} could perform the right logic
+ * to {@link org.apache.wayang.plugin.hackit.core.tuple.HackitTuple} that have the tag
+ *
+ * HachitTag implements {@link Serializable} because the element could be send it out.
+ */
 public abstract class HackitTag implements Serializable, ActionGroup {
 
+    /**
+     * TODO: add comment, validate if apply for the use case
+     */
     private List<TaggerFunction<?>> callbacks;
+
+    /**
+     * TODO: add comment, validate if apply for the use case
+     */
     private Map<String, Object> callback_results;
 
+    /**
+     * Default Construct
+     */
     protected HackitTag(){
+        //TODO: validate is is not better to go by delay option
         this.callbacks = new ArrayList<>();
         this.callback_results = new HashMap<>();
     }
 
+    /**
+     * TODO: add comment, validate if apply for the use case
+     */
     public void callback(){
         if(hasCallback()) {
             this.callbacks.stream().forEach(
@@ -43,10 +65,22 @@ public abstract class HackitTag implements Serializable, ActionGroup {
             );
         }
     }
+
+    /**
+     * TODO: add comment, validate if apply for the use case
+     *
+     * @param name
+     * @param value
+     */
     public void addValue(String name, Object value){
         this.callback_results.put(name, value);
     }
 
+    /**
+     * TODO: add comment, validate if apply for the use case
+     *
+     * @return
+     */
     public abstract HackitTag getInstance();
 
     @Override
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/HackitTagBuilder.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/HackitTagBuilder.java
index e80a33d..3daffa0 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/HackitTagBuilder.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/HackitTagBuilder.java
@@ -17,6 +17,7 @@
  */
 package org.apache.wayang.plugin.hackit.core.tags;
 
+//TODO: all the tags need to be generated by a builder
 public class HackitTagBuilder {
     //TODO check how to implement wildfly
 }
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/LogTag.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/LogTag.java
index fa1020b..d00805e 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/LogTag.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/LogTag.java
@@ -17,30 +17,47 @@
  */
 package org.apache.wayang.plugin.hackit.core.tags;
 
+/**
+ * LogTag is the {@link HackitTag} that identify the {@link org.apache.wayang.plugin.hackit.core.tuple.HackitTuple}
+ * as part of logging status, this will produce to send out just the metadata
+ */
 public class LogTag extends HackitTag  {
+
+    /**
+     * seed is the element that allow to have small overhead in memory, is like use
+     * singleton.
+     */
     private static LogTag seed = null;
 
+    /**
+     * default construct
+     */
     public LogTag(){
         super();
     }
 
     @Override
     public boolean isSendOut() {
+        //TODO: set the correct value to this return
         return false;
     }
 
     @Override
     public boolean isSkip() {
+        //TODO: set the correct value to this return
         return false;
     }
 
     @Override
     public boolean isHaltJob() {
+
+        //TODO: set the correct value to this return
         return false;
     }
 
     @Override
     public boolean hasCallback() {
+        //TODO: set the correct value to this return
         return false;
     }
 
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/PauseTag.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/PauseTag.java
index 21daab8..31e9515 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/PauseTag.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/PauseTag.java
@@ -17,30 +17,46 @@
  */
 package org.apache.wayang.plugin.hackit.core.tags;
 
+/**
+ * PauseTag is the {@link HackitTag} that identify the {@link org.apache.wayang.plugin.hackit.core.tuple.HackitTuple}
+ * where is need to pause all the process and wait for a signal that tell what to do, either kill the process or continues
+ */
 public class PauseTag extends HackitTag  {
+
+    /**
+     * seed is the element that allow to have small overhead in memory, is like use
+     * singleton.
+     */
     private static PauseTag seed = null;
 
+    /**
+     * default construct
+     */
     private PauseTag(){
         super();
     }
 
     @Override
     public boolean isSendOut() {
+        //TODO: set the correct value to this return
         return false;
     }
 
     @Override
     public boolean isSkip() {
+        //TODO: set the correct value to this return
         return false;
     }
 
     @Override
     public boolean isHaltJob() {
+        //TODO: set the correct value to this return
         return false;
     }
 
     @Override
     public boolean hasCallback() {
+        //TODO: set the correct value to this return
         return false;
     }
 
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/SkipTag.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/SkipTag.java
index 1e9dd1d..b8523f9 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/SkipTag.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/SkipTag.java
@@ -17,30 +17,47 @@
  */
 package org.apache.wayang.plugin.hackit.core.tags;
 
+/**
+ * SkipTag is the {@link HackitTag} that identify the {@link org.apache.wayang.plugin.hackit.core.tuple.HackitTuple}
+ * that not need to be process by the {@link org.apache.wayang.plugin.hackit.core.sniffer.HackitSniffer} and
+ * also need to be removed and not continues with the process.
+ */
 public class SkipTag extends HackitTag  {
+
+    /**
+     * seed is the element that allow to have small overhead in memory, is like use
+     * singleton.
+     */
     private static SkipTag seed = null;
 
+    /**
+     * default construct
+     */
     private SkipTag(){
         super();
     }
 
     @Override
     public boolean isSendOut() {
+        //TODO: set the correct value to this return
         return false;
     }
 
     @Override
     public boolean isSkip() {
+        //TODO: set the correct value to this return
         return false;
     }
 
     @Override
     public boolean isHaltJob() {
+        //TODO: set the correct value to this return
         return false;
     }
 
     @Override
     public boolean hasCallback() {
+        //TODO: set the correct value to this return
         return false;
     }
 
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/TraceTag.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/TraceTag.java
index 1482f52..47c1108 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/TraceTag.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/tags/TraceTag.java
@@ -17,30 +17,46 @@
  */
 package org.apache.wayang.plugin.hackit.core.tags;
 
+/**
+ * DebugTag is the {@link HackitTag} that identify the {@link org.apache.wayang.plugin.hackit.core.tuple.HackitTuple}
+ * as an element which will be identifier and also add the timestamp to be enable to follow it
+ */
 public class TraceTag extends HackitTag  {
+
+    /**
+     * seed is the element that allow to have small overhead in memory, is like use
+     * singleton.
+     */
     private static TraceTag seed = null;
 
+    /**
+     * default construct
+     */
     private TraceTag(){
         super();
     }
 
     @Override
     public boolean isSendOut() {
+        //TODO: set the correct value to this return
         return false;
     }
 
     @Override
     public boolean isSkip() {
+        //TODO: set the correct value to this return
         return false;
     }
 
     @Override
     public boolean isHaltJob() {
+        //TODO: set the correct value to this return
         return false;
     }
 
     @Override
     public boolean hasCallback() {
+        //TODO: set the correct value to this return
         return false;
     }
 

[incubator-wayang] 03/03: [WAYANG-28] template of javadoc to sniffer package

Posted by be...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit e8d1d892da944b4fe76c140d8adafff1fbddcd6f
Author: Bertty Contreras-Rojas <be...@scalytics.io>
AuthorDate: Wed May 5 01:21:33 2021 -0400

    [WAYANG-28] template of javadoc to sniffer package
---
 .../plugin/hackit/core/sniffer/HackitSniffer.java  | 90 +++++++++++++++++++++-
 .../plugin/hackit/core/sniffer/actor/Actor.java    | 11 ++-
 .../hackit/core/sniffer/clone/BasicCloner.java     |  6 ++
 .../plugin/hackit/core/sniffer/clone/Cloner.java   | 16 +++-
 .../hackit/core/sniffer/inject/EmptyInjector.java  |  4 +
 .../hackit/core/sniffer/inject/Injector.java       | 26 ++++++-
 .../hackit/core/sniffer/shipper/PSProtocol.java    | 12 +++
 .../hackit/core/sniffer/shipper/Shipper.java       | 72 +++++++++++++++--
 .../sniffer/shipper/receiver/BufferReceiver.java   |  4 +
 .../sniffer/shipper/receiver/EmptyReceiver.java    |  4 +
 .../core/sniffer/shipper/receiver/Receiver.java    | 17 ++++
 .../core/sniffer/shipper/sender/EmptySender.java   |  8 +-
 .../hackit/core/sniffer/shipper/sender/Sender.java | 20 ++++-
 .../core/sniffer/sniff/CollectionTagsToSniff.java  | 18 +++++
 .../core/sniffer/sniff/SingleTagToSniff.java       | 15 ++++
 .../plugin/hackit/core/sniffer/sniff/Sniff.java    | 11 ++-
 16 files changed, 313 insertions(+), 21 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 02342ff..6740265 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
@@ -30,19 +30,75 @@ import java.io.Serializable;
 import java.util.Iterator;
 import java.util.function.Function;
 
-public class HackitSniffer<K, T, SentType, SenderObj extends Sender<SentType>, ReceiverObj extends Receiver<HackitTuple<K,T>> > implements Function<HackitTuple<K, T>, Iterator<HackitTuple<K, T>>>, Serializable {
-
+/**
+ *
+ * @param <K>
+ * @param <T>
+ * @param <SentType>
+ * @param <SenderObj>
+ * @param <ReceiverObj>
+ */
+public class
+    HackitSniffer<
+        K,
+        T,
+        SentType,
+        SenderObj extends Sender<SentType>,
+        ReceiverObj extends Receiver<HackitTuple<K,T>>
+    >
+    implements
+        Function<
+            HackitTuple<K, T>,
+            Iterator<HackitTuple<K, T>>
+        >,
+        Serializable {
+
+    /**
+     *
+     */
     private transient boolean not_first = false;
+
+    /**
+     *
+     */
     private Injector<HackitTuple<K, T>> hackItInjector;
 
+    /**
+     *
+     */
     private Actor<HackitTuple<K, T>> actorFunction;
 
+    /**
+     *
+     */
     private Shipper<HackitTuple<K, T>, SentType, SenderObj, ReceiverObj> shipper;
 
+    /**
+     *
+     */
     private Sniff<HackitTuple<K, T>> hackItSniff;
+
+    /**
+     *
+     */
     private Cloner<HackitTuple<K, T>, SentType> hackItCloner;
 
-    public HackitSniffer(Injector<HackitTuple<K, T>> hackItInjector, Actor<HackitTuple<K, T>> actorFunction, Shipper<HackitTuple<K, T>, SentType, SenderObj, ReceiverObj> shipper, Sniff<HackitTuple<K, T>> hackItSniff, Cloner<HackitTuple<K, T>, SentType> hackItCloner) {
+    /**
+     *
+     * @param hackItInjector
+     * @param actorFunction
+     * @param shipper
+     * @param hackItSniff
+     * @param hackItCloner
+     */
+    //TODO: it may private, because need to be executed just at the creation moment
+    public HackitSniffer(
+            Injector<HackitTuple<K, T>> hackItInjector,
+            Actor<HackitTuple<K, T>> actorFunction,
+            Shipper<HackitTuple<K, T>, SentType, SenderObj, ReceiverObj> shipper,
+            Sniff<HackitTuple<K, T>> hackItSniff,
+            Cloner<HackitTuple<K, T>, SentType> hackItCloner
+    ) {
         this.hackItInjector = hackItInjector;
         this.actorFunction = actorFunction;
         this.shipper = shipper;
@@ -51,6 +107,9 @@ public class HackitSniffer<K, T, SentType, SenderObj extends Sender<SentType>, R
         this.not_first = false;
     }
 
+    /**
+     * Default Construct, this get all the components from configuration files
+     */
     public HackitSniffer() {
         //TODO this over configuration file
         this.not_first = false;
@@ -76,26 +135,51 @@ public class HackitSniffer<K, T, SentType, SenderObj extends Sender<SentType>, R
         return this.hackItInjector.inject(ktHackItTuple, inyection);
     }
 
+    /**
+     *
+     * @param hackItInjector
+     * @return
+     */
     public HackitSniffer<K, T, SentType, SenderObj, ReceiverObj> setHackItInjector(Injector<HackitTuple<K, T>> hackItInjector) {
         this.hackItInjector = hackItInjector;
         return this;
     }
 
+    /**
+     *
+     * @param actorFunction
+     * @return
+     */
     public HackitSniffer<K, T, SentType, SenderObj, ReceiverObj> setActorFunction(Actor<HackitTuple<K, T>> actorFunction) {
         this.actorFunction = actorFunction;
         return this;
     }
 
+    /**
+     *
+     * @param shipper
+     * @return
+     */
     public HackitSniffer<K, T, SentType, SenderObj, ReceiverObj> setShipper(Shipper<HackitTuple<K, T>, SentType, SenderObj, ReceiverObj> shipper) {
         this.shipper = shipper;
         return this;
     }
 
+    /**
+     *
+     * @param hackItSniff
+     * @return
+     */
     public HackitSniffer<K, T, SentType, SenderObj, ReceiverObj> setHackItSniff(Sniff<HackitTuple<K, T>> hackItSniff) {
         this.hackItSniff = hackItSniff;
         return this;
     }
 
+    /**
+     *
+     * @param hackItCloner
+     * @return
+     */
     public HackitSniffer<K, T, SentType, SenderObj, ReceiverObj> setHackItCloner(Cloner<HackitTuple<K, T>, SentType> hackItCloner) {
         this.hackItCloner = hackItCloner;
         return this;
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 b49a7c4..0deffd8 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
@@ -19,7 +19,16 @@ package org.apache.wayang.plugin.hackit.core.sniffer.actor;
 
 import java.io.Serializable;
 
+/**
+ *
+ * @param <T>
+ */
 public interface Actor<T> extends Serializable {
 
-    public boolean is_sendout(T value);
+    /**
+     *
+     * @param value
+     * @return
+     */
+    boolean is_sendout(T value);
 }
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/clone/BasicCloner.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/clone/BasicCloner.java
index c644e33..71c5255 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/clone/BasicCloner.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/clone/BasicCloner.java
@@ -21,7 +21,13 @@ import org.apache.commons.lang3.SerializationUtils;
 
 import java.io.Serializable;
 
+/**
+ * BasicClonner is just a basic implentation of {@link Cloner}
+ *
+ * @param <I> type of element to clone
+ */
 public class BasicCloner<I> implements Cloner<I, byte[]> {
+
     @Override
     public byte[] clone(I input) {
         return SerializationUtils.serialize((Serializable) input);
diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/clone/Cloner.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/clone/Cloner.java
index ccf99ab..74e2eb3 100644
--- a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/clone/Cloner.java
+++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/clone/Cloner.java
@@ -19,7 +19,21 @@ package org.apache.wayang.plugin.hackit.core.sniffer.clone;
 
 import java.io.Serializable;
 
+/**
+ * Cloner is the template for the functionality that take care about the clone phase
+ *
+ * @param <I> type of the element that it will get cloned
+ * @param <O> type of the element after cloning it, it possible that could be different
+ */
 public interface Cloner<I, O> extends Serializable {
 
-    public O clone(I input);
+    /**
+     * get <code>input</code> and create a clone, the output cloud be different
+     * to the original, this doesn't change the behavior it just a to reduce overhead
+     * in some case that is not need to have the same kind.
+     *
+     * @param input element to get cloned
+     * @return Clone of the <code>input</code> element
+     */
+    O clone(I input);
 }
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 94d265f..cacca18 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
@@ -24,6 +24,10 @@ import java.util.Spliterator;
 import java.util.Spliterators;
 import java.util.stream.StreamSupport;
 
+/**
+ *
+ * @param <T>
+ */
 public class EmptyInjector<T> implements Injector<T>{
 
     @Override
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 3ca4563..fb26604 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
@@ -20,11 +20,31 @@ package org.apache.wayang.plugin.hackit.core.sniffer.inject;
 import java.io.Serializable;
 import java.util.Iterator;
 
+/**
+ *
+ * @param <T>
+ */
 public interface Injector<T> extends Serializable {
 
-    public Iterator<T> inject(T element, Iterator<T> iterator);
+    /**
+     *
+     * @param element
+     * @param iterator
+     * @return
+     */
+    Iterator<T> inject(T element, Iterator<T> iterator);
 
-    public boolean is_skip_element(T element);
+    /**
+     *
+     * @param element
+     * @return
+     */
+    boolean is_skip_element(T element);
 
-    public boolean is_halt_job(T element);
+    /**
+     *
+     * @param element
+     * @return
+     */
+    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 6a19794..703074c 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
@@ -21,6 +21,18 @@ package org.apache.wayang.plugin.hackit.core.sniffer.shipper;
  * Publish and Subscribed Protocol
  */
 public interface PSProtocol {
+
+    /**
+     *
+     * @param topic
+     * @return
+     */
     public PSProtocol addTopic(String... topic);
+
+    /**
+     *
+     * @param exchange
+     * @return
+     */
     public PSProtocol addExchange(String exchange);
 }
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 969d8e8..a9881af 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
@@ -23,15 +23,41 @@ import org.apache.wayang.plugin.hackit.core.sniffer.shipper.sender.Sender;
 import java.io.Serializable;
 import java.util.Iterator;
 
+/**
+ *
+ * @param <T>
+ * @param <ST>
+ * @param <SenderObj>
+ * @param <ReceiverObj>
+ */
 public abstract class Shipper<T, ST, SenderObj extends Sender<ST>, ReceiverObj extends Receiver<T>> implements Iterator<T>, Serializable {
 
+    /**
+     *
+     */
     protected Sender sender_instance;
+
+    /**
+     *
+     */
     protected Receiver receiver_instance;
 
+    /**
+     *
+     * @return
+     */
     protected abstract Sender createSenderInstance();
+
+    /**
+     *
+     * @return
+     */
     protected abstract Receiver createReceiverInstance();
 
-    /** Connect with the a Message queue service*/
+    /**
+     * Connect with the a Message queue service
+     * @param value
+     */
     public void publish(ST value){
         if(this.sender_instance == null){
             throw new RuntimeException("The Sender of the Shipper is not instanciated");
@@ -39,16 +65,27 @@ public abstract class Shipper<T, ST, SenderObj extends Sender<ST>, ReceiverObj e
         this.sender_instance.send(value);
     }
 
-    /** To subscribe as a producer */
+    /**
+     * To subscribe as a producer
+     */
     public void subscribeAsProducer(){
         this.sender_instance = this.createSenderInstance();
         this.sender_instance.init();
     }
 
+    /**
+     *
+     * @param topic
+     */
     public void subscribeAsProducer(String... topic){
         this.subscribeAsProducer("default", topic);
     }
 
+    /**
+     *
+     * @param metatopic
+     * @param topic
+     */
     public void subscribeAsProducer(String metatopic, String... topic){
         this.subscribeAsProducer();
         ((PSProtocol)this.sender_instance)
@@ -57,23 +94,37 @@ public abstract class Shipper<T, ST, SenderObj extends Sender<ST>, ReceiverObj e
         ;
     }
 
-    /** Close connection */
+    /**
+     * Close connection
+     */
     public void unsubscribeAsProducer(){
         if( this.sender_instance == null) return;
         this.sender_instance.close();
     }
 
-    /** To subscribe/unsubscribe as a consumer
+    /**
+     * To subscribe/unsubscribe as a consumer
      * metatopic correspond to EXCHANGE_NAME
      * topics correspond to bindingKeys
-     * */
+     */
     public void subscribeAsConsumer(){
         this.receiver_instance = this.createReceiverInstance();
         this.receiver_instance.init();
     }
+
+    /**
+     *
+     * @param topic
+     */
     public void subscribeAsConsumer(String... topic){
         this.subscribeAsProducer("default", topic);
     }
+
+    /**
+     *
+     * @param metatopic
+     * @param topic
+     */
     public void subscribeAsConsumer(String metatopic, String... topic){
         this.subscribeAsConsumer();
         ((PSProtocol)this.receiver_instance)
@@ -82,12 +133,17 @@ public abstract class Shipper<T, ST, SenderObj extends Sender<ST>, ReceiverObj e
         ;
     }
 
-    /** Close connection */
+    /**
+     * Close connection
+     */
     public void unsubscribeAsConsumer() {
         if( this.receiver_instance == null) return;
         this.receiver_instance.close();
     }
 
+    /**
+     *
+     */
     public void close(){
         this.unsubscribeAsConsumer();
         this.unsubscribeAsProducer();
@@ -99,6 +155,10 @@ public abstract class Shipper<T, ST, SenderObj extends Sender<ST>, ReceiverObj e
     @Override
     public abstract T next();
 
+    /**
+     *
+     * @return
+     */
     public Iterator<T> 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 0a93dae..a13cabb 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
@@ -21,6 +21,10 @@ import java.io.Serializable;
 import java.util.Queue;
 import java.util.concurrent.LinkedBlockingQueue;
 
+/**
+ *
+ * @param <T>
+ */
 public class BufferReceiver<T> implements Serializable {
     //TODO implement the doble buffering
     private transient Queue<T> queue;
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 2bd42a7..fdfe139 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
@@ -21,6 +21,10 @@ package org.apache.wayang.plugin.hackit.core.sniffer.shipper.receiver;
 import java.util.Collections;
 import java.util.Iterator;
 
+/**
+ *
+ * @param <T>
+ */
 public class EmptyReceiver<T> extends Receiver<T> {
 
     @Override
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 dd120c0..80f9a9d 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
@@ -20,13 +20,30 @@ package org.apache.wayang.plugin.hackit.core.sniffer.shipper.receiver;
 import java.io.Serializable;
 import java.util.Iterator;
 
+/**
+ *
+ * @param <T>
+ */
 public abstract class Receiver<T> implements Serializable {
 
+    /**
+     *
+     */
     private transient BufferReceiver<T> bufferReceive;
 
+    /**
+     *
+     */
     public abstract void init();
 
+    /**
+     *
+     * @return
+     */
     public abstract Iterator<T> getElements();
 
+    /**
+     *
+     */
     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 6ac0817..1a2c459 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
@@ -18,12 +18,14 @@
 
 package org.apache.wayang.plugin.hackit.core.sniffer.shipper.sender;
 
+/**
+ *
+ * @param <T>
+ */
 public class EmptySender<T> implements Sender<T> {
 
     @Override
-    public void init() {
-
-    }
+    public void init() {}
 
     @Override
     public void send(T value) {}
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 89eb57d..82a491c 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
@@ -19,11 +19,25 @@ package org.apache.wayang.plugin.hackit.core.sniffer.shipper.sender;
 
 import java.io.Serializable;
 
+/**
+ *
+ * @param <T>
+ */
 public interface Sender<T> extends Serializable {
 
-    public void init();
+    /**
+     *
+     */
+    void init();
 
-    public void send(T value);
+    /**
+     *
+     * @param value
+     */
+    void send(T value);
 
-    public void close();
+    /**
+     *
+     */
+    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 a2811b0..16419db 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
@@ -23,18 +23,36 @@ import org.apache.wayang.plugin.hackit.core.tags.HackitTag;
 import java.util.HashSet;
 import java.util.Set;
 
+/**
+ *
+ */
 public class CollectionTagsToSniff implements Sniff {
 
+    /**
+     *
+     */
     public Set<HackitTag> tags2sniff;
 
+    /**
+     * Default Construct
+     */
     public CollectionTagsToSniff(){
         this.tags2sniff = new HashSet<>();
     }
 
+    /**
+     *
+     * @param tag
+     * @return
+     */
     public boolean sniff(HackitTag tag){
         return this.tags2sniff.contains(tag);
     }
 
+    /**
+     *
+     * @param tag
+     */
     public void addTag2sniff(HackitTag tag) {
         this.tags2sniff.add(tag);
     }
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 9ce8ede..42da261 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
@@ -20,14 +20,29 @@ package org.apache.wayang.plugin.hackit.core.sniffer.sniff;
 
 import org.apache.wayang.plugin.hackit.core.tags.HackitTag;
 
+/**
+ *
+ */
 public class SingleTagToSniff implements Sniff {
 
+    /**
+     *
+     */
     public HackitTag tags2sniff;
 
+    /**
+     *
+     * @param tag
+     * @return
+     */
     public boolean sniff(HackitTag tag){
         return this.tags2sniff.equals(tag);
     }
 
+    /**
+     *
+     * @param tag
+     */
     public void addTag2sniff(HackitTag tag) {
         if(this.tags2sniff != null){
             throw new RuntimeException("The SingleTagToSniff already got the tag, if you need more of one tag use CollectionTagsToSniff class");
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 44bfbbb..3a57c6f 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
@@ -19,7 +19,16 @@ package org.apache.wayang.plugin.hackit.core.sniffer.sniff;
 
 import java.io.Serializable;
 
+/**
+ *
+ * @param <I>
+ */
 public interface Sniff<I> extends Serializable {
 
-    public boolean sniff(I input);
+    /**
+     *
+     * @param input
+     * @return
+     */
+    boolean sniff(I input);
 }