Skip to content

Conversation

@lyeeeee
Copy link
Contributor

@lyeeeee lyeeeee commented Feb 9, 2022

The origin max bytes allowed read/write from/to hdfs is INT_MAX-2.
But it may raise JVM OOM in some JVM implementations.
For example:
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

it will raise oom when size == 2147483645

Here we choose INT_MAX - 8.(java.util.ArrayList use it as the max length).

@lyeeeee lyeeeee changed the title decreate max bytes read from hdfs decrease max bytes read from hdfs Feb 9, 2022
Copy link
Member

@kvignesh1420 kvignesh1420 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the change @lyeeeee

Reference for where this limitation was imposed.

@kvignesh1420 kvignesh1420 merged commit 92b44e1 into tensorflow:master Feb 9, 2022
@lyeeeee lyeeeee deleted the decrease_max_bytes_read_with_libhdfs branch February 10, 2022 07:50
zheolong pushed a commit to zheolong/io-1 that referenced this pull request Jul 24, 2025
Co-authored-by: liyi.neek <liyi.neek@bytedance.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants