-
Notifications
You must be signed in to change notification settings - Fork 8.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HDFS-11227: Set read timeout for peer #171
base: branch-2.7.1
Are you sure you want to change the base?
Conversation
…node fs.hdfs.data.socket.size to be set in core-site.xml. If the node is not found, the default value is -1, so socket buffer size would not be set.
… config node fs.hdfs.data.socket.size to be set in core-site.xml. If the node is not found, the default value is -1, so socket buffer size would not be set. Will add this commit in separate PR" This reverts commit 6c29642.
try { | ||
peer.setReadTimeout(conf.socketTimeout); | ||
} | ||
catch(IOException e){} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the javadoc, it should return a null if it is unable to establish a connection. I think it should also return a null in this case as well.
try { | ||
peer.setReadTimeout(conf.socketTimeout); | ||
} | ||
catch(IOException e){} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return null upon exception
try { | ||
peer.setReadTimeout(conf.socketTimeout); | ||
} | ||
catch(IOException e){} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return null upon exception
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for reporting the issue. Please update the patch to make it production quality.
Author: Prateek Maheshwari <[email protected]> Reviewers: Jacob Maes <[email protected]> Closes apache#171 from prateekm/disable-flaky-test
Read timeout is not set with peer in org.apache.hadoop.hdfs.BlockReaderFactory, so BlockReader read doesn't timeout.