kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject [kafka] branch trunk updated: Update doc of curried joins and aggregates (#5053)
Date Wed, 30 May 2018 18:04:10 GMT
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 <joan@goyeau.com>
AuthorDate: Wed May 30 19:03:58 2018 +0100

    Update doc of curried joins and aggregates (#5053)
    
    Reviewers: Guozhang Wang <wangguoz@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.

Mime
View raw message