List of usage examples for org.apache.hadoop.fs UnsupportedFileSystemException UnsupportedFileSystemException
public UnsupportedFileSystemException(final String message)
From source file:com.mellanox.r4h.DistributedFileSystem.java
License:Apache License
@Override public FileChecksum getFileChecksum(Path f, final long length) throws IOException { statistics.incrementReadOps(1);//from w ww . j a v a 2s . c om Path absF = fixRelativePart(f); return new FileSystemLinkResolver<FileChecksum>() { @Override public FileChecksum doCall(final Path p) throws IOException, UnresolvedLinkException { return dfs.getFileChecksum(getPathName(p), length); } @Override public FileChecksum next(final FileSystem fs, final Path p) throws IOException { if (fs instanceof DistributedFileSystem) { return ((DistributedFileSystem) fs).getFileChecksum(p, length); } else { throw new UnsupportedFileSystemException( "getFileChecksum(Path, long) is not supported by " + fs.getClass().getSimpleName()); } } }.resolve(this, absF); }