Hello folks,
We see threads from https://github.com/aws/aws-sdk-java/blob/master/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/TransferManagerUtils.java#L49 outlive a batch job that writes Parquet Files to S3, causing a ClassLoader Leak. Is this a known issue ? Logically a close on the TransferManager should close the ExecutorService ( and thus the threads ), The code is fairly straightforward, val job = new Job()
val hadoopOutFormat = new HadoopOutputFormat[Void, GenericRecord](
new AvroParquetOutputFormat(),
job
)
AvroParquetOutputFormat.setSchema(job, schema)
FileOutputFormat.setOutputPath(job, new org.apache.hadoop.fs.Path(path))
ParquetOutputFormat.setCompression(job, CompressionCodecName.SNAPPY)
ParquetOutputFormat.setEnableDictionary(job, true) // do we need this?
and then an output This is using scalaVersion := "2.12.12"
flinkVersion = "1.11.2"
hadoopVersion = "2.8.3"
Regards Vishal |
We do put the flink-hdoop-uber*.jar in the flink lib ( and thus available to the root classloader ). That still does not explain the executor service outliving the job. On Tue, Feb 9, 2021 at 6:49 PM Vishal Santoshi <[hidden email]> wrote:
|
com/amazonaws/services/s3/transfer/TransferManager.class is in flink-s3-fs-hadoop-1.11.2.jar which is in the plugins and that AFAIK should have a dedicated ClassLoader per plugin. So does it make sense that these classes remain beyond the job and so does the executor service for multipart upload ? I guess the question are * Why are classes not being GCed and it seems that these threads reference objects loaded by the JobCLassloader and thus ob ClasslOader is not being GCed. * Does the flink-s3-fs-hadoop-1.11.2.jar need to be in the plugins as has been advised ... Can they be part of the uber jar ? On Wed, Feb 10, 2021 at 9:27 AM Vishal Santoshi <[hidden email]> wrote:
|
FileSystems must not be bundled in the
user jar.
You must place them in lib/ or
plugins/, because by bundling it you break our assumption that
they exist for the lifetime of the cluster (which in turn means we
don't really have to worry about cleaning up).
On 2/10/2021 4:01 PM, Vishal Santoshi
wrote:
|
As in https://github.com/aws/aws-sdk-java/blob/41a577e3f667bf5efb3d29a46aaf210bf70483a1/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/TransferManager.java#L2378 never gets called as it is never GCed... On Wed, Feb 10, 2021 at 10:47 AM Vishal Santoshi <[hidden email]> wrote:
|
Hi Vishal, if you have the possibility could you create a memdump? It would be interesting to know why the TransferManager is never released. Note that it's impossible to release all objects/classes loaded through a particular ClassLoader, all we can do is making sure that the ClassLoader is not used anymore, leading to a full release if all object instances are released. However, this doesn't seem to work in your case. On Wed, Feb 10, 2021 at 6:43 PM Vishal Santoshi <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |