fix hdfs federation#441
Open
SelfEvoAI wants to merge 1 commit intolinkedin:masterfrom
SelfEvoAI:fix-hdfs-federation
Open
fix hdfs federation#441SelfEvoAI wants to merge 1 commit intolinkedin:masterfrom SelfEvoAI:fix-hdfs-federation
SelfEvoAI wants to merge 1 commit intolinkedin:masterfrom
SelfEvoAI:fix-hdfs-federation
Conversation
pralabhkumar
suggested changes
Dec 19, 2018
| try { | ||
| HDFS_BLOCK_SIZE = FileSystem.get(new Configuration()).getDefaultBlockSize(new Path("/tmp")); | ||
| } catch (IOException e1) { | ||
| e1.printStackTrace(); |
Contributor
There was a problem hiding this comment.
Please log the error , instead of printStackTrace
| /** | ||
| * Currently most companies use 128M as the default block size | ||
| */ | ||
| HDFS_BLOCK_SIZE = 128 * 1024 * 1024; |
Contributor
There was a problem hiding this comment.
I think its better to have 64MB as default (as thats HDFS default block size) . There should be property from the configuration file for defaultblocksize (or the path which is mounted instead of looking for / or /tmp), if getDefaultBlockSize gives exception then user provided default size can be taken (or other way round check if user have provided default block size , if not then go for getDefaultBlockSize and if that also gives exception then by default 64MB should be taken).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When hdfs use Federation will Exception: