@Override
public FileStatus getFileStatus(Path path) throws IOException {
AlluxioURI tPath = new AlluxioURI(HadoopUtils.getPathWithoutScheme(path));
Path hdfsPath = HadoopUtils.getHDFSPath(tPath, mUnderFSAddress);
LOG.info("getFileStatus({}): HDFS Path: {} Alluxio Path: {}{}", path, hdfsPath, mAlluxioHeader,
tPath);
if (mStatistics != null) {
mStatistics.incrementReadOps(1);
}
URIStatus fileStatus;
try {
fileStatus = mFileSystem.getStatus(tPath);
} catch (FileDoesNotExistException e) {
throw new FileNotFoundException(e.getMessage());
} catch (AlluxioException e) {
throw new IOException(e);
}
FileStatus ret = new FileStatus(fileStatus.getLength(), fileStatus.isFolder(),
BLOCK_REPLICATION_CONSTANT, fileStatus.getBlockSizeBytes(), fileStatus.getCreationTimeMs(),
fileStatus.getCreationTimeMs(), new FsPermission((short) fileStatus.getPermission()),
fileStatus.getUserName(), fileStatus.getGroupName(), new Path(mAlluxioHeader + tPath));
return ret;
}