SAMZA-661: provide docs for default serde names
Project: http://git-wip-us.apache.org/repos/asf/samza/repo Commit: http://git-wip-us.apache.org/repos/asf/samza/commit/62254d0d Tree: http://git-wip-us.apache.org/repos/asf/samza/tree/62254d0d Diff: http://git-wip-us.apache.org/repos/asf/samza/diff/62254d0d Branch: refs/heads/samza-sql Commit: 62254d0de822df878d982c399b08f809eb42ecf8 Parents: 94f1e7e Author: Navina Ramesh <[email protected]> Authored: Thu Nov 19 11:29:30 2015 -0800 Committer: Yi Pan (Data Infrastructure) <[email protected]> Committed: Thu Nov 19 11:29:30 2015 -0800 ---------------------------------------------------------------------- .../versioned/container/serialization.md | 57 +++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/samza/blob/62254d0d/docs/learn/documentation/versioned/container/serialization.md ---------------------------------------------------------------------- diff --git a/docs/learn/documentation/versioned/container/serialization.md b/docs/learn/documentation/versioned/container/serialization.md index 1f07a7c..6bcb641 100644 --- a/docs/learn/documentation/versioned/container/serialization.md +++ b/docs/learn/documentation/versioned/container/serialization.md @@ -53,7 +53,62 @@ stores.LastPageViewPerUser.key.serde=integer stores.LastPageViewPerUser.msg.serde=json {% endhighlight %} -Each serde is defined with a factory class. Samza comes with several builtin serdes for UTF-8 strings, binary-encoded integers, JSON and more. You can also create your own serializer by implementing the [SerdeFactory](../api/javadocs/org/apache/samza/serializers/SerdeFactory.html) interface. +Each serde is defined with a factory class. Samza comes with several builtin serdes for UTF-8 strings, binary-encoded integers, JSON and more. The following is a comprehensive list of supported serdes in Samza. +<style> + table th, table td { + text-align: left; + vertical-align: top; + padding: 12px; + border-bottom: 1px solid #ccc; + border-top: 1px solid #ccc; + border-left: 0; + border-right: 0; + } + + table td.property, table td.default { + white-space: nowrap; + } + + table th { + background-color: #eee; + } +</style> +<table> + <tr> + <th class="section"> Serde Name</th> + <th> Data Handled </th> + </tr> + <tr> + <td> string </td> + <td> UTF-8 strings </td> + </tr> + <tr> + <td> integer </td> + <td> binary-encoded integers </td> + </tr> + <tr> + <td> serializable </td> + <td> Serializable Object Type </td> + </tr> + <tr> + <td> long </td> + <td> long data type </td> + </tr> + <tr> + <td> json </td> + <td> JSON formatted data </td> + </tr> + <tr> + <td> byte </td> + <td> Plain Bytes (effectively no-op) - Useful for Binary Messages </td> + </tr> + <tr> + <td> bytebuffer </td> + <td> Byte Buffer </td> + </tr> +</table> + +You can also create your own serializer by implementing the [SerdeFactory](../api/javadocs/org/apache/samza/serializers/SerdeFactory.html) interface. The name you give to a serde (such as "json" and "integer" in the example above) is only for convenience in your job configuration; you can choose whatever name you like. For each stream and each state store, you can use the serde name to declare how messages should be serialized and deserialized.
