This is an automated email from the ASF dual-hosted git repository.
boyuanz pushed a commit to branch release-2.19.0
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/release-2.19.0 by this push:
new 9055e01 [BEAM-9127] Fix output type declaration in xlang wordcount.
(#10605)
new 5882b25 Merge pull request #10665 from boyuanzz/cherry-pick
9055e01 is described below
commit 9055e01ba43058937a1d19553d914edf8ebcd2e2
Author: Robert Bradshaw <[email protected]>
AuthorDate: Thu Jan 16 15:36:32 2020 -0800
[BEAM-9127] Fix output type declaration in xlang wordcount. (#10605)
(cherry picked from commit 3edc7ac8d7b4a8ab46c8e8d170fd8e027327b914)
---
sdks/python/apache_beam/examples/wordcount_xlang.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sdks/python/apache_beam/examples/wordcount_xlang.py
b/sdks/python/apache_beam/examples/wordcount_xlang.py
index 12e2b6b..5cb3303 100644
--- a/sdks/python/apache_beam/examples/wordcount_xlang.py
+++ b/sdks/python/apache_beam/examples/wordcount_xlang.py
@@ -27,6 +27,7 @@ import re
import subprocess
import grpc
+from past.builtins import unicode
import apache_beam as beam
from apache_beam.io import ReadFromText
@@ -64,7 +65,7 @@ def run(p, input_file, output_file):
counts = (lines
| 'split' >> (beam.ParDo(WordExtractingDoFn())
- .with_output_types(bytes))
+ .with_output_types(unicode))
| 'count' >> beam.ExternalTransform(
'beam:transforms:xlang:count', None, EXPANSION_SERVICE_ADDR))