Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Method looks like :
private ZoneId extractWriterTimezoneFromMetadata(JobConf job, FileSplit split, GenericDatumReader<GenericRecord> gdr) throws IOException { if (job == null || gdr == null || split == null || split.getPath() == null) { return null; } try { DataFileReader<GenericRecord> dataFileReader = new DataFileReader<GenericRecord>(new FsInput(split.getPath(), job), gdr); [...return...] } } catch (IOException e) { // Can't access metadata, carry on. } return null; }
The DataFileReader is never closed which can cause a memory leak. We need a try-with-resources here.
Attachments
Attachments
Issue Links
- links to