ivanlp10n2 / object-in-logs-comparer

Serialized objects comparer (AB - B = A)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

object-in-logs-comparer

I have two files containing logs of serialized objects.

file1 is the output merge A and B.

file2 is only B output.

I need: file3 containing A.

assumption:

  • file1 and file2 are not ordered. therefore I will store it in memory until I hash it and use some sort of Id

-- Steps

- file1: Stream[String] = Consume file1 (path)
- file2: Stream[String] = Consume file2 (path)

- file1Domain : Stream[DomainObject] = file1.toDomain
- file2Domain : Stream[DomainObject] = file2.toDomain

- file3: Stream[DomainObject] = file1Domain filterWith file2Domain
- write ouput(file3, targetPath)

motivations:

I know that making it a list breaks the purpose of a streaming, I wanted to gain familiarity with fs2 AND solve the problem, this is one way I found. This is also whyh there's a sandbox folder over there too

About

Serialized objects comparer (AB - B = A)


Languages

Language:Scala 100.0%