Unverified Commit bb99bf90 authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

indicate player type in report

parent 3fbdce48
Pipeline #16876 passed with stages
in 8 minutes and 12 seconds
...@@ -109,25 +109,36 @@ class KafkaTopology extends Logging { ...@@ -109,25 +109,36 @@ class KafkaTopology extends Logging {
enrichableRecord: KStream[String, (String, List[ResourceWithLocator])] enrichableRecord: KStream[String, (String, List[ResourceWithLocator])]
): Unit = ): Unit =
enrichableRecord enrichableRecord
.mapValues((k, _) => .mapValues((k, v) => {
ReportingObject(k, ProcessingSuccess, "Record is enrichable").toString val distributedOn = v._2
) .map(x =>
s"ebucore:isDistributedOn set to `${x.player.name}` for ${x.resource}"
)
.mkString("; ")
ReportingObject(
k,
ProcessingSuccess,
s"Record is enrichable; $distributedOn"
).toString
})
.to(SettingsFromFile.reportTopic) .to(SettingsFromFile.reportTopic)
private def reportUnenrichableRecords( private def reportUnenrichableRecords(
unenrichableRecord: KStream[String, (String, List[ResourceWithLocator])] unenrichableRecord: KStream[String, (String, List[ResourceWithLocator])]
): Unit = ): Unit =
unenrichableRecord unenrichableRecord
.map((k, _) => .mapValues((k, v) => {
( val distributedOn = v._2
.map(x =>
s"ebucore:isDistributedOn set to `${x.player.name}` for ${x.resource}"
)
.mkString("; ")
ReportingObject(
k, k,
ReportingObject( ProcessingSuccess,
k, s"Record is not enrichable; $distributedOn"
ProcessingSuccess, ).toString
"Record is not enrichable" })
).toString
)
)
.to(SettingsFromFile.reportTopic) .to(SettingsFromFile.reportTopic)
private def reportLocatorlessRecords( private def reportLocatorlessRecords(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment