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
37ecf02e
Unverified
Commit
37ecf02e
authored
Nov 05, 2020
by
Sebastian Schüpbach
Browse files
catch null values
parent
a21488c2
Pipeline
#16654
passed with stages
in 6 minutes and 35 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/main/kotlin/KafkaTopology.kt
View file @
37ecf02e
...
@@ -87,9 +87,6 @@ class KafkaTopology(
...
@@ -87,9 +87,6 @@ class KafkaTopology(
val
parsedStream
=
handledStream
[
1
]
val
parsedStream
=
handledStream
[
1
]
.
mapValues
{
value
->
Pair
(
value
.
first
,
value
.
second
)
}
.
mapValues
{
value
->
Pair
(
value
.
first
,
value
.
second
)
}
.
mapValues
{
readOnlyKey
,
value
->
.
mapValues
{
readOnlyKey
,
value
->
log
.
warn
(
"Key: {}"
,
readOnlyKey
)
log
.
warn
(
"First Value: {}"
,
value
.
first
)
log
.
warn
(
"Second Value as String: {}"
,
String
(
value
.
second
))
parse
(
readOnlyKey
,
value
)
parse
(
readOnlyKey
,
value
)
}
}
.
branch
(
.
branch
(
...
@@ -236,6 +233,13 @@ class KafkaTopology(
...
@@ -236,6 +233,13 @@ class KafkaTopology(
}
catch
(
ex
:
KlaxonException
)
{
}
catch
(
ex
:
KlaxonException
)
{
log
.
error
(
ex
.
localizedMessage
)
log
.
error
(
ex
.
localizedMessage
)
Triple
(
null
,
null
,
Report
(
key
,
ReportStatus
.
failure
,
ex
.
localizedMessage
))
Triple
(
null
,
null
,
Report
(
key
,
ReportStatus
.
failure
,
ex
.
localizedMessage
))
}
catch
(
ex
:
NullPointerException
)
{
log
.
error
(
ex
.
localizedMessage
)
Triple
(
null
,
null
,
Report
(
key
,
ReportStatus
.
failure
,
"There's no data to be processed: ${ex.localizedMessage}"
)
)
}
}
}
}
}
}
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