fixed wrong Encoding during a map phase

This commit is contained in:
Sandro La Bruzzo 2021-10-21 11:35:02 +02:00
parent aeeebd573b
commit ac36aa7d1c
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ public class CopyHdfsOafApplication extends AbstractMigrationApplication {
for (Map.Entry<String, Class> e : ModelSupport.oafTypes.entrySet()) {
oaf
.filter((FilterFunction<Oaf>) o -> o.getClass().getSimpleName().toLowerCase().equals(e.getKey()))
.map((MapFunction<Oaf, String>) OBJECT_MAPPER::writeValueAsString, Encoders.bean(e.getValue()))
.map((MapFunction<Oaf, String>) OBJECT_MAPPER::writeValueAsString, Encoders.STRING())
.write()
.option("compression", "gzip")
.mode(SaveMode.Append)