You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by gu...@apache.org on 2018/05/30 18:04:10 UTC

[kafka] branch trunk updated: Update doc of curried joins and aggregates (#5053)

This is an automated email from the ASF dual-hosted git repository.

guozhang pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 1e0793c  Update doc of curried joins and aggregates (#5053)
1e0793c is described below

commit 1e0793c4cea44368b0fa07e361a27ad638136448
Author: Joan Goyeau <jo...@goyeau.com>
AuthorDate: Wed May 30 19:03:58 2018 +0100

    Update doc of curried joins and aggregates (#5053)
    
    Reviewers: Guozhang Wang <wa...@gmail.com>
---
 docs/streams/developer-guide/dsl-api.html | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/docs/streams/developer-guide/dsl-api.html b/docs/streams/developer-guide/dsl-api.html
index 4c76c5e..e65f726 100644
--- a/docs/streams/developer-guide/dsl-api.html
+++ b/docs/streams/developer-guide/dsl-api.html
@@ -3248,9 +3248,7 @@ val userRegionsTable: KTable[String, String] = builder.table(userRegionsTopic)
 // All of them are taken care of by the implicit SerDes imported by DefaultSerdes
 val clicksPerRegion: KTable[String, Long] =
   userClicksStream
-    .leftJoin(userRegionsTable,
-      (clicks: Long, region: String) =>
-        (if (region == null) "UNKNOWN" else region, clicks))
+    .leftJoin(userRegionsTable)((clicks, region) => (if (region == null) "UNKNOWN" else region, clicks))
     .map((_, regionWithClicks) => regionWithClicks)
     .groupByKey
     .reduce(_ + _)
@@ -3290,7 +3288,7 @@ val clicksPerRegion: KTable[String, Long] =
  userClicksStream
 
    // Join the stream against the table.
-   .leftJoin(userRegionsTable, (clicks: UserClicks, region: String) => (if (region == null) "UNKNOWN" else region, clicks.clicks))
+   .leftJoin(userRegionsTable)((clicks, region) => (if (region == null) "UNKNOWN" else region, clicks.clicks))
 
    // Change the stream from &lt;user&gt; -&gt; &lt;region, clicks&gt; to &lt;region&gt; -&gt; &lt;clicks&gt;
    .map((_, regionWithClicks) => regionWithClicks)

-- 
To stop receiving notification emails like this one, please contact
guozhang@apache.org.