placidenduwayo 2 роки тому
джерело
коміт
4573363b78

+ 6
- 6
src/main/scala/fr/natan/akkastreamfileprocessingapi/service/AkkaStreamFileProcessingImpl.scala Переглянути файл

@@ -180,13 +180,13 @@ class AkkaStreamFileProcessingImpl extends AkkaStreamFileProcessing {
180 180
 
181 181
     val startTime: Long = System.currentTimeMillis()
182 182
 
183
-    val res : Future[IndexedSeq[Person]]= source
184
-      .filter((rowMap: Map[String, String])=>{
185
-        nconstList.contains(rowMap.getOrElse(key = "nconst",default = ""))
186
-      })
183
+    val res : Future[IndexedSeq[Person]]=
184
+      source
185
+        .filter((rowMaps: Map[String, String])=>{
186
+          nconstList.contains(rowMaps.get(key = "nconst"))
187
+        })
187 188
       .map((rowMap: Map[String, String])=>{
188
-        val person: Person = buildPersonModel(rowMap)
189
-        person
189
+       buildPersonModel(rowMap)
190 190
       })
191 191
       .runWith(Sink.collection)
192 192
       .andThen {

Powered by TurnKey Linux.