You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by me...@apache.org on 2018/02/14 06:38:19 UTC
[beam-site] branch mergebot updated (a574a33 -> 4cb377a)
This is an automated email from the ASF dual-hosted git repository.
mergebot-role pushed a change to branch mergebot
in repository https://gitbox.apache.org/repos/asf/beam-site.git.
from a574a33 This closes #386
add 297a3ad Prepare repository for deployment.
new 63f7ec8 Clarify runtime type checking documentation
new 4cb377a This closes #385
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
content/documentation/programming-guide/index.html | 37 +++++++++++-----------
.../documentation/sdks/python-custom-io/index.html | 32 +++++++++++--------
src/documentation/sdks/python-type-safety.md | 6 ++--
3 files changed, 40 insertions(+), 35 deletions(-)
--
To stop receiving notification emails like this one, please contact
mergebot-role@apache.org.
[beam-site] 01/02: Clarify runtime type checking documentation
Posted by me...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
mergebot-role pushed a commit to branch mergebot
in repository https://gitbox.apache.org/repos/asf/beam-site.git
commit 63f7ec889d71ab7a65a19ae6b1efd404eb30353d
Author: Charles Chen <cc...@google.com>
AuthorDate: Mon Feb 5 16:28:03 2018 -0800
Clarify runtime type checking documentation
---
src/documentation/sdks/python-type-safety.md | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/documentation/sdks/python-type-safety.md b/src/documentation/sdks/python-type-safety.md
index ae8fc09..3962fe1 100644
--- a/src/documentation/sdks/python-type-safety.md
+++ b/src/documentation/sdks/python-type-safety.md
@@ -106,16 +106,18 @@ The following are special type hints that don't correspond to a class, but rathe
In addition to using type hints for type checking at pipeline construction, you can enable runtime type checking to check that actual elements satisfy the declared type constraints during pipeline execution.
-For example, the following code would pass at both pipeline construction and runtime.
+For example, the following pipeline emits elements of the wrong type. Depending on the runner implementation, its execution may or may not fail at runtime.
```
{% github_sample /apache/beam/blob/master/sdks/python/apache_beam/examples/snippets/snippets_test.py tag:type_hints_runtime_off %}```
-However, if you enable runtime type checking, the code passes at pipeline construction and fails at runtime. To enable runtime type checking, set the pipeline option `runtime_type_check` to `True`.
+However, if you enable runtime type checking, the code is guaranteed to fail at runtime. To enable runtime type checking, set the pipeline option `runtime_type_check` to `True`.
```
{% github_sample /apache/beam/blob/master/sdks/python/apache_beam/examples/snippets/snippets_test.py tag:type_hints_runtime_on %}```
+Note that because runtime type checks are done for each `PCollection` element, enabling this feature may incur a significant performance penalty. It is therefore recommended that runtime type checks are disabled for production pipelines.
+
## Use of Type Hints in Coders
When your pipeline reads, writes, or otherwise materializes its data, the elements in your `PCollection` need to be encoded and decoded to and from byte strings. Byte strings are used for intermediate storage, for comparing keys in `GroupByKey` operations, and for reading from sources and writing to sinks.
--
To stop receiving notification emails like this one, please contact
mergebot-role@apache.org.
[beam-site] 02/02: This closes #385
Posted by me...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
mergebot-role pushed a commit to branch mergebot
in repository https://gitbox.apache.org/repos/asf/beam-site.git
commit 4cb377a9d36a9f8f3fe77c13e4b13a25dc8f2769
Merge: 297a3ad 63f7ec8
Author: Mergebot <me...@apache.org>
AuthorDate: Tue Feb 13 22:38:09 2018 -0800
This closes #385
src/documentation/sdks/python-type-safety.md | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--
To stop receiving notification emails like this one, please contact
mergebot-role@apache.org.