You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by ri...@apache.org on 2023/12/21 17:48:48 UTC
(beam) branch master updated: fix contructor names (#29855)
This is an automated email from the ASF dual-hosted git repository.
riteshghorse pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 6a12e8b88df fix contructor names (#29855)
6a12e8b88df is described below
commit 6a12e8b88dfe0e0f635bd9b601bb809ef2919e99
Author: Ritesh Ghorse <ri...@gmail.com>
AuthorDate: Thu Dec 21 12:48:41 2023 -0500
fix contructor names (#29855)
---
.../core-transforms/map/co-group-by-key/description.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/learning/tour-of-beam/learning-content/core-transforms/map/co-group-by-key/description.md b/learning/tour-of-beam/learning-content/core-transforms/map/co-group-by-key/description.md
index 5400003b216..a15321cd8ea 100644
--- a/learning/tour-of-beam/learning-content/core-transforms/map/co-group-by-key/description.md
+++ b/learning/tour-of-beam/learning-content/core-transforms/map/co-group-by-key/description.md
@@ -235,7 +235,7 @@ static class ProductWeight {
private String fruit;
private Integer productWeight;
- public WordsAlphabet(String country, String fruit, Integer productWeight) {
+ public ProductWeight(String country, String fruit, Integer productWeight) {
this.country = country;
this.fruit = fruit;
this.productWeight = productWeight;
@@ -275,7 +275,7 @@ static PCollection<String> applyTransform(PCollection<String> fruits, PCollectio
String fruit = coGbkResult.getOnly(fruitsTag);
String country = coGbkResult.getOnly(countriesTag);
- out.output(new WordsAlphabet(alphabet, fruit, country).toString());
+ out.output(new ProductWeight(alphabet, fruit, country).toString());
}
}));
@@ -302,7 +302,7 @@ The union takes place through the keys:
def apply_transforms(fruits, weights):
def cogbk_result_to_product_weight(cgbk_result):
(country, values) = cgbk_result
- return WordsAlphabet(values['weights'][0], values['fruits'][0], country)
+ return ProductWeight(values['weights'][0], values['fruits'][0], country)
return ({'fruits': fruits, 'weights': weights}
| beam.CoGroupByKey()