http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/core/Utils.java ---------------------------------------------------------------------- diff --git a/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/core/Utils.java b/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/core/Utils.java index f406b2c..d169357 100644 --- a/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/core/Utils.java +++ b/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/core/Utils.java @@ -70,9 +70,8 @@ public final class Utils { } /** - * Returns the value used to code a missing value. Note that equality tests on - * this value will always return false, so use isMissingValue(double val) for - * testing.. + * Returns the value used to code a missing value. Note that equality tests on this value will always return false, so + * use isMissingValue(double val) for testing.. * * @return the value used as missing value. */ @@ -82,8 +81,8 @@ public final class Utils { } /** - * Casting an object without "unchecked" compile-time warnings. Use only when - * absolutely necessary (e.g. when using clone()). + * Casting an object without "unchecked" compile-time warnings. Use only when absolutely necessary (e.g. when using + * clone()). */ @SuppressWarnings("unchecked") public static <T> T cast(Object x) { @@ -151,8 +150,7 @@ public final class Utils { } /** - * Replaces with a new string, all occurrences of a string from another - * string. + * Replaces with a new string, all occurrences of a string from another string. * * @param inString * the string to replace substrings in. @@ -177,9 +175,8 @@ public final class Utils { } /** - * Pads a string to a specified length, inserting spaces on the left as - * required. If the string is too long, characters are removed (from the - * right). + * Pads a string to a specified length, inserting spaces on the left as required. If the string is too long, + * characters are removed (from the right). * * @param inString * the input string @@ -193,9 +190,8 @@ public final class Utils { } /** - * Pads a string to a specified length, inserting spaces on the right as - * required. If the string is too long, characters are removed (from the - * right). + * Pads a string to a specified length, inserting spaces on the right as required. If the string is too long, + * characters are removed (from the right). * * @param inString * the input string @@ -209,8 +205,8 @@ public final class Utils { } /** - * Pads a string to a specified length, inserting spaces as required. If the - * string is too long, characters are removed (from the right). + * Pads a string to a specified length, inserting spaces as required. If the string is too long, characters are + * removed (from the right). * * @param inString * the input string @@ -292,8 +288,7 @@ public final class Utils { } /** - * Rounds a double and converts it into a formatted decimal-justified String. - * Trailing 0's are replaced with spaces. + * Rounds a double and converts it into a formatted decimal-justified String. Trailing 0's are replaced with spaces. * * @param value * the double value @@ -357,8 +352,7 @@ public final class Utils { } /** - * Returns the basic class of an array class (handles multi-dimensional - * arrays). + * Returns the basic class of an array class (handles multi-dimensional arrays). * * @param c * the array to inspect @@ -372,9 +366,8 @@ public final class Utils { } /** - * Returns the dimensions of the given array. Even though the parameter is of - * type "Object" one can hand over primitve arrays, e.g. int[3] or - * double[2][4]. + * Returns the dimensions of the given array. Even though the parameter is of type "Object" one can hand over primitve + * arrays, e.g. int[3] or double[2][4]. * * @param array * the array to determine the dimensions for @@ -388,9 +381,8 @@ public final class Utils { } /** - * Returns the dimensions of the given array. Even though the parameter is of - * type "Object" one can hand over primitve arrays, e.g. int[3] or - * double[2][4]. + * Returns the dimensions of the given array. Even though the parameter is of type "Object" one can hand over primitve + * arrays, e.g. int[3] or double[2][4]. * * @param array * the array to determine the dimensions for @@ -401,9 +393,8 @@ public final class Utils { } /** - * Returns the given Array in a string representation. Even though the - * parameter is of type "Object" one can hand over primitve arrays, e.g. - * int[3] or double[2][4]. + * Returns the given Array in a string representation. Even though the parameter is of type "Object" one can hand over + * primitve arrays, e.g. int[3] or double[2][4]. * * @param array * the array to return in a string representation @@ -483,9 +474,8 @@ public final class Utils { } /** - * Checks if the given array contains the flag "-Char". Stops searching at the - * first marker "--". If the flag is found, it is replaced with the empty - * string. + * Checks if the given array contains the flag "-Char". Stops searching at the first marker "--". If the flag is + * found, it is replaced with the empty string. * * @param flag * the character indicating the flag. @@ -502,9 +492,8 @@ public final class Utils { } /** - * Checks if the given array contains the flag "-String". Stops searching at - * the first marker "--". If the flag is found, it is replaced with the empty - * string. + * Checks if the given array contains the flag "-String". Stops searching at the first marker "--". If the flag is + * found, it is replaced with the empty string. * * @param flag * the String indicating the flag. @@ -526,9 +515,8 @@ public final class Utils { } /** - * Gets an option indicated by a flag "-Char" from the given array of strings. - * Stops searching at the first marker "--". Replaces flag and option with - * empty strings. + * Gets an option indicated by a flag "-Char" from the given array of strings. Stops searching at the first marker + * "--". Replaces flag and option with empty strings. * * @param flag * the character indicating the option. @@ -545,9 +533,8 @@ public final class Utils { } /** - * Gets an option indicated by a flag "-String" from the given array of - * strings. Stops searching at the first marker "--". Replaces flag and option - * with empty strings. + * Gets an option indicated by a flag "-String" from the given array of strings. Stops searching at the first marker + * "--". Replaces flag and option with empty strings. * * @param flag * the String indicating the option. @@ -582,8 +569,8 @@ public final class Utils { } /** - * Gets the index of an option or flag indicated by a flag "-Char" from the - * given array of strings. Stops searching at the first marker "--". + * Gets the index of an option or flag indicated by a flag "-Char" from the given array of strings. Stops searching at + * the first marker "--". * * @param flag * the character indicating the option. @@ -596,8 +583,8 @@ public final class Utils { } /** - * Gets the index of an option or flag indicated by a flag "-String" from the - * given array of strings. Stops searching at the first marker "--". + * Gets the index of an option or flag indicated by a flag "-String" from the given array of strings. Stops searching + * at the first marker "--". * * @param flag * the String indicating the option. @@ -633,15 +620,13 @@ public final class Utils { * * The following rules are applied: * - * A character is backquoted version of it is one of <tt>" ' % \ \n \r \t</tt> - * . + * A character is backquoted version of it is one of <tt>" ' % \ \n \r \t</tt> . * - * A string is enclosed within single quotes if a character has been - * backquoted using the previous rule above or contains <tt>{ }</tt> or is - * exactly equal to the strings <tt>, ? space or ""</tt> (empty string). + * A string is enclosed within single quotes if a character has been backquoted using the previous rule above or + * contains <tt>{ }</tt> or is exactly equal to the strings <tt>, ? space or ""</tt> (empty string). * - * A quoted question mark distinguishes it from the missing value which is - * represented as an unquoted question mark in arff files. + * A quoted question mark distinguishes it from the missing value which is represented as an unquoted question mark in + * arff files. * * @param string * the string to be quoted @@ -674,8 +659,8 @@ public final class Utils { } /** - * unquotes are previously quoted string (but only if necessary), i.e., it - * removes the single quotes around it. Inverse to quote(String). + * unquotes are previously quoted string (but only if necessary), i.e., it removes the single quotes around it. + * Inverse to quote(String). * * @param string * the string to process @@ -699,8 +684,8 @@ public final class Utils { } /** - * Converts carriage returns and new lines in a string into \r and \n. - * Backquotes the following characters: ` " \ \t and % + * Converts carriage returns and new lines in a string into \r and \n. Backquotes the following characters: ` " \ \t + * and % * * @param string * the string @@ -829,9 +814,8 @@ public final class Utils { } /** - * Returns the secondary set of options (if any) contained in the supplied - * options array. The secondary set is defined to be any options after the - * first "--". These options are removed from the original options array. + * Returns the secondary set of options (if any) contained in the supplied options array. The secondary set is defined + * to be any options after the first "--". These options are removed from the original options array. * * @param options * the input array of options @@ -854,9 +838,8 @@ public final class Utils { } /** - * The inverse operation of backQuoteChars(). Converts back-quoted carriage - * returns and new lines in a string to the corresponding character ('\r' and - * '\n'). Also "un"-back-quotes the following characters: ` " \ \t and % + * The inverse operation of backQuoteChars(). Converts back-quoted carriage returns and new lines in a string to the + * corresponding character ('\r' and '\n'). Also "un"-back-quotes the following characters: ` " \ \t and % * * @param string * the string @@ -906,15 +889,13 @@ public final class Utils { } /** - * Split up a string containing options into an array of strings, one for each - * option. + * Split up a string containing options into an array of strings, one for each option. * * @param quotedOptionString * the string containing the options * @return the array of options * @throws Exception - * in case of an unterminated string, unknown character or a parse - * error + * in case of an unterminated string, unknown character or a parse error */ public static String[] splitOptions(String quotedOptionString) throws Exception { @@ -979,8 +960,7 @@ public final class Utils { } /** - * Joins all the options in an option array into a single string, as might be - * used on the command line. + * Joins all the options in an option array into a single string, as might be used on the command line. * * @param optionArray * the array of options @@ -1015,8 +995,7 @@ public final class Utils { * * @param counts * array of counts - * @return - a log2 a - b log2 b - c log2 c + (a+b+c) log2 (a+b+c) when given - * array [a b c] + * @return - a log2 a - b log2 b - c log2 c + (a+b+c) log2 (a+b+c) when given array [a b c] */ public static/* @pure@ */double info(int counts[]) { @@ -1134,8 +1113,7 @@ public final class Utils { } /** - * Returns index of maximum element in a given array of doubles. First maximum - * is returned. + * Returns index of maximum element in a given array of doubles. First maximum is returned. * * @param doubles * the array of doubles @@ -1157,8 +1135,7 @@ public final class Utils { } /** - * Returns index of maximum element in a given array of integers. First - * maximum is returned. + * Returns index of maximum element in a given array of integers. First maximum is returned. * * @param ints * the array of integers @@ -1200,8 +1177,7 @@ public final class Utils { } /** - * Returns index of minimum element in a given array of integers. First - * minimum is returned. + * Returns index of minimum element in a given array of integers. First minimum is returned. * * @param ints * the array of integers @@ -1223,8 +1199,7 @@ public final class Utils { } /** - * Returns index of minimum element in a given array of doubles. First minimum - * is returned. + * Returns index of minimum element in a given array of doubles. First minimum is returned. * * @param doubles * the array of doubles @@ -1287,9 +1262,8 @@ public final class Utils { } /** - * Converts an array containing the natural logarithms of probabilities stored - * in a vector back into probabilities. The probabilities are assumed to sum - * to one. + * Converts an array containing the natural logarithms of probabilities stored in a vector back into probabilities. + * The probabilities are assumed to sum to one. * * @param a * an array holding the natural logarithms of the probabilities @@ -1317,8 +1291,7 @@ public final class Utils { * @param prob * the probabilitiy * - * @return the log-odds after the probability has been mapped to [Utils.SMALL, - * 1-Utils.SMALL] + * @return the log-odds after the probability has been mapped to [Utils.SMALL, 1-Utils.SMALL] */ public static/* @pure@ */double probToLogOdds(double prob) { @@ -1331,8 +1304,7 @@ public final class Utils { } /** - * Rounds a double to the next nearest integer value. The JDK version of it - * doesn't work properly. + * Rounds a double to the next nearest integer value. The JDK version of it doesn't work properly. * * @param value * the double value @@ -1348,10 +1320,9 @@ public final class Utils { } /** - * Rounds a double to the next nearest integer value in a probabilistic - * fashion (e.g. 0.8 has a 20% chance of being rounded down to 0 and a 80% - * chance of being rounded up to 1). In the limit, the average of the rounded - * numbers generated by this procedure should converge to the original double. + * Rounds a double to the next nearest integer value in a probabilistic fashion (e.g. 0.8 has a 20% chance of being + * rounded down to 0 and a 80% chance of being rounded up to 1). In the limit, the average of the rounded numbers + * generated by this procedure should converge to the original double. * * @param value * the double value @@ -1397,9 +1368,8 @@ public final class Utils { } /** - * Sorts a given array of integers in ascending order and returns an array of - * integers with the positions of the elements of the original array in the - * sorted array. The sort is stable. (Equal elements remain in their original + * Sorts a given array of integers in ascending order and returns an array of integers with the positions of the + * elements of the original array in the sorted array. The sort is stable. (Equal elements remain in their original * order.) * * @param array @@ -1445,11 +1415,9 @@ public final class Utils { } /** - * Sorts a given array of doubles in ascending order and returns an array of - * integers with the positions of the elements of the original array in the - * sorted array. NOTE THESE CHANGES: the sort is no longer stable and it - * doesn't use safe floating-point comparisons anymore. Occurrences of - * Double.NaN are treated as Double.MAX_VALUE + * Sorts a given array of doubles in ascending order and returns an array of integers with the positions of the + * elements of the original array in the sorted array. NOTE THESE CHANGES: the sort is no longer stable and it doesn't + * use safe floating-point comparisons anymore. Occurrences of Double.NaN are treated as Double.MAX_VALUE * * @param array * this array is not changed by the method! @@ -1470,9 +1438,8 @@ public final class Utils { } /** - * Sorts a given array of doubles in ascending order and returns an array of - * integers with the positions of the elements of the original array in the - * sorted array. The sort is stable (Equal elements remain in their original + * Sorts a given array of doubles in ascending order and returns an array of integers with the positions of the + * elements of the original array in the sorted array. The sort is stable (Equal elements remain in their original * order.) Occurrences of Double.NaN are treated as Double.MAX_VALUE * * @param array @@ -1599,8 +1566,7 @@ public final class Utils { } /** - * Partitions the instances around a pivot. Used by quicksort and - * kthSmallestValue. + * Partitions the instances around a pivot. Used by quicksort and kthSmallestValue. * * @param array * the array of doubles to be sorted @@ -1641,8 +1607,7 @@ public final class Utils { } /** - * Partitions the instances around a pivot. Used by quicksort and - * kthSmallestValue. + * Partitions the instances around a pivot. Used by quicksort and kthSmallestValue. * * @param array * the array of integers to be sorted @@ -1737,8 +1702,7 @@ public final class Utils { } /** - * Implements computation of the kth-smallest element according to Manber's - * "Introduction to Algorithms". + * Implements computation of the kth-smallest element according to Manber's "Introduction to Algorithms". * * @param array * the array of double @@ -1770,9 +1734,8 @@ public final class Utils { } /** - * Converts a File's absolute path to a path relative to the user (ie start) - * directory. Includes an additional workaround for Cygwin, which doesn't like - * upper case drive letters. + * Converts a File's absolute path to a path relative to the user (ie start) directory. Includes an additional + * workaround for Cygwin, which doesn't like upper case drive letters. * * @param absolute * the File to convert to relative path @@ -1807,8 +1770,7 @@ public final class Utils { } /** - * Converts a File's absolute path to a path relative to the user (ie start) - * directory. + * Converts a File's absolute path to a path relative to the user (ie start) directory. * * @param absolute * the File to convert to relative path @@ -1882,8 +1844,7 @@ public final class Utils { } /** - * Implements computation of the kth-smallest element according to Manber's - * "Introduction to Algorithms". + * Implements computation of the kth-smallest element according to Manber's "Introduction to Algorithms". * * @param array * the array of integers @@ -1969,10 +1930,9 @@ public final class Utils { } /** - * Creates a new instance of an object given it's class name and (optional) - * arguments to pass to it's setOptions method. If the object implements - * OptionHandler and the options parameter is non-null, the object will have - * it's options set. Example use: + * Creates a new instance of an object given it's class name and (optional) arguments to pass to it's setOptions + * method. If the object implements OptionHandler and the options parameter is non-null, the object will have it's + * options set. Example use: * <p> * * <code> <pre> @@ -1984,19 +1944,17 @@ public final class Utils { * </pre></code> * * @param classType - * the class that the instantiated object should be assignable to -- - * an exception is thrown if this is not the case + * the class that the instantiated object should be assignable to -- an exception is thrown if this is not + * the case * @param className * the fully qualified class name of the object * @param options - * an array of options suitable for passing to setOptions. May be - * null. Any options accepted by the object will be removed from the - * array. + * an array of options suitable for passing to setOptions. May be null. Any options accepted by the object + * will be removed from the array. * @return the newly created object, ready for use. * @exception Exception - * if the class name is invalid, or if the class is not - * assignable to the desired class type, or the options supplied - * are not acceptable to the object + * if the class name is invalid, or if the class is not assignable to the desired class type, or the + * options supplied are not acceptable to the object */ public static Object forName(Class<?> classType, String className,
http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/evaluation/LearningPerformanceEvaluator.java ---------------------------------------------------------------------- diff --git a/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/evaluation/LearningPerformanceEvaluator.java b/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/evaluation/LearningPerformanceEvaluator.java index b236066..8e86756 100644 --- a/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/evaluation/LearningPerformanceEvaluator.java +++ b/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/evaluation/LearningPerformanceEvaluator.java @@ -25,8 +25,7 @@ import com.yahoo.labs.samoa.moa.core.Example; import com.yahoo.labs.samoa.moa.core.Measurement; /** - * Interface implemented by learner evaluators to monitor the results of the - * learning process. + * Interface implemented by learner evaluators to monitor the results of the learning process. * * @author Richard Kirkby ([email protected]) * @version $Revision: 7 $ @@ -34,8 +33,7 @@ import com.yahoo.labs.samoa.moa.core.Measurement; public interface LearningPerformanceEvaluator<E extends Example> extends MOAObject { /** - * Resets this evaluator. It must be similar to starting a new evaluator from - * scratch. + * Resets this evaluator. It must be similar to starting a new evaluator from scratch. * */ public void reset(); @@ -46,8 +44,7 @@ public interface LearningPerformanceEvaluator<E extends Example> extends MOAObje * @param example * the example to be classified * @param classVotes - * an array containing the estimated membership probabilities of the - * test instance in each class + * an array containing the estimated membership probabilities of the test instance in each class * @return an array of measurements monitored in this evaluator */ public void addResult(E example, double[] classVotes); http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/learners/Learner.java ---------------------------------------------------------------------- diff --git a/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/learners/Learner.java b/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/learners/Learner.java index be63e30..2af7145 100644 --- a/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/learners/Learner.java +++ b/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/learners/Learner.java @@ -35,8 +35,8 @@ import com.yahoo.labs.samoa.moa.options.OptionHandler; public interface Learner<E extends Example> extends MOAObject, OptionHandler { /** - * Gets whether this learner needs a random seed. Examples of methods that - * needs a random seed are bagging and boosting. + * Gets whether this learner needs a random seed. Examples of methods that needs a random seed are bagging and + * boosting. * * @return true if the learner needs a random seed. */ @@ -58,16 +58,15 @@ public interface Learner<E extends Example> extends MOAObject, OptionHandler { public boolean trainingHasStarted(); /** - * Gets the sum of the weights of the instances that have been used by this - * learner during the training in <code>trainOnInstance</code> + * Gets the sum of the weights of the instances that have been used by this learner during the training in + * <code>trainOnInstance</code> * * @return the weight of the instances that have been used training */ public double trainingWeightSeenByModel(); /** - * Resets this learner. It must be similar to starting a new learner from - * scratch. + * Resets this learner. It must be similar to starting a new learner from scratch. * */ public void resetLearning(); @@ -81,13 +80,12 @@ public interface Learner<E extends Example> extends MOAObject, OptionHandler { public void trainOnInstance(E example); /** - * Predicts the class memberships for a given instance. If an instance is - * unclassified, the returned array elements must be all zero. + * Predicts the class memberships for a given instance. If an instance is unclassified, the returned array elements + * must be all zero. * * @param inst * the instance to be classified - * @return an array containing the estimated membership probabilities of the - * test instance in each class + * @return an array containing the estimated membership probabilities of the test instance in each class */ public double[] getVotesForInstance(E example); @@ -99,8 +97,7 @@ public interface Learner<E extends Example> extends MOAObject, OptionHandler { public Measurement[] getModelMeasurements(); /** - * Gets the learners of this ensemble. Returns null if this learner is a - * single learner. + * Gets the learners of this ensemble. Returns null if this learner is a single learner. * * @return an array of the learners of the ensemble */ @@ -114,9 +111,8 @@ public interface Learner<E extends Example> extends MOAObject, OptionHandler { public MOAObject getModel(); /** - * Sets the reference to the header of the data stream. The header of the data - * stream is extended from WEKA <code>Instances</code>. This header is needed - * to know the number of classes and attributes + * Sets the reference to the header of the data stream. The header of the data stream is extended from WEKA + * <code>Instances</code>. This header is needed to know the number of classes and attributes * * @param ih * the reference to the data stream header @@ -124,9 +120,8 @@ public interface Learner<E extends Example> extends MOAObject, OptionHandler { public void setModelContext(InstancesHeader ih); /** - * Gets the reference to the header of the data stream. The header of the data - * stream is extended from WEKA <code>Instances</code>. This header is needed - * to know the number of classes and attributes + * Gets the reference to the header of the data stream. The header of the data stream is extended from WEKA + * <code>Instances</code>. This header is needed to know the number of classes and attributes * * @return the reference to the data stream header */ http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/options/AbstractClassOption.java ---------------------------------------------------------------------- diff --git a/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/options/AbstractClassOption.java b/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/options/AbstractClassOption.java index 0685855..f0fd853 100644 --- a/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/options/AbstractClassOption.java +++ b/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/options/AbstractClassOption.java @@ -56,9 +56,8 @@ public abstract class AbstractClassOption extends AbstractOption { protected String nullString; /** - * Creates a new instance of an abstract option given its class name, command - * line interface text, its purpose, its class type and its default command - * line interface text. + * Creates a new instance of an abstract option given its class name, command line interface text, its purpose, its + * class type and its default command line interface text. * * @param name * the name of this option @@ -77,9 +76,8 @@ public abstract class AbstractClassOption extends AbstractOption { } /** - * Creates a new instance of an abstract option given its class name, command - * line interface text, its purpose, its class type, default command line - * interface text, and its null text. + * Creates a new instance of an abstract option given its class name, command line interface text, its purpose, its + * class type, default command line interface text, and its null text. * * @param name * the name of this option http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/options/AbstractOptionHandler.java ---------------------------------------------------------------------- diff --git a/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/options/AbstractOptionHandler.java b/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/options/AbstractOptionHandler.java index 546e678..a7a006e 100644 --- a/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/options/AbstractOptionHandler.java +++ b/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/options/AbstractOptionHandler.java @@ -27,8 +27,7 @@ import com.yahoo.labs.samoa.moa.tasks.NullMonitor; import com.yahoo.labs.samoa.moa.tasks.TaskMonitor; /** - * Abstract Option Handler. All classes that have options in MOA extend this - * class. + * Abstract Option Handler. All classes that have options in MOA extend this class. * * @author Richard Kirkby ([email protected]) * @version $Revision: 7 $ @@ -83,9 +82,8 @@ public abstract class AbstractOptionHandler extends AbstractMOAObject implements } /** - * This method describes the implementation of how to prepare this object for - * use. All classes that extends this class have to implement - * <code>prepareForUseImpl</code> and not <code>prepareForUse</code> since + * This method describes the implementation of how to prepare this object for use. All classes that extends this class + * have to implement <code>prepareForUseImpl</code> and not <code>prepareForUse</code> since * <code>prepareForUse</code> calls <code>prepareForUseImpl</code>. * * @param monitor http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/options/OptionsHandler.java ---------------------------------------------------------------------- diff --git a/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/options/OptionsHandler.java b/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/options/OptionsHandler.java index 42628b2..56dffa7 100644 --- a/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/options/OptionsHandler.java +++ b/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/options/OptionsHandler.java @@ -83,9 +83,8 @@ public class OptionsHandler extends JavaCLIParser { } /** - * This method describes the implementation of how to prepare this object for - * use. All classes that extends this class have to implement - * <code>prepareForUseImpl</code> and not <code>prepareForUse</code> since + * This method describes the implementation of how to prepare this object for use. All classes that extends this class + * have to implement <code>prepareForUseImpl</code> and not <code>prepareForUse</code> since * <code>prepareForUse</code> calls <code>prepareForUseImpl</code>. * * @param monitor http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/streams/ExampleStream.java ---------------------------------------------------------------------- diff --git a/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/streams/ExampleStream.java b/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/streams/ExampleStream.java index 471d83c..8714214 100644 --- a/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/streams/ExampleStream.java +++ b/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/streams/ExampleStream.java @@ -33,8 +33,8 @@ import com.yahoo.labs.samoa.moa.core.Example; public interface ExampleStream<E extends Example> extends MOAObject { /** - * Gets the header of this stream. This is useful to know attributes and - * classes. InstancesHeader is an extension of weka.Instances. + * Gets the header of this stream. This is useful to know attributes and classes. InstancesHeader is an extension of + * weka.Instances. * * @return the header of this stream */ @@ -48,8 +48,7 @@ public interface ExampleStream<E extends Example> extends MOAObject { public long estimatedRemainingInstances(); /** - * Gets whether this stream has more instances to output. This is useful when - * reading streams from files. + * Gets whether this stream has more instances to output. This is useful when reading streams from files. * * @return true if this stream has more instances to output */ @@ -70,8 +69,7 @@ public interface ExampleStream<E extends Example> extends MOAObject { public boolean isRestartable(); /** - * Restarts this stream. It must be similar to starting a new stream from - * scratch. + * Restarts this stream. It must be similar to starting a new stream from scratch. * */ public void restart(); http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/tasks/ResultPreviewListener.java ---------------------------------------------------------------------- diff --git a/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/tasks/ResultPreviewListener.java b/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/tasks/ResultPreviewListener.java index 63d1236..4922d9d 100644 --- a/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/tasks/ResultPreviewListener.java +++ b/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/tasks/ResultPreviewListener.java @@ -21,8 +21,7 @@ package com.yahoo.labs.samoa.moa.tasks; */ /** - * Interface implemented by classes that preview results on the Graphical User - * Interface + * Interface implemented by classes that preview results on the Graphical User Interface * * @author Richard Kirkby ([email protected]) * @version $Revision: 7 $ @@ -30,10 +29,8 @@ package com.yahoo.labs.samoa.moa.tasks; public interface ResultPreviewListener { /** - * This method is used to receive a signal from <code>TaskMonitor</code> that - * the lastest preview has changed. This method is implemented in - * <code>PreviewPanel</code> to change the results that are shown in its - * panel. + * This method is used to receive a signal from <code>TaskMonitor</code> that the lastest preview has changed. This + * method is implemented in <code>PreviewPanel</code> to change the results that are shown in its panel. * */ public void latestPreviewChanged(); http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/tasks/Task.java ---------------------------------------------------------------------- diff --git a/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/tasks/Task.java b/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/tasks/Task.java index d3dcc4f..74a6b79 100644 --- a/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/tasks/Task.java +++ b/samoa-api/src/main/java/com/yahoo/labs/samoa/moa/tasks/Task.java @@ -32,24 +32,23 @@ import com.yahoo.labs.samoa.moa.core.ObjectRepository; public interface Task extends MOAObject { /** - * Gets the result type of this task. Tasks can return LearningCurve, - * LearningEvaluation, Classifier, String, Instances.. + * Gets the result type of this task. Tasks can return LearningCurve, LearningEvaluation, Classifier, String, + * Instances.. * * @return a class object of the result of this task */ public Class<?> getTaskResultType(); /** - * This method performs this task, when TaskMonitor and ObjectRepository are - * no needed. + * This method performs this task, when TaskMonitor and ObjectRepository are no needed. * * @return an object with the result of this task */ public Object doTask(); /** - * This method performs this task. <code>AbstractTask</code> implements this - * method so all its extensions only need to implement <code>doTaskImpl</code> + * This method performs this task. <code>AbstractTask</code> implements this method so all its extensions only need to + * implement <code>doTaskImpl</code> * * @param monitor * the TaskMonitor to use http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-api/src/main/java/com/yahoo/labs/samoa/streams/FileStream.java ---------------------------------------------------------------------- diff --git a/samoa-api/src/main/java/com/yahoo/labs/samoa/streams/FileStream.java b/samoa-api/src/main/java/com/yahoo/labs/samoa/streams/FileStream.java index 548c0da..130b9b8 100644 --- a/samoa-api/src/main/java/com/yahoo/labs/samoa/streams/FileStream.java +++ b/samoa-api/src/main/java/com/yahoo/labs/samoa/streams/FileStream.java @@ -37,8 +37,7 @@ import com.yahoo.labs.samoa.moa.tasks.TaskMonitor; import com.yahoo.labs.samoa.streams.fs.FileStreamSource; /** - * InstanceStream for files (Abstract class: subclass this class for different - * file formats) + * InstanceStream for files (Abstract class: subclass this class for different file formats) * * @author Casey */ @@ -160,8 +159,7 @@ public abstract class FileStream extends AbstractOptionHandler implements Instan /** * Read next instance from the current file and assign it to lastInstanceRead. * - * @return true if it was able to read next instance and false if it was at - * the end of the file + * @return true if it was able to read next instance and false if it was at the end of the file */ protected abstract boolean readNextInstanceFromFile(); http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-api/src/main/java/com/yahoo/labs/samoa/streams/PrequentialSourceProcessor.java ---------------------------------------------------------------------- diff --git a/samoa-api/src/main/java/com/yahoo/labs/samoa/streams/PrequentialSourceProcessor.java b/samoa-api/src/main/java/com/yahoo/labs/samoa/streams/PrequentialSourceProcessor.java index f9884e9..f6feeef 100644 --- a/samoa-api/src/main/java/com/yahoo/labs/samoa/streams/PrequentialSourceProcessor.java +++ b/samoa-api/src/main/java/com/yahoo/labs/samoa/streams/PrequentialSourceProcessor.java @@ -38,8 +38,7 @@ import com.yahoo.labs.samoa.moa.options.AbstractOptionHandler; import com.yahoo.labs.samoa.moa.streams.InstanceStream; /** - * Prequential Source Processor is the processor for Prequential Evaluation - * Task. + * Prequential Source Processor is the processor for Prequential Evaluation Task. * * @author Arinto Murdopo * http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-api/src/main/java/com/yahoo/labs/samoa/streams/fs/FileStreamSource.java ---------------------------------------------------------------------- diff --git a/samoa-api/src/main/java/com/yahoo/labs/samoa/streams/fs/FileStreamSource.java b/samoa-api/src/main/java/com/yahoo/labs/samoa/streams/fs/FileStreamSource.java index 6d741f9..b9ada9a 100644 --- a/samoa-api/src/main/java/com/yahoo/labs/samoa/streams/fs/FileStreamSource.java +++ b/samoa-api/src/main/java/com/yahoo/labs/samoa/streams/fs/FileStreamSource.java @@ -37,8 +37,8 @@ public interface FileStreamSource extends Serializable { * @param path * File or directory path * @param ext - * File extension to be used to filter files in a directory. If null, - * all files in the directory are accepted. + * File extension to be used to filter files in a directory. If null, all files in the directory are + * accepted. */ public void init(String path, String ext); @@ -48,17 +48,15 @@ public interface FileStreamSource extends Serializable { public void reset() throws IOException; /** - * Retrieve InputStream for next file. This method will return null if we are - * at the last file in the list. + * Retrieve InputStream for next file. This method will return null if we are at the last file in the list. * * @return InputStream for next file in the list */ public InputStream getNextInputStream(); /** - * Retrieve InputStream for current file. The "current pointer" is moved - * forward with getNextInputStream method. So if there was no invocation of - * getNextInputStream, this method will return null. + * Retrieve InputStream for current file. The "current pointer" is moved forward with getNextInputStream method. So if + * there was no invocation of getNextInputStream, this method will return null. * * @return InputStream for current file in the list */ http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-api/src/main/java/com/yahoo/labs/samoa/tasks/PrequentialEvaluation.java ---------------------------------------------------------------------- diff --git a/samoa-api/src/main/java/com/yahoo/labs/samoa/tasks/PrequentialEvaluation.java b/samoa-api/src/main/java/com/yahoo/labs/samoa/tasks/PrequentialEvaluation.java index 081d123..0bd1fef 100644 --- a/samoa-api/src/main/java/com/yahoo/labs/samoa/tasks/PrequentialEvaluation.java +++ b/samoa-api/src/main/java/com/yahoo/labs/samoa/tasks/PrequentialEvaluation.java @@ -49,10 +49,8 @@ import com.yahoo.labs.samoa.topology.Topology; import com.yahoo.labs.samoa.topology.TopologyBuilder; /** - * Prequential Evaluation task is a scheme in evaluating performance of online - * classifiers which uses each instance for testing online classifiers model and - * then it further uses the same instance for training the - * model(Test-then-train) + * Prequential Evaluation task is a scheme in evaluating performance of online classifiers which uses each instance for + * testing online classifiers model and then it further uses the same instance for training the model(Test-then-train) * * @author Arinto Murdopo * http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-api/src/main/java/com/yahoo/labs/samoa/tasks/Task.java ---------------------------------------------------------------------- diff --git a/samoa-api/src/main/java/com/yahoo/labs/samoa/tasks/Task.java b/samoa-api/src/main/java/com/yahoo/labs/samoa/tasks/Task.java index 5753349..ea79976 100644 --- a/samoa-api/src/main/java/com/yahoo/labs/samoa/tasks/Task.java +++ b/samoa-api/src/main/java/com/yahoo/labs/samoa/tasks/Task.java @@ -29,8 +29,7 @@ import com.yahoo.labs.samoa.topology.Topology; public interface Task { /** - * Initialize this SAMOA task, i.e. create and connect ProcessingItems and - * Streams and initialize the topology + * Initialize this SAMOA task, i.e. create and connect ProcessingItems and Streams and initialize the topology */ public void init(); @@ -49,9 +48,8 @@ public interface Task { // public TopologyStarter getTopologyStarter(); /** - * Sets the factory. TODO: propose to hide factory from task, i.e. Task will - * only see TopologyBuilder, and factory creation will be handled by - * TopologyBuilder + * Sets the factory. TODO: propose to hide factory from task, i.e. Task will only see TopologyBuilder, and factory + * creation will be handled by TopologyBuilder * * @param factory * the new factory http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/AbstractEntranceProcessingItem.java ---------------------------------------------------------------------- diff --git a/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/AbstractEntranceProcessingItem.java b/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/AbstractEntranceProcessingItem.java index 1e3c9b5..5adbfae 100644 --- a/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/AbstractEntranceProcessingItem.java +++ b/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/AbstractEntranceProcessingItem.java @@ -91,9 +91,8 @@ public abstract class AbstractEntranceProcessingItem implements EntranceProcessi * Output Stream */ /** - * Set the output stream of this EntranceProcessingItem. An - * EntranceProcessingItem should have only 1 single output stream and should - * not be re-assigned. + * Set the output stream of this EntranceProcessingItem. An EntranceProcessingItem should have only 1 single output + * stream and should not be re-assigned. * * @return this EntranceProcessingItem */ http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/AbstractProcessingItem.java ---------------------------------------------------------------------- diff --git a/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/AbstractProcessingItem.java b/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/AbstractProcessingItem.java index 60d76e0..4d98dba 100644 --- a/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/AbstractProcessingItem.java +++ b/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/AbstractProcessingItem.java @@ -26,9 +26,8 @@ import com.yahoo.labs.samoa.utils.PartitioningScheme; /** * Abstract ProcessingItem * - * Helper for implementation of ProcessingItem. It has basic information for a - * ProcessingItem: name, parallelismLevel and a processor. Subclass of this - * class needs to implement {@link #addInputStream(Stream, PartitioningScheme)}. + * Helper for implementation of ProcessingItem. It has basic information for a ProcessingItem: name, parallelismLevel + * and a processor. Subclass of this class needs to implement {@link #addInputStream(Stream, PartitioningScheme)}. * * @author Anh Thu Vu * @@ -129,8 +128,7 @@ public abstract class AbstractProcessingItem implements ProcessingItem { * @param inputStream * the input stream to add * @param scheme - * partitioning scheme associated with this ProcessingItem and the - * input stream + * partitioning scheme associated with this ProcessingItem and the input stream * @return this ProcessingItem */ protected abstract ProcessingItem addInputStream(Stream inputStream, PartitioningScheme scheme); http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/AbstractStream.java ---------------------------------------------------------------------- diff --git a/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/AbstractStream.java b/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/AbstractStream.java index a16d566..f30e3cf 100644 --- a/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/AbstractStream.java +++ b/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/AbstractStream.java @@ -25,9 +25,8 @@ import com.yahoo.labs.samoa.core.ContentEvent; /** * Abstract Stream * - * Helper for implementation of Stream. It has basic information for a Stream: - * streamID and source ProcessingItem. Subclass of this class needs to implement - * {@link #put(ContentEvent)}. + * Helper for implementation of Stream. It has basic information for a Stream: streamID and source ProcessingItem. + * Subclass of this class needs to implement {@link #put(ContentEvent)}. * * @author Anh Thu Vu * http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/AbstractTopology.java ---------------------------------------------------------------------- diff --git a/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/AbstractTopology.java b/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/AbstractTopology.java index 00096ca..5bfb8a5 100755 --- a/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/AbstractTopology.java +++ b/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/AbstractTopology.java @@ -26,8 +26,7 @@ import java.util.Set; /** * Topology abstract class. * - * It manages basic information of a topology: name, sets of Streams and - * ProcessingItems + * It manages basic information of a topology: name, sets of Streams and ProcessingItems * */ public abstract class AbstractTopology implements Topology { http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/ComponentFactory.java ---------------------------------------------------------------------- diff --git a/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/ComponentFactory.java b/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/ComponentFactory.java index f1e82dc..95e74ba 100644 --- a/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/ComponentFactory.java +++ b/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/ComponentFactory.java @@ -38,22 +38,19 @@ public interface ComponentFactory { public ProcessingItem createPi(Processor processor); /** - * Creates a platform specific processing item with the specified processor. - * Additionally sets the parallelism level. + * Creates a platform specific processing item with the specified processor. Additionally sets the parallelism level. * * @param processor * contains the logic for this processing item. * @param parallelism - * defines the amount of instances of this processing item will be - * created. + * defines the amount of instances of this processing item will be created. * @return ProcessingItem */ public ProcessingItem createPi(Processor processor, int parallelism); /** - * Creates a platform specific processing item with the specified processor - * that is the entrance point in the topology. This processing item can either - * generate a stream of data or connect to an external stream of data. + * Creates a platform specific processing item with the specified processor that is the entrance point in the + * topology. This processing item can either generate a stream of data or connect to an external stream of data. * * @param entranceProcessor * contains the logic for this processing item. @@ -65,8 +62,7 @@ public interface ComponentFactory { * Creates a platform specific stream. * * @param sourcePi - * source processing item which will provide the events for this - * stream. + * source processing item which will provide the events for this stream. * @return Stream */ public Stream createStream(IProcessingItem sourcePi); http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/EntranceProcessingItem.java ---------------------------------------------------------------------- diff --git a/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/EntranceProcessingItem.java b/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/EntranceProcessingItem.java index 9698cc3..c5f88b2 100644 --- a/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/EntranceProcessingItem.java +++ b/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/EntranceProcessingItem.java @@ -40,8 +40,7 @@ public interface EntranceProcessingItem extends IProcessingItem { * * @param stream * the stream - * @return the current instance of the EntranceProcessingItem for fluent - * interface. + * @return the current instance of the EntranceProcessingItem for fluent interface. */ public EntranceProcessingItem setOutputStream(Stream stream); } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/ISubmitter.java ---------------------------------------------------------------------- diff --git a/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/ISubmitter.java b/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/ISubmitter.java index 10c0690..7b0b209 100644 --- a/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/ISubmitter.java +++ b/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/ISubmitter.java @@ -23,8 +23,7 @@ package com.yahoo.labs.samoa.topology; import com.yahoo.labs.samoa.tasks.Task; /** - * Submitter interface for programatically deploying platform specific - * topologies. + * Submitter interface for programatically deploying platform specific topologies. * * @author severien * http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/LocalEntranceProcessingItem.java ---------------------------------------------------------------------- diff --git a/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/LocalEntranceProcessingItem.java b/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/LocalEntranceProcessingItem.java index 1fe4642..bf16d34 100644 --- a/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/LocalEntranceProcessingItem.java +++ b/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/LocalEntranceProcessingItem.java @@ -24,8 +24,7 @@ import com.yahoo.labs.samoa.core.ContentEvent; import com.yahoo.labs.samoa.core.EntranceProcessor; /** - * Implementation of EntranceProcessingItem for local engines (Simple, - * Multithreads) + * Implementation of EntranceProcessingItem for local engines (Simple, Multithreads) * * @author Anh Thu Vu * @@ -36,11 +35,9 @@ public class LocalEntranceProcessingItem extends AbstractEntranceProcessingItem } /** - * If there are available events, first event in the queue will be sent out on - * the output stream. + * If there are available events, first event in the queue will be sent out on the output stream. * - * @return true if there is (at least) one available event and it was sent out - * false otherwise + * @return true if there is (at least) one available event and it was sent out false otherwise */ public boolean injectNextEvent() { if (this.getProcessor().hasNext()) { @@ -52,11 +49,10 @@ public class LocalEntranceProcessingItem extends AbstractEntranceProcessingItem } /** - * Start sending events by calling {@link #injectNextEvent()}. If there are no - * available events, and that the stream is not entirely consumed, it will - * wait by calling {@link #waitForNewEvents()} before attempting to send - * again. </p> When the stream is entirely consumed, the last event is tagged - * accordingly and the processor gets the finished status. + * Start sending events by calling {@link #injectNextEvent()}. If there are no available events, and that the stream + * is not entirely consumed, it will wait by calling {@link #waitForNewEvents()} before attempting to send again. </p> + * When the stream is entirely consumed, the last event is tagged accordingly and the processor gets the finished + * status. * */ public void startSendingEvents() { @@ -76,9 +72,8 @@ public class LocalEntranceProcessingItem extends AbstractEntranceProcessingItem } /** - * Method to wait for an amount of time when there are no available events. - * Implementation of EntranceProcessingItem should override this method to - * implement non-blocking wait or to adjust the amount of time. + * Method to wait for an amount of time when there are no available events. Implementation of EntranceProcessingItem + * should override this method to implement non-blocking wait or to adjust the amount of time. */ protected void waitForNewEvents() throws Exception { Thread.sleep(100); http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/ProcessingItem.java ---------------------------------------------------------------------- diff --git a/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/ProcessingItem.java b/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/ProcessingItem.java index c1ecabc..2eea484 100644 --- a/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/ProcessingItem.java +++ b/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/ProcessingItem.java @@ -29,8 +29,8 @@ package com.yahoo.labs.samoa.topology; public interface ProcessingItem extends IProcessingItem { /** - * Connects this processing item in a round robin fashion. The events will be - * distributed evenly between the instantiated processing items. + * Connects this processing item in a round robin fashion. The events will be distributed evenly between the + * instantiated processing items. * * @param inputStream * Stream to connect this processing item. @@ -39,9 +39,8 @@ public interface ProcessingItem extends IProcessingItem { public ProcessingItem connectInputShuffleStream(Stream inputStream); /** - * Connects this processing item taking the event key into account. Events - * will be routed to the processing item according to the modulus of its key - * and the paralellism level. Ex.: key = 5 and paralellism = 2, 5 mod 2 = 1. + * Connects this processing item taking the event key into account. Events will be routed to the processing item + * according to the modulus of its key and the paralellism level. Ex.: key = 5 and paralellism = 2, 5 mod 2 = 1. * Processing item responsible for 1 will receive this event. * * @param inputStream @@ -51,8 +50,8 @@ public interface ProcessingItem extends IProcessingItem { public ProcessingItem connectInputKeyStream(Stream inputStream); /** - * Connects this processing item to the stream in a broadcast fashion. All - * processing items of this type will receive copy of the original event. + * Connects this processing item to the stream in a broadcast fashion. All processing items of this type will receive + * copy of the original event. * * @param inputStream * Stream to connect this processing item. http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/Topology.java ---------------------------------------------------------------------- diff --git a/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/Topology.java b/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/Topology.java index dce4974..4293571 100755 --- a/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/Topology.java +++ b/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/Topology.java @@ -54,8 +54,7 @@ public interface Topology { * Processing Items */ /** - * Add a ProcessingItem to this topology with default parallelism level (i.e. - * 1) + * Add a ProcessingItem to this topology with default parallelism level (i.e. 1) * * @param procItem * the ProcessingItem to be added http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/TopologyBuilder.java ---------------------------------------------------------------------- diff --git a/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/TopologyBuilder.java b/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/TopologyBuilder.java index 90b50ea..606c9b3 100755 --- a/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/TopologyBuilder.java +++ b/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/TopologyBuilder.java @@ -71,13 +71,11 @@ public class TopologyBuilder { } /** - * Initiates topology with a specific name and a delay between consecutive - * instances. + * Initiates topology with a specific name and a delay between consecutive instances. * * @param topologyName * @param delay - * delay between injections of two instances from source (in - * milliseconds) + * delay between injections of two instances from source (in milliseconds) */ public void initTopology(String topologyName, int delay) { if (this.topology != null) { @@ -176,8 +174,7 @@ public class TopologyBuilder { } /** - * Creates a processing item with a specific processor and paralellism level - * of 1. + * Creates a processing item with a specific processor and paralellism level of 1. * * @param processor * @return ProcessingItem http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-api/src/main/java/com/yahoo/labs/samoa/utils/StreamDestination.java ---------------------------------------------------------------------- diff --git a/samoa-api/src/main/java/com/yahoo/labs/samoa/utils/StreamDestination.java b/samoa-api/src/main/java/com/yahoo/labs/samoa/utils/StreamDestination.java index a759b26..affbd70 100644 --- a/samoa-api/src/main/java/com/yahoo/labs/samoa/utils/StreamDestination.java +++ b/samoa-api/src/main/java/com/yahoo/labs/samoa/utils/StreamDestination.java @@ -23,11 +23,9 @@ package com.yahoo.labs.samoa.utils; import com.yahoo.labs.samoa.topology.IProcessingItem; /** - * Represents one destination for streams. It has the info of: the - * ProcessingItem, parallelismHint, and partitioning scheme. Usage: - When - * ProcessingItem connects to a stream, it will pass a StreamDestination to the - * stream. - Stream manages a set of StreamDestination. - Used in - * single-threaded and multi-threaded local mode. + * Represents one destination for streams. It has the info of: the ProcessingItem, parallelismHint, and partitioning + * scheme. Usage: - When ProcessingItem connects to a stream, it will pass a StreamDestination to the stream. - Stream + * manages a set of StreamDestination. - Used in single-threaded and multi-threaded local mode. * * @author Anh Thu Vu * http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-instances/src/main/java/com/yahoo/labs/samoa/instances/InstancesHeader.java ---------------------------------------------------------------------- diff --git a/samoa-instances/src/main/java/com/yahoo/labs/samoa/instances/InstancesHeader.java b/samoa-instances/src/main/java/com/yahoo/labs/samoa/instances/InstancesHeader.java index 095e8d7..8b33665 100644 --- a/samoa-instances/src/main/java/com/yahoo/labs/samoa/instances/InstancesHeader.java +++ b/samoa-instances/src/main/java/com/yahoo/labs/samoa/instances/InstancesHeader.java @@ -21,8 +21,7 @@ package com.yahoo.labs.samoa.instances; */ /** - * Class for storing the header or context of a data stream. It allows to know - * the number of attributes and classes. + * Class for storing the header or context of a data stream. It allows to know the number of attributes and classes. * * @author Richard Kirkby ([email protected]) * @version $Revision: 7 $ http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-instances/src/main/java/com/yahoo/labs/samoa/instances/SparseInstanceData.java ---------------------------------------------------------------------- diff --git a/samoa-instances/src/main/java/com/yahoo/labs/samoa/instances/SparseInstanceData.java b/samoa-instances/src/main/java/com/yahoo/labs/samoa/instances/SparseInstanceData.java index 1db95d0..102ca38 100644 --- a/samoa-instances/src/main/java/com/yahoo/labs/samoa/instances/SparseInstanceData.java +++ b/samoa-instances/src/main/java/com/yahoo/labs/samoa/instances/SparseInstanceData.java @@ -139,8 +139,7 @@ public class SparseInstanceData implements InstanceData { /** * Locates the greatest index that is not greater than the given index. * - * @return the internal index of the attribute index. Returns -1 if no index - * with this property could be found + * @return the internal index of the attribute index. Returns -1 if no index with this property could be found */ public int locateIndex(int index) { http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-s4/src/main/java/com/yahoo/labs/samoa/topology/impl/S4ProcessingItem.java ---------------------------------------------------------------------- diff --git a/samoa-s4/src/main/java/com/yahoo/labs/samoa/topology/impl/S4ProcessingItem.java b/samoa-s4/src/main/java/com/yahoo/labs/samoa/topology/impl/S4ProcessingItem.java index da5644d..aff252e 100644 --- a/samoa-s4/src/main/java/com/yahoo/labs/samoa/topology/impl/S4ProcessingItem.java +++ b/samoa-s4/src/main/java/com/yahoo/labs/samoa/topology/impl/S4ProcessingItem.java @@ -35,8 +35,7 @@ import com.yahoo.labs.samoa.topology.ProcessingItem; import com.yahoo.labs.samoa.topology.Stream; /** - * S4 Platform platform specific processing item, inherits from S4 - * ProcessinElemnt. + * S4 Platform platform specific processing item, inherits from S4 ProcessinElemnt. * * @author severien * http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-s4/src/main/java/com/yahoo/labs/samoa/topology/impl/SamoaSerializer.java ---------------------------------------------------------------------- diff --git a/samoa-s4/src/main/java/com/yahoo/labs/samoa/topology/impl/SamoaSerializer.java b/samoa-s4/src/main/java/com/yahoo/labs/samoa/topology/impl/SamoaSerializer.java index 61648e6..216124d 100644 --- a/samoa-s4/src/main/java/com/yahoo/labs/samoa/topology/impl/SamoaSerializer.java +++ b/samoa-s4/src/main/java/com/yahoo/labs/samoa/topology/impl/SamoaSerializer.java @@ -47,9 +47,8 @@ public class SamoaSerializer implements SerializerDeserializer { /** * * @param classLoader - * classloader able to handle classes to serialize/deserialize. For - * instance, application-level events can only be handled by the - * application classloader. + * classloader able to handle classes to serialize/deserialize. For instance, application-level events can + * only be handled by the application classloader. */ @Inject public SamoaSerializer(@Assisted final ClassLoader classLoader) { http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-samza/src/main/java/com/yahoo/labs/samoa/topology/impl/SamoaSystemFactory.java ---------------------------------------------------------------------- diff --git a/samoa-samza/src/main/java/com/yahoo/labs/samoa/topology/impl/SamoaSystemFactory.java b/samoa-samza/src/main/java/com/yahoo/labs/samoa/topology/impl/SamoaSystemFactory.java index 1a4b57f..639a011 100644 --- a/samoa-samza/src/main/java/com/yahoo/labs/samoa/topology/impl/SamoaSystemFactory.java +++ b/samoa-samza/src/main/java/com/yahoo/labs/samoa/topology/impl/SamoaSystemFactory.java @@ -32,9 +32,8 @@ import org.apache.samza.util.SinglePartitionWithoutOffsetsSystemAdmin; import com.yahoo.labs.samoa.topology.impl.SamzaEntranceProcessingItem.SamoaSystemConsumer; /** - * Implementation of Samza's SystemFactory Samza will use this factory to get - * our custom consumer which gets the events from SAMOA EntranceProcessor and - * feed them to EntranceProcessingItem task + * Implementation of Samza's SystemFactory Samza will use this factory to get our custom consumer which gets the events + * from SAMOA EntranceProcessor and feed them to EntranceProcessingItem task * * @author Anh Thu Vu */ http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-samza/src/main/java/com/yahoo/labs/samoa/topology/impl/SamzaEngine.java ---------------------------------------------------------------------- diff --git a/samoa-samza/src/main/java/com/yahoo/labs/samoa/topology/impl/SamzaEngine.java b/samoa-samza/src/main/java/com/yahoo/labs/samoa/topology/impl/SamzaEngine.java index e3141f8..745c5b4 100644 --- a/samoa-samza/src/main/java/com/yahoo/labs/samoa/topology/impl/SamzaEngine.java +++ b/samoa-samza/src/main/java/com/yahoo/labs/samoa/topology/impl/SamzaEngine.java @@ -35,8 +35,7 @@ import com.yahoo.labs.samoa.utils.SamzaConfigFactory; import com.yahoo.labs.samoa.utils.SystemsUtils; /** - * This class will submit a list of Samza jobs with the Configs generated from - * the input topology + * This class will submit a list of Samza jobs with the Configs generated from the input topology * * @author Anh Thu Vu * http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-samza/src/main/java/com/yahoo/labs/samoa/topology/impl/SamzaEntranceProcessingItem.java ---------------------------------------------------------------------- diff --git a/samoa-samza/src/main/java/com/yahoo/labs/samoa/topology/impl/SamzaEntranceProcessingItem.java b/samoa-samza/src/main/java/com/yahoo/labs/samoa/topology/impl/SamzaEntranceProcessingItem.java index 6eea7cb..16be4fd 100644 --- a/samoa-samza/src/main/java/com/yahoo/labs/samoa/topology/impl/SamzaEntranceProcessingItem.java +++ b/samoa-samza/src/main/java/com/yahoo/labs/samoa/topology/impl/SamzaEntranceProcessingItem.java @@ -44,8 +44,7 @@ import com.yahoo.labs.samoa.utils.SamzaConfigFactory; import com.yahoo.labs.samoa.utils.SystemsUtils; /** - * EntranceProcessingItem for Samza which is also a Samza task (StreamTask & - * InitableTask) + * EntranceProcessingItem for Samza which is also a Samza task (StreamTask & InitableTask) * * @author Anh Thu Vu * http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-samza/src/main/java/com/yahoo/labs/samoa/topology/impl/SamzaProcessingItem.java ---------------------------------------------------------------------- diff --git a/samoa-samza/src/main/java/com/yahoo/labs/samoa/topology/impl/SamzaProcessingItem.java b/samoa-samza/src/main/java/com/yahoo/labs/samoa/topology/impl/SamzaProcessingItem.java index 7c97e65..4aa2924 100644 --- a/samoa-samza/src/main/java/com/yahoo/labs/samoa/topology/impl/SamzaProcessingItem.java +++ b/samoa-samza/src/main/java/com/yahoo/labs/samoa/topology/impl/SamzaProcessingItem.java @@ -46,8 +46,7 @@ import org.apache.samza.task.TaskContext; import org.apache.samza.task.TaskCoordinator; /** - * ProcessingItem for Samza which is also a Samza task (StreamTask and - * InitableTask) + * ProcessingItem for Samza which is also a Samza task (StreamTask and InitableTask) * * @author Anh Thu Vu */ http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-samza/src/main/java/com/yahoo/labs/samoa/topology/impl/SamzaStream.java ---------------------------------------------------------------------- diff --git a/samoa-samza/src/main/java/com/yahoo/labs/samoa/topology/impl/SamzaStream.java b/samoa-samza/src/main/java/com/yahoo/labs/samoa/topology/impl/SamzaStream.java index a855e46..5214537 100644 --- a/samoa-samza/src/main/java/com/yahoo/labs/samoa/topology/impl/SamzaStream.java +++ b/samoa-samza/src/main/java/com/yahoo/labs/samoa/topology/impl/SamzaStream.java @@ -137,9 +137,8 @@ public class SamzaStream extends AbstractStream implements Serializable { } /** - * SamzaSystemStream wrap around a Samza's SystemStream It contains the info - * to create a Samza stream during the constructing process of the topology - * and will create the actual Samza stream when the topology is submitted + * SamzaSystemStream wrap around a Samza's SystemStream It contains the info to create a Samza stream during the + * constructing process of the topology and will create the actual Samza stream when the topology is submitted * (invoking initSystemStream()) * * @author Anh Thu Vu http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-samza/src/main/java/com/yahoo/labs/samoa/utils/SamzaConfigFactory.java ---------------------------------------------------------------------- diff --git a/samoa-samza/src/main/java/com/yahoo/labs/samoa/utils/SamzaConfigFactory.java b/samoa-samza/src/main/java/com/yahoo/labs/samoa/utils/SamzaConfigFactory.java index 03f35f1..c5b532b 100644 --- a/samoa-samza/src/main/java/com/yahoo/labs/samoa/utils/SamzaConfigFactory.java +++ b/samoa-samza/src/main/java/com/yahoo/labs/samoa/utils/SamzaConfigFactory.java @@ -51,8 +51,8 @@ import com.yahoo.labs.samoa.topology.impl.SamzaTopology; import com.yahoo.labs.samoa.topology.impl.SamzaStream.SamzaSystemStream; /** - * Generate Configs that will be used to submit Samza jobs from the input - * topology (one config per PI/EntrancePI in the topology) + * Generate Configs that will be used to submit Samza jobs from the input topology (one config per PI/EntrancePI in the + * topology) * * @author Anh Thu Vu * @@ -370,8 +370,8 @@ public class SamzaConfigFactory { } /* - * - */ + * + */ public void setSystemNameForStreams(Set<Stream> streams) { Map<Integer, String> batchSizeMap = new HashMap<Integer, String>(); batchSizeMap.put(1, "kafka0"); // default system with sync producer http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-samza/src/main/java/com/yahoo/labs/samoa/utils/SamzaKryoSerdeFactory.java ---------------------------------------------------------------------- diff --git a/samoa-samza/src/main/java/com/yahoo/labs/samoa/utils/SamzaKryoSerdeFactory.java b/samoa-samza/src/main/java/com/yahoo/labs/samoa/utils/SamzaKryoSerdeFactory.java index cd4b846..34d1656 100644 --- a/samoa-samza/src/main/java/com/yahoo/labs/samoa/utils/SamzaKryoSerdeFactory.java +++ b/samoa-samza/src/main/java/com/yahoo/labs/samoa/utils/SamzaKryoSerdeFactory.java @@ -34,8 +34,7 @@ import com.esotericsoftware.kryo.io.Input; import com.esotericsoftware.kryo.io.Output; /** - * Implementation of Samza's SerdeFactory that uses Kryo to - * serialize/deserialize objects + * Implementation of Samza's SerdeFactory that uses Kryo to serialize/deserialize objects * * @author Anh Thu Vu * @param <T> http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-storm/src/main/java/com/yahoo/labs/samoa/topology/impl/StormSamoaUtils.java ---------------------------------------------------------------------- diff --git a/samoa-storm/src/main/java/com/yahoo/labs/samoa/topology/impl/StormSamoaUtils.java b/samoa-storm/src/main/java/com/yahoo/labs/samoa/topology/impl/StormSamoaUtils.java index d978a8f..a90bfe2 100644 --- a/samoa-storm/src/main/java/com/yahoo/labs/samoa/topology/impl/StormSamoaUtils.java +++ b/samoa-storm/src/main/java/com/yahoo/labs/samoa/topology/impl/StormSamoaUtils.java @@ -34,8 +34,7 @@ import org.slf4j.LoggerFactory; import com.yahoo.labs.samoa.tasks.Task; /** - * Utility class for samoa-storm project. It is used by StormDoTask to process - * its arguments. + * Utility class for samoa-storm project. It is used by StormDoTask to process its arguments. * * @author Arinto Murdopo * http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-storm/src/main/java/com/yahoo/labs/samoa/topology/impl/StormTopologySubmitter.java ---------------------------------------------------------------------- diff --git a/samoa-storm/src/main/java/com/yahoo/labs/samoa/topology/impl/StormTopologySubmitter.java b/samoa-storm/src/main/java/com/yahoo/labs/samoa/topology/impl/StormTopologySubmitter.java index a4f1f51..6d1ae7a 100644 --- a/samoa-storm/src/main/java/com/yahoo/labs/samoa/topology/impl/StormTopologySubmitter.java +++ b/samoa-storm/src/main/java/com/yahoo/labs/samoa/topology/impl/StormTopologySubmitter.java @@ -41,9 +41,8 @@ import backtype.storm.utils.NimbusClient; import backtype.storm.utils.Utils; /** - * Helper class to submit SAMOA task into Storm without the need of submitting - * the jar file. The jar file must be submitted first using StormJarSubmitter - * class. + * Helper class to submit SAMOA task into Storm without the need of submitting the jar file. The jar file must be + * submitted first using StormJarSubmitter class. * * @author Arinto Murdopo * http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-test/src/test/java/com/yahoo/labs/samoa/TestParams.java ---------------------------------------------------------------------- diff --git a/samoa-test/src/test/java/com/yahoo/labs/samoa/TestParams.java b/samoa-test/src/test/java/com/yahoo/labs/samoa/TestParams.java index 26b6b74..1cc0ba1 100644 --- a/samoa-test/src/test/java/com/yahoo/labs/samoa/TestParams.java +++ b/samoa-test/src/test/java/com/yahoo/labs/samoa/TestParams.java @@ -10,8 +10,7 @@ public class TestParams { * <li>the sampling size (-f) * <li>the delay in ms between input instances (-w) , default is zero * </ul> - * as well as the maximum number of instances for testing/training (-i) and - * the sampling size (-f) + * as well as the maximum number of instances for testing/training (-i) and the sampling size (-f) */ public static class Templates { http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-test/src/test/java/com/yahoo/labs/samoa/TestUtils.java ---------------------------------------------------------------------- diff --git a/samoa-test/src/test/java/com/yahoo/labs/samoa/TestUtils.java b/samoa-test/src/test/java/com/yahoo/labs/samoa/TestUtils.java index c36706c..ae226c7 100644 --- a/samoa-test/src/test/java/com/yahoo/labs/samoa/TestUtils.java +++ b/samoa-test/src/test/java/com/yahoo/labs/samoa/TestUtils.java @@ -1,22 +1,22 @@ package com.yahoo.labs.samoa;/* - * #%L - * SAMOA - * %% - * Copyright (C) 2013 - 2014 Yahoo! Inc. - * %% - * Licensed 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. - * #L% - */ +* #%L +* SAMOA +* %% +* Copyright (C) 2013 - 2014 Yahoo! Inc. +* %% +* Licensed 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. +* #L% +*/ import org.apache.commons.csv.CSVFormat; import org.apache.commons.csv.CSVRecord; http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-threads/src/main/java/com/yahoo/labs/samoa/topology/impl/ThreadsEventRunnable.java ---------------------------------------------------------------------- diff --git a/samoa-threads/src/main/java/com/yahoo/labs/samoa/topology/impl/ThreadsEventRunnable.java b/samoa-threads/src/main/java/com/yahoo/labs/samoa/topology/impl/ThreadsEventRunnable.java index 4dd33db..5c4c9e9 100644 --- a/samoa-threads/src/main/java/com/yahoo/labs/samoa/topology/impl/ThreadsEventRunnable.java +++ b/samoa-threads/src/main/java/com/yahoo/labs/samoa/topology/impl/ThreadsEventRunnable.java @@ -23,12 +23,10 @@ package com.yahoo.labs.samoa.topology.impl; import com.yahoo.labs.samoa.core.ContentEvent; /** - * Runnable class where each object corresponds to a ContentEvent and an - * assigned PI. When a PI receives a ContentEvent, it will create a - * ThreadsEventRunnable with the received ContentEvent and an assigned workerPI. - * This runnable is then submitted to a thread queue waiting to be executed. The - * worker PI will process the received event when the runnable object is - * executed/run. + * Runnable class where each object corresponds to a ContentEvent and an assigned PI. When a PI receives a ContentEvent, + * it will create a ThreadsEventRunnable with the received ContentEvent and an assigned workerPI. This runnable is then + * submitted to a thread queue waiting to be executed. The worker PI will process the received event when the runnable + * object is executed/run. * * @author Anh Thu Vu * http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/5543ecd3/samoa-threads/src/main/java/com/yahoo/labs/samoa/topology/impl/ThreadsProcessingItemInstance.java ---------------------------------------------------------------------- diff --git a/samoa-threads/src/main/java/com/yahoo/labs/samoa/topology/impl/ThreadsProcessingItemInstance.java b/samoa-threads/src/main/java/com/yahoo/labs/samoa/topology/impl/ThreadsProcessingItemInstance.java index 73052ea..930973b 100644 --- a/samoa-threads/src/main/java/com/yahoo/labs/samoa/topology/impl/ThreadsProcessingItemInstance.java +++ b/samoa-threads/src/main/java/com/yahoo/labs/samoa/topology/impl/ThreadsProcessingItemInstance.java @@ -24,9 +24,8 @@ import com.yahoo.labs.samoa.core.ContentEvent; import com.yahoo.labs.samoa.core.Processor; /** - * Lightweight replicas of ThreadProcessingItem. ThreadsProcessingItem manages a - * list of these objects and assigns each incoming message to be processed by - * one of them. + * Lightweight replicas of ThreadProcessingItem. ThreadsProcessingItem manages a list of these objects and assigns each + * incoming message to be processed by one of them. * * @author Anh Thu Vu *
