-
Notifications
You must be signed in to change notification settings - Fork 2.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
Support getFileBlockLocation in LocalCacheFileSystem #17672
Support getFileBlockLocation in LocalCacheFileSystem #17672
Conversation
Automated checks report:
Some checks failed. Please fix the reported issues and reply 'alluxio-bot, check this please' to re-run checks. |
…ernal file system
a3532fd
to
aeb7ee2
Compare
Automated checks report:
All checks passed! |
Can you please describe what are the benefits if the client can get access to the block location info? Would that cause the client to directly talk to the datanode and bypass local cache? |
@dbw9580 The compute framework can use it to schedule the split task to the node in the same block location. |
@Override | ||
public BlockLocation[] getFileBlockLocations(FileStatus file, long start, | ||
long len) throws IOException { | ||
return mExternalFileSystem.getFileBlockLocations(file, start, len); |
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.
// Applications use the block information here to schedule/distribute the tasks.
// Return the UFS locations directly instead of the local cache location,
// so the application can schedule the tasks accordingly
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.
@dbw9580 @maobaolong what do you think about this?
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.
Added it
@jiacheliu3 Thanks for your suggested comments, PTAL. |
alluxio-bot, merge this please |
### What changes are proposed in this pull request? Delegate `getFileBlockLocation` to external file system in `LocalCacheFileSystem`. ### Why are the changes needed? Otherwise, `LocalCacheFileSystem` inherits the default behavior of `org.apache.hadoop.fs.FileSystem` which returns `localhost` only. ### Does this PR introduce any user facing changes? No. pr-link: Alluxio#17672 change-id: cid-eb545dbd8ed42001d074fecfb9c8d6b118a559c1
### What changes are proposed in this pull request? Delegate `getFileBlockLocation` to external file system in `LocalCacheFileSystem`. ### Why are the changes needed? Otherwise, `LocalCacheFileSystem` inherits the default behavior of `org.apache.hadoop.fs.FileSystem` which returns `localhost` only. ### Does this PR introduce any user facing changes? No. pr-link: Alluxio#17672 change-id: cid-eb545dbd8ed42001d074fecfb9c8d6b118a559c1
### What changes are proposed in this pull request? Delegate `getFileBlockLocation` to external file system in `LocalCacheFileSystem`. ### Why are the changes needed? Otherwise, `LocalCacheFileSystem` inherits the default behavior of `org.apache.hadoop.fs.FileSystem` which returns `localhost` only. ### Does this PR introduce any user facing changes? No. pr-link: Alluxio#17672 change-id: cid-eb545dbd8ed42001d074fecfb9c8d6b118a559c1
What changes are proposed in this pull request?
Delegate
getFileBlockLocation
to external file system inLocalCacheFileSystem
.Why are the changes needed?
Otherwise,
LocalCacheFileSystem
inherits the default behavior oforg.apache.hadoop.fs.FileSystem
which returnslocalhost
only.Does this PR introduce any user facing changes?
No.