Skip to content

Commit

Permalink
Support LocalCacheFileSystem turn getFileBlockLocation request to ext…
Browse files Browse the repository at this point in the history
…ernal file system (merge request !519)


Squash merge branch 'cacheFS-blockLocation' into 'tencent-master-dev'

* Support LocalCacheFileSystem turn getFileBlockLocation request to external file system
  • Loading branch information
maobaolong committed Jun 24, 2023
1 parent 545ecd4 commit a3532fd
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import alluxio.wire.FileInfo;

import com.google.common.base.Preconditions;
import org.apache.hadoop.fs.BlockLocation;
import org.apache.hadoop.fs.FSDataInputStream;
import org.apache.hadoop.fs.FSDataOutputStream;
import org.apache.hadoop.fs.FileStatus;
Expand Down Expand Up @@ -205,4 +206,16 @@ public boolean mkdirs(Path f, FsPermission permission) throws IOException {
public FileStatus getFileStatus(Path f) throws IOException {
return mExternalFileSystem.getFileStatus(f);
}

@Override
public BlockLocation[] getFileBlockLocations(FileStatus file, long start,
long len) throws IOException {
return mExternalFileSystem.getFileBlockLocations(file, start, len);
}

@Override
public BlockLocation[] getFileBlockLocations(Path p, long start, long len)
throws IOException {
return mExternalFileSystem.getFileBlockLocations(p, start, len);
}
}

0 comments on commit a3532fd

Please sign in to comment.