You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@metron.apache.org by jo...@apache.org on 2017/12/05 15:55:25 UTC
metron git commit: METRON-1308 Fix Metron Documentation (JonZeolla)
closes apache/metron#836
Repository: metron
Updated Branches:
refs/heads/master e9729269d -> 252142259
METRON-1308 Fix Metron Documentation (JonZeolla) closes apache/metron#836
Project: http://git-wip-us.apache.org/repos/asf/metron/repo
Commit: http://git-wip-us.apache.org/repos/asf/metron/commit/25214225
Tree: http://git-wip-us.apache.org/repos/asf/metron/tree/25214225
Diff: http://git-wip-us.apache.org/repos/asf/metron/diff/25214225
Branch: refs/heads/master
Commit: 25214225923e16b21d9fdf4ae7f522738aee2649
Parents: e972926
Author: JonZeolla <ze...@gmail.com>
Authored: Tue Dec 5 10:18:16 2017 -0500
Committer: JonZeolla <jo...@apache.org>
Committed: Tue Dec 5 10:18:16 2017 -0500
----------------------------------------------------------------------
metron-stellar/stellar-common/README.md | 42 ++++++++++----------
.../dsl/functions/DataStructureFunctions.java | 2 +-
.../dsl/functions/FunctionalFunctions.java | 4 +-
.../stellar/dsl/functions/SetFunctions.java | 4 +-
4 files changed, 26 insertions(+), 26 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/metron/blob/25214225/metron-stellar/stellar-common/README.md
----------------------------------------------------------------------
diff --git a/metron-stellar/stellar-common/README.md b/metron-stellar/stellar-common/README.md
index fd8b5d8..e5b7dac 100644
--- a/metron-stellar/stellar-common/README.md
+++ b/metron-stellar/stellar-common/README.md
@@ -153,9 +153,9 @@ Where:
| [ `FILL_RIGHT`](#fill_right) |
| [ `FILTER`](#filter) |
| [ `FLOOR`](#floor) |
+| [ `FORMAT`](#format) |
| [ `FUZZY_LANGS`](#fuzzy_langs) |
| [ `FUZZY_SCORE`](#fuzzy_score) |
-| [ `FORMAT`](#format) |
| [ `GEO_GET`](#geo_get) |
| [ `GEOHASH_CENTROID`](#geohash_centroid) |
| [ `GEOHASH_DIST`](#geohash_dist) |
@@ -168,10 +168,10 @@ Where:
| [ `GET_LAST`](#get_last) |
| [ `GET_SUPPORTED_ENCODINGS`](#get_supported_encodings) |
| [ `HASH`](#hash) |
+| [ `HLLP_ADD`](../../metron-analytics/metron-statistics#hllp_add) |
| [ `HLLP_CARDINALITY`](../../metron-analytics/metron-statistics#hllp_cardinality) |
| [ `HLLP_INIT`](../../metron-analytics/metron-statistics#hllp_init) |
| [ `HLLP_MERGE`](../../metron-analytics/metron-statistics#hllp_merge) |
-| [ `HLLP_OFFER`](../../metron-analytics/metron-statistics#hllp_offer) |
| [ `IN_SUBNET`](#in_subnet) |
| [ `IS_DATE`](#is_date) |
| [ `IS_ENCODING`](#is_encoding) |
@@ -180,7 +180,7 @@ Where:
| [ `IS_EMPTY`](#is_empty) |
| [ `IS_INTEGER`](#is_integer) |
| [ `IS_IP`](#is_ip) |
-| [ `IS_NAN`](#is_nan) |
+| [ `IS_NAN`](#is_nan) |
| [ `IS_URL`](#is_url) |
| [ `JOIN`](#join) |
| [ `KAFKA_GET`](#kafka_get) |
@@ -196,7 +196,7 @@ Where:
| [ `MAAS_MODEL_APPLY`](#maas_model_apply) |
| [ `MAP`](#map) |
| [ `MAP_EXISTS`](#map_exists) |
-| [ `MAP_GET`](#MAP_GET) |
+| [ `MAP_GET`](#map_get) |
| [ `MAX`](#MAX) |
| [ `MIN`](#MIN) |
| [ `MONTH`](#month) |
@@ -218,8 +218,8 @@ Where:
| [ `SET_INIT`](#set_init) |
| [ `SET_MERGE`](#set_merge) |
| [ `SET_REMOVE`](#set_remove) |
-| [ `SPLIT`](#split) |
| [ `SIN`](#sin) |
+| [ `SPLIT`](#split) |
| [ `SQRT`](#sqrt) |
| [ `STARTS_WITH`](#starts_with) |
| [ `STATS_ADD`](../../metron-analytics/metron-statistics#stats_add) |
@@ -246,12 +246,12 @@ Where:
| [ `SYSTEM_ENV_GET`](#system_env_get) |
| [ `SYSTEM_PROPERTY_GET`](#system_property_get) |
| [ `TAN`](#tan) |
-| [ `TLSH_DIST`](#tlsh_dist) |
+| [ `TLSH_DIST`](#tlsh_dist) |
| [ `TO_DOUBLE`](#to_double) |
| [ `TO_EPOCH_TIMESTAMP`](#to_epoch_timestamp) |
| [ `TO_FLOAT`](#to_float) |
| [ `TO_INTEGER`](#to_integer) |
-| [ `TO_JSON_LIST`](#to_json_List) |
+| [ `TO_JSON_LIST`](#to_json_list) |
| [ `TO_JSON_MAP`](#to_json_map) |
| [ `TO_JSON_OBJECT`](#to_json_object) |
| [ `TO_LONG`](#to_long) |
@@ -267,7 +267,7 @@ Where:
| [ `WEEK_OF_YEAR`](#week_of_year) |
| [ `YEAR`](#year) |
| [ `ZIP`](#zip) |
-| [ `ZIP_JAGGED`](#zip_jagged) |
+| [ `ZIP_LONGEST`](#zip_longest) |
### `APPEND_IF_MISSING`
* Description: Appends the suffix to the end of the string if the string does not already end with any of the suffixes.
@@ -281,7 +281,7 @@ Where:
* Description: Adds an element to the bloom filter passed in
* Input:
* bloom - The bloom filter
- * value* - The values to add
+ * value(s) - The value(s) to add
* Returns: Bloom Filter
### `BLOOM_EXISTS`
@@ -763,7 +763,7 @@ Where:
### `MULTISET_INIT`
* Description: Creates an empty multiset, which is a map associating objects to their instance counts.
* Input:
- * input? - An initialization of the multiset
+ * input (optional) - An initialization of the multiset
* Returns: A multiset
### `MULTISET_MERGE`
@@ -864,7 +864,7 @@ Where:
### `SET_INIT`
* Description: Creates an new set
* Input:
- * input? - An initialization of the set
+ * input (optional) - An initialization of the set
* Returns: A Set
### `SET_MERGE`
@@ -886,6 +886,13 @@ Where:
* number - The number to take the sine of
* Returns: The sine of the number passed in.
+### `SPLIT`
+ * Description: Splits the string by the delimiter.
+ * Input:
+ * input - String to split
+ * delim - String delimiter
+ * Returns: List of strings
+
### `SQRT`
* Description: Returns the square root of a number.
* Input:
@@ -898,13 +905,6 @@ Where:
* input - String
* Returns: The base-2 shannon entropy of the string (https://en.wikipedia.org/wiki/Entropy_(information_theory)#Definition). The unit of this is bits.
-### `SPLIT`
- * Description: Splits the string by the delimiter.
- * Input:
- * input - String to split
- * delim - String delimiter
- * Returns: List of strings
-
### `STARTS_WITH`
* Description: Determines whether a string starts with a prefix
* Input:
@@ -960,7 +960,7 @@ Where:
* timezone - Optional timezone in String format
* Returns: Epoch timestamp
-### `TO_FOAT`
+### `TO_FLOAT`
* Description: Transforms the first argument to a float
* Input:
* input - Object of string or numeric type
@@ -1070,7 +1070,7 @@ Where:
See [python](https://docs.python.org/3/library/functions.html#zip)
and [wikipedia](https://en.wikipedia.org/wiki/Convolution_(computer_science)) for more context.
* Input:
- * list* - Lists to zip.
+ * list(s) - List(s) to zip.
* Returns: The zip of the lists. The returned list is the min size of all the lists. e.g. `ZIP( [ 1, 2 ], [ 3, 4, 5] ) == [ [1, 3], [2, 4] ]`
### `ZIP_LONGEST`
@@ -1078,7 +1078,7 @@ Where:
See [python](https://docs.python.org/3/library/itertools.html#itertools.zip_longest)
and [wikipedia](https://en.wikipedia.org/wiki/Convolution_(computer_science)) for more context.
* Input:
- * list* - Lists to zip.
+ * list(s) - List(s) to zip.
* Returns: The zip of the lists. The returned list is the max size of all the lists. Empty elements are null e.g. `ZIP_LONGEST( [ 1, 2 ], [ 3, 4, 5] ) == [ [1, 3], [2, 4], [null, 5] ]`
The following is an example query (i.e. a function which returns a
http://git-wip-us.apache.org/repos/asf/metron/blob/25214225/metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/dsl/functions/DataStructureFunctions.java
----------------------------------------------------------------------
diff --git a/metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/dsl/functions/DataStructureFunctions.java b/metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/dsl/functions/DataStructureFunctions.java
index a92406b..eb1db48 100644
--- a/metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/dsl/functions/DataStructureFunctions.java
+++ b/metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/dsl/functions/DataStructureFunctions.java
@@ -35,7 +35,7 @@ public class DataStructureFunctions {
, namespace="BLOOM"
, description="Adds an element to the bloom filter passed in"
, params = { "bloom - The bloom filter"
- , "value* - The values to add"
+ , "value(s) - The value(s) to add"
}
, returns = "Bloom Filter"
)
http://git-wip-us.apache.org/repos/asf/metron/blob/25214225/metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/dsl/functions/FunctionalFunctions.java
----------------------------------------------------------------------
diff --git a/metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/dsl/functions/FunctionalFunctions.java b/metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/dsl/functions/FunctionalFunctions.java
index 8eb2498..d45ffcb 100644
--- a/metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/dsl/functions/FunctionalFunctions.java
+++ b/metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/dsl/functions/FunctionalFunctions.java
@@ -119,7 +119,7 @@ public class FunctionalFunctions {
"See [python](https://docs.python.org/3/library/itertools.html#itertools.zip_longest) " +
"and [wikipedia](https://en.wikipedia.org/wiki/Convolution_(computer_science)) for more context."
, params = {
- "list* - Lists to zip."
+ "list(s) - List(s) to zip."
}
, returns = "The zip of the lists. The returned list is the max size of all the lists. " +
"Empty elements are null " +
@@ -140,7 +140,7 @@ public class FunctionalFunctions {
, description="Zips lists into a single list where the ith element is an list containing the ith items from the constituent lists. " +
"See [python](https://docs.python.org/3/library/functions.html#zip) and [wikipedia](https://en.wikipedia.org/wiki/Convolution_(computer_science)) for more context."
, params = {
- "list* - Lists to zip."
+ "list(s) - List(s) to zip."
}
,returns = "The zip of the lists. The returned list is the min size of all the lists. " +
"e.g. ZIP( [ 1, 2 ], [ 3, 4, 5] ) == [ [1, 3], [2, 4] ]"
http://git-wip-us.apache.org/repos/asf/metron/blob/25214225/metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/dsl/functions/SetFunctions.java
----------------------------------------------------------------------
diff --git a/metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/dsl/functions/SetFunctions.java b/metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/dsl/functions/SetFunctions.java
index 1b4df1e..72045ca 100644
--- a/metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/dsl/functions/SetFunctions.java
+++ b/metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/dsl/functions/SetFunctions.java
@@ -27,7 +27,7 @@ public class SetFunctions {
@Stellar(name="INIT"
, namespace="SET"
, description="Creates a new set"
- , params = { "input? - An initialization of the set"}
+ , params = { "input (optional) - An initialization of the set"}
, returns = "A Set"
)
public static class SetInit extends BaseStellarFunction {
@@ -145,7 +145,7 @@ public class SetFunctions {
@Stellar(name="INIT"
, namespace="MULTISET"
, description="Creates an empty multiset, which is a map associating objects to their instance counts."
- , params = { "input? - An initialization of the multiset"}
+ , params = { "input (optional) - An initialization of the multiset"}
, returns = "A multiset"
)
public static class MultiSetInit extends BaseStellarFunction {