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
Mapper Service
Commits
b5ef1f0d
Commit
b5ef1f0d
authored
Feb 16, 2021
by
Jonas Waeber
Browse files
Update dependency -> Improves exception handling.
Add filter for fatal messages.
parent
25232251
Pipeline
#21832
passed with stages
in 4 minutes and 18 seconds
Changes
2
Pipelines
2
Show whitespace changes
Inline
Side-by-side
build.gradle
View file @
b5ef1f0d
...
...
@@ -33,7 +33,7 @@ ext {
dependencies
{
implementation
'ch.memobase:memobase-kafka-utils:0.2.3'
implementation
'org.memobase:memobase-service-utilities:2.0.5'
implementation
'ch.memobase:mapper-service-configuration:1.0.
7
'
implementation
'ch.memobase:mapper-service-configuration:1.0.
8
'
// Logging Framework
implementation
"org.apache.logging.log4j:log4j-api:${log4jV}"
implementation
"org.apache.logging.log4j:log4j-core:${log4jV}"
...
...
src/main/kotlin/KafkaTopology.kt
View file @
b5ef1f0d
...
...
@@ -126,7 +126,9 @@ class KafkaTopology(
val
recordStream
=
completedMappingStream
.
map
{
_
,
value
->
writeRecord
(
value
)
}
objectOutput
(
recordStream
)
return
builder
}
...
...
@@ -146,6 +148,7 @@ class KafkaTopology(
private
fun
objectOutput
(
stream
:
KStream
<
String
,
Pair
<
String
,
Report
>>)
{
stream
.
filter
{
_
,
value
->
value
.
second
.
status
!=
ReportStatus
.
fatal
}
.
mapValues
{
_
,
value
->
value
.
first
}
.
to
(
settings
.
outputTopic
)
...
...
@@ -226,7 +229,12 @@ class KafkaTopology(
result
.
first
,
Pair
(
result
.
second
,
Report
(
result
.
first
,
ReportStatus
.
warning
,
result
.
third
.
joinToString
(
"\n"
),
Service
.
step
)
Report
(
result
.
first
,
if
(
builder
.
isFatal
)
ReportStatus
.
fatal
else
ReportStatus
.
warning
,
result
.
third
.
joinToString
(
"\n"
),
Service
.
step
)
)
)
}
...
...
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