Hi everyone,
I am using flink-1.16.0.
I have implemented a custom parquet sink pipeline where i am using parquet-hadoop to convert json to parquet.
Its a bit complicated pipeline where i am detecting incoming json's schema, generate parquet schema and using this schema i write json into parquet. The pipeline also takes care of schema evolution.
Since it was so custom, i could not use internal flink APIs and i implemented a custom functions to do this.
The pipeline works fine, however i started to observe a lot of class loader leaks which causes metaspace error when deployed multiple times.
Analysing the issue, i found that it maybe caused by the internal hadoop classes with the one used in job (i suspsect specifically org.apache.hadoop.fs.FileSystem$Statistics$StatisticsDataReferenceCleaner and that the flink user app class loader's class gets registered into this thread).
So i wanted to check what is the best way to use custom hadoop classses within a job without causing class loader leak ?
I am using parquet-hadoop-1.13.1 with hadoop-common-3.3.2.
Regards,
Nitish