beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject [1/3] incubator-beam-site git commit: Rename PTransform apply to expand throughout
Date Fri, 09 Dec 2016 22:44:51 GMT
Repository: incubator-beam-site
Updated Branches:
  refs/heads/asf-site eb5397b83 -> 37adeb9ba


Rename PTransform apply to expand throughout


Project: http://git-wip-us.apache.org/repos/asf/incubator-beam-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam-site/commit/b68b6805
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam-site/tree/b68b6805
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam-site/diff/b68b6805

Branch: refs/heads/asf-site
Commit: b68b6805960b8c852a6551256827be33054598b9
Parents: eb5397b
Author: Kenneth Knowles <klk@google.com>
Authored: Fri Dec 9 14:29:44 2016 -0800
Committer: Kenneth Knowles <klk@google.com>
Committed: Fri Dec 9 14:29:44 2016 -0800

----------------------------------------------------------------------
 src/get-started/mobile-gaming-example.md | 8 ++++----
 src/get-started/wordcount-example.md     | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-beam-site/blob/b68b6805/src/get-started/mobile-gaming-example.md
----------------------------------------------------------------------
diff --git a/src/get-started/mobile-gaming-example.md b/src/get-started/mobile-gaming-example.md
index b51f81a..3aee213 100644
--- a/src/get-started/mobile-gaming-example.md
+++ b/src/get-started/mobile-gaming-example.md
@@ -77,7 +77,7 @@ public static class ExtractAndSumScore
   }
 
   @Override
-  public PCollection<KV<String, Integer>> apply(
+  public PCollection<KV<String, Integer>> expand(
       PCollection<GameActionInfo> gameInfo) {
 
     return gameInfo
@@ -320,7 +320,7 @@ static class CalculateUserScores
   }
 
   @Override
-  public PCollection<KV<String, Integer>> apply(PCollection<GameActionInfo>
input) {
+  public PCollection<KV<String, Integer>> expand(PCollection<GameActionInfo>
input) {
     return input.apply("LeaderboardUserGlobalWindow",
         Window.<GameActionInfo>into(new GlobalWindows())
             // Get periodic results every ten minutes.
@@ -374,7 +374,7 @@ static class CalculateTeamScores
   }
 
   @Override
-  public PCollection<KV<String, Integer>> apply(PCollection<GameActionInfo>
infos) {
+  public PCollection<KV<String, Integer>> expand(PCollection<GameActionInfo>
infos) {
     return infos.apply("LeaderboardTeamFixedWindows",
         Window.<GameActionInfo>into(FixedWindows.of(teamWindowDuration))
             // We will get early (speculative) results as well as cumulative
@@ -428,7 +428,7 @@ public static class CalculateSpammyUsers
   private static final double SCORE_WEIGHT = 2.5;
 
   @Override
-  public PCollection<KV<String, Integer>> apply(PCollection<KV<String,
Integer>> userScores) {
+  public PCollection<KV<String, Integer>> expand(PCollection<KV<String,
Integer>> userScores) {
 
     // Get the sum of scores for each user.
     PCollection<KV<String, Integer>> sumScores = userScores

http://git-wip-us.apache.org/repos/asf/incubator-beam-site/blob/b68b6805/src/get-started/wordcount-example.md
----------------------------------------------------------------------
diff --git a/src/get-started/wordcount-example.md b/src/get-started/wordcount-example.md
index 9b02a2b..7c98a99 100644
--- a/src/get-started/wordcount-example.md
+++ b/src/get-started/wordcount-example.md
@@ -188,7 +188,7 @@ When `CountWords` is defined, we specify its ultimate input and output;
the inpu
 public static class CountWords extends PTransform<PCollection<String>,
     PCollection<KV<String, Long>>> {
   @Override
-  public PCollection<KV<String, Long>> apply(PCollection<String> lines)
{
+  public PCollection<KV<String, Long>> expand(PCollection<String> lines)
{
 
     // Convert lines of text into individual words.
     PCollection<String> words = lines.apply(


Mime
View raw message