kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject [kafka] branch 2.0 updated: MINOR: Fix Streams scala format violations (#5472)
Date Tue, 07 Aug 2018 19:51:26 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/2.0 by this push:
     new cdb533a  MINOR: Fix Streams scala format violations (#5472)
cdb533a is described below

commit cdb533a6f0febe630d11e95a281334bf4a805012
Author: Manikumar Reddy O <manikumar.reddy@gmail.com>
AuthorDate: Wed Aug 8 01:20:42 2018 +0530

    MINOR: Fix Streams scala format violations (#5472)
    
    Reviewers: Guozhang Wang <wangguoz@gmail.com>
---
 .../apache/kafka/streams/scala/TopologyTest.scala  | 30 ++++++++++++----------
 1 file changed, 17 insertions(+), 13 deletions(-)

diff --git a/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/TopologyTest.scala
b/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/TopologyTest.scala
index 15b3c18..3fc890c 100644
--- a/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/TopologyTest.scala
+++ b/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/TopologyTest.scala
@@ -205,12 +205,15 @@ class TopologyTest extends JUnitSuite {
 
       val _: KTable[String, Long] =
         textLines
-          .transform(() => new Transformer[String, String, KeyValue[String, String]] {
-              override def init(context: ProcessorContext): Unit = Unit
-              override def transform(key: String, value: String): KeyValue[String, String]
=
-                new KeyValue(key, value.toLowerCase)
-              override def close(): Unit = Unit
-          })
+          .transform(
+            () =>
+              new Transformer[String, String, KeyValue[String, String]] {
+                override def init(context: ProcessorContext): Unit = Unit
+                override def transform(key: String, value: String): KeyValue[String, String]
=
+                  new KeyValue(key, value.toLowerCase)
+                override def close(): Unit = Unit
+            }
+          )
           .groupBy((k, v) => v)
           .count()
 
@@ -225,15 +228,16 @@ class TopologyTest extends JUnitSuite {
 
       val lowered: KStreamJ[String, String] = textLines
         .transform(new TransformerSupplier[String, String, KeyValue[String, String]] {
-        override def get(): Transformer[String, String, KeyValue[String, String]] = new Transformer[String,
String, KeyValue[String, String]] {
-          override def init(context: ProcessorContext): Unit = Unit
+          override def get(): Transformer[String, String, KeyValue[String, String]] =
+            new Transformer[String, String, KeyValue[String, String]] {
+              override def init(context: ProcessorContext): Unit = Unit
 
-          override def transform(key: String, value: String): KeyValue[String, String] =
-            new KeyValue(key, value.toLowerCase)
+              override def transform(key: String, value: String): KeyValue[String, String]
=
+                new KeyValue(key, value.toLowerCase)
 
-          override def close(): Unit = Unit
-        }
-      })
+              override def close(): Unit = Unit
+            }
+        })
 
       val grouped: KGroupedStreamJ[String, String] = lowered.groupBy {
         new KeyValueMapper[String, String, String] {


Mime
View raw message