Arnaud-Nauwynck opened a new issue, #3074:
URL: https://github.com/apache/parquet-java/issues/3074
### Describe the enhancement requested
This is a minor performance improvement, but worth when reading many files.
read footer using 1 call readFully(byte[8]) instead of 5 calls ( 4 x read()
for footer length + 1 x read(byte[4]) for magic marker )
in summary the patch is for file ParquetFileReader.java, method
"readFooter()" :
> - byte[] magic = new byte[MAGIC.length];
> - long fileMetadataLengthIndex = fileLen - magic.length -
FOOTER_LENGTH_SIZE;
> + long fileMetadataLengthIndex = fileLen - MAGIC.length -
FOOTER_LENGTH_SIZE;
> LOG.debug("reading footer index at {}", fileMetadataLengthIndex);
> f.seek(fileMetadataLengthIndex);
> - int fileMetadataLength = readIntLittleEndian(f);
> - f.readFully(magic);
> + byte[] magicAndLengthBytes = new byte[FOOTER_LENGTH_SIZE +
MAGIC.length];
> + f.readFully(magicAndLengthBytes);
> + int fileMetadataLength = readIntLittleEndian(magicAndLengthBytes, 0);
>
### Component(s)
Core
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]