Browse Source

first commit

placidenduwayo 1 year ago
parent
commit
4573363b78

+ 6
- 6
src/main/scala/fr/natan/akkastreamfileprocessingapi/service/AkkaStreamFileProcessingImpl.scala View File

180
 
180
 
181
     val startTime: Long = System.currentTimeMillis()
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
       .map((rowMap: Map[String, String])=>{
188
       .map((rowMap: Map[String, String])=>{
188
-        val person: Person = buildPersonModel(rowMap)
189
-        person
189
+       buildPersonModel(rowMap)
190
       })
190
       })
191
       .runWith(Sink.collection)
191
       .runWith(Sink.collection)
192
       .andThen {
192
       .andThen {

Powered by TurnKey Linux.