make normalizer more robust
Now if a normalizer fails it fails badly and might corrupt the H5 file. This should be done in a smarter way. A good option is.
to execute normalizers=Seq(normalizer1, normalizer2,...) you do the following
val successful = Seq()
for (n <- normalizers) {
val failed = false
try {
execute n to a JsonEventsBackent to tmpFileN
if (failure) failed = true
} catch {
case NonFatal(e) =>
failed = true
}
if (!failed) {
try {
replay events of tmpFileN to h5 backend
successful += tmpFileN
} catch {
case NonFatal(e) =>
delete h5 file
replay all successful event files
}
}
}
delete all files
if (successful.length < normalizer.length)
had some failures
else
all fine