You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@edgent.apache.org by dl...@apache.org on 2016/07/13 20:53:43 UTC

[4/5] incubator-quarks git commit: tweak javadoc

tweak javadoc


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

Branch: refs/heads/master
Commit: 6b5e21d98423359d7a09e6e19626ba201806035f
Parents: 7ede18a
Author: Dale LaBossiere <dl...@us.ibm.com>
Authored: Thu Jun 30 16:43:37 2016 -0400
Committer: Dale LaBossiere <dl...@us.ibm.com>
Committed: Wed Jul 13 11:22:12 2016 -0400

----------------------------------------------------------------------
 .../analytics/math3/json/JsonAnalytics.java     | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quarks/blob/6b5e21d9/analytics/math3/src/main/java/quarks/analytics/math3/json/JsonAnalytics.java
----------------------------------------------------------------------
diff --git a/analytics/math3/src/main/java/quarks/analytics/math3/json/JsonAnalytics.java b/analytics/math3/src/main/java/quarks/analytics/math3/json/JsonAnalytics.java
index c177217..930e7d9 100644
--- a/analytics/math3/src/main/java/quarks/analytics/math3/json/JsonAnalytics.java
+++ b/analytics/math3/src/main/java/quarks/analytics/math3/json/JsonAnalytics.java
@@ -206,8 +206,7 @@ public class JsonAnalytics {
     }
     
     /**
-     * Create a Function that aggregates multiple {@code Numeric}
-     * variables contained in an JSON object.
+     * Aggregate against multiple {@code Numeric} variables contained in an JSON object.
      * <P>
      * This is a multi-variable analog of {@link JsonAnalytics#aggregate(String, String, JsonUnivariateAggregate...) aggregate()}
      * </P>
@@ -224,15 +223,15 @@ public class JsonAnalytics {
      * //   "rx" - a numeric data variable
      * TStream<JsonObject> ingestData = ...
      * 
-     * // Create the window over which to aggregate
-     * TWindow<JsonObject, JsonElement> window = 
-     *    ingestData.last(5, TimeUnit.SECONDS, jo -> jo.get("id"));
-     * 
      * // Define the tuple variables and their aggregations to compute
      * List<Pair<String, JsonUnivariateAggregate[]>> aggSpecs = new ArrayList<>();
      * aggSpecs.add(mkAggregationSpec("tx", Statistics.MIN, Statistics.MAX));
      * aggSpecs.add(mkAggregationSpec("rx", Statistics.MEAN));
      * 
+     * // Create the window over which to aggregate
+     * TWindow<JsonObject, JsonElement> window = 
+     *    ingestData.last(5, TimeUnit.SECONDS, jo -> jo.get("id"));
+     * 
      * // Create a stream with the aggregations. The result tuples have properties:
      * //   "id" - the partitionKey
      * //   "aggResults" - the aggregation results
@@ -249,11 +248,12 @@ public class JsonAnalytics {
      *    });
      * }</pre>
      * 
-     * @param window
+     * @param window the window to compute aggregations over
      * @param resultPartitionKeyProperty name of the partition key property in the result
      * @param resultProperty name of the aggregation results property in the result
      * @param aggregateSpecs see {@link #mkAggregationSpec(String, JsonUnivariateAggregate...) mkAggregationSpec()}
      * @return TStream<JsonObject> with aggregation results
+     * 
      * @see #mvAggregateList(String, String, List) mvAggregateList()
      * @see #mkAggregationSpec(String, JsonUnivariateAggregate...) mkAggregationSpec()
      * @see #getMvAggregate(JsonObject, String, String, JsonUnivariateAggregate) getMvAggregate()
@@ -279,6 +279,7 @@ public class JsonAnalytics {
      * </P>
      * <P>
      * The specification can be use with {@link #mvAggregateList(String, String, List) mkAggregateList()}
+     * 
      * @param variableName the name of a {@code Numeric} data variable in a JSON object 
      * @param aggregates the aggregates to compute for the variable
      * @return the aggregation specification
@@ -337,6 +338,7 @@ public class JsonAnalytics {
      * @param resultProperty name of the aggregation results property in the result
      * @param aggregateSpecs see {@link #mkAggregationSpec(String, JsonUnivariateAggregate...) mkAggregationSpec()}
      * @return Function that performs the aggregations.
+     * 
      * @see #mkAggregationSpec(String, JsonUnivariateAggregate...) mkAggregationSpec()
      * @see #getMvAggregate(JsonObject, String, String, JsonUnivariateAggregate) getMvAggregate()
      */
@@ -400,7 +402,8 @@ public class JsonAnalytics {
      * @param variableName the data variable of interest in the multivariable aggregates
      * @param aggregate the variable's aggregate of interest
      * @return the variable's aggregate's value as a JsonElement
-     * @throws Exception if the requested aggregate isn't present in the result
+     * @throws RuntimeException if the aggregate isn't present in the result
+     * 
      * @see #hasMvAggregate(JsonObject, String, String, JsonUnivariateAggregate) hasAggregate()
      * @see #mvAggregate(TWindow, String, String, List) mvAggregate()
      * @see #mvAggregateList(String, String, List) mvAggregateList()
@@ -420,6 +423,7 @@ public class JsonAnalytics {
      * @param variableName the data variable of interest in the multivariable aggregates
      * @param aggregate the variable's aggregate of interest
      * @return true if the specified aggregate is present in the jo, false otherwise.
+     * 
      * @see #getMvAggregate(JsonObject, String, String, JsonUnivariateAggregate) getMvAggregate()
      */
     public static boolean hasMvAggregate(JsonObject jo, String resultProperty, String variableName, JsonUnivariateAggregate aggregate) {