Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
memoriav
Memobase 2020
services
Import Process
Media Metadata Preprocessor
Commits
bb99bf90
Unverified
Commit
bb99bf90
authored
Nov 10, 2020
by
Sebastian Schüpbach
Browse files
indicate player type in report
parent
3fbdce48
Pipeline
#16876
passed with stages
in 8 minutes and 12 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/main/scala/ch/memobase/KafkaTopology.scala
View file @
bb99bf90
...
...
@@ -109,25 +109,36 @@ class KafkaTopology extends Logging {
enrichableRecord
:
KStream
[
String
,
(
String
,
List
[
ResourceWithLocator
])]
)
:
Unit
=
enrichableRecord
.
mapValues
((
k
,
_
)
=>
ReportingObject
(
k
,
ProcessingSuccess
,
"Record is enrichable"
).
toString
)
.
mapValues
((
k
,
v
)
=>
{
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
)
private
def
reportUnenrichableRecords
(
unenrichableRecord
:
KStream
[
String
,
(
String
,
List
[
ResourceWithLocator
])]
)
:
Unit
=
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
,
ReportingObject
(
k
,
ProcessingSuccess
,
"Record is not enrichable"
).
toString
)
)
ProcessingSuccess
,
s
"Record is not enrichable; $distributedOn"
).
toString
})
.
to
(
SettingsFromFile
.
reportTopic
)
private
def
reportLocatorlessRecords
(
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment