@Override public void setVerifyChecksum(boolean verifyChecksum) throws IOException { fsImpl.setVerifyChecksum(verifyChecksum); }
@Override public void setVerifyChecksum(boolean verifyChecksum) { fs.setVerifyChecksum(verifyChecksum); }
public void setVerifyChecksum(boolean verifyChecksum) { this.underlyingFs.setVerifyChecksum(verifyChecksum); }
public FileSystem getFileSystem(String user, Path path, Configuration configuration) throws IOException { return hdfsAuthentication.doAs(user, () -> { FileSystem fileSystem = path.getFileSystem(configuration); fileSystem.setVerifyChecksum(verifyChecksum); return fileSystem; }); }
@Override public void setVerifyChecksum(final boolean verifyChecksum) { List<InodeTree.MountPoint<FileSystem>> mountPoints = fsState.getMountPoints(); for (InodeTree.MountPoint<FileSystem> mount : mountPoints) { mount.target.targetFileSystem.setVerifyChecksum(verifyChecksum); } }
@Override protected void processPath(PathData item) throws IOException { if (item.stat.isDirectory()) { throw new PathIsDirectoryException(item.toString()); } item.fs.setVerifyChecksum(verifyChecksum); printToStdout(getInputStream(item)); }
/** * Copies the source file to the target. * @param src item to copy * @param target where to copy the item * @throws IOException if copy fails */ protected void copyFileToTarget(PathData src, PathData target) throws IOException { final boolean preserveRawXattrs = checkPathsForReservedRaw(src.path, target.path); src.fs.setVerifyChecksum(verifyChecksum); InputStream in = null; try { in = src.fs.open(src.path); copyStreamToTarget(in, target); preserveAttributes(src, target, preserveRawXattrs); } finally { IOUtils.closeStream(in); } }
fs.setVerifyChecksum(false); conf.setBoolean("dfs.client.read.shortcircuit.skip.checksum", true); this.noChecksumFs = maybeWrapFileSystem(newInstanceFileSystem(conf), conf); this.noChecksumFs.setVerifyChecksum(false); } else { this.noChecksumFs = maybeWrapFileSystem(fs, conf);
path.getFileSystem(CONFIGURATION).setVerifyChecksum(true); File file = new File(filePath); return new FileSplit(path, 0, file.length(), new String[0]);
path.getFileSystem(new Configuration()).setVerifyChecksum(true); File file = new File(filePath); return new FileSplit(path, 0, file.length(), new String[0]);
@Override public void setVerifyChecksum(final boolean verifyChecksum) { List<InodeTree.MountPoint<FileSystem>> mountPoints = fsState.getMountPoints(); for (InodeTree.MountPoint<FileSystem> mount : mountPoints) { mount.target.targetFileSystem.setVerifyChecksum(verifyChecksum); } }
/** * Return the {@link FileSystem} specified by src and the conf. * It the {@link FileSystem} supports checksum, set verifyChecksum. */ private FileSystem getSrcFileSystem(Path src, boolean verifyChecksum ) throws IOException { FileSystem srcFs = src.getFileSystem(getConf()); srcFs.setVerifyChecksum(verifyChecksum); return srcFs; }
@Override public void setVerifyChecksum(final boolean verifyChecksum) { List<InodeTree.MountPoint<FileSystem>> mountPoints = fsState.getMountPoints(); for (InodeTree.MountPoint<FileSystem> mount : mountPoints) { mount.target.targetFileSystem.setVerifyChecksum(verifyChecksum); } }
@Test public void testVerifyChecksumPassthru() { FileSystem mockFs = mock(FileSystem.class); FileSystem fs = new FilterFileSystem(mockFs); fs.setVerifyChecksum(false); verify(mockFs).setVerifyChecksum(eq(false)); reset(mockFs); fs.setVerifyChecksum(true); verify(mockFs).setVerifyChecksum(eq(true)); }
@Test public void testVerifyChecksumPassthru() { FileSystem mockFs = mock(FileSystem.class); FileSystem fs = new FilterFileSystem(mockFs); fs.setVerifyChecksum(false); verify(mockFs).setVerifyChecksum(eq(false)); reset(mockFs); fs.setVerifyChecksum(true); verify(mockFs).setVerifyChecksum(eq(true)); }
@Override protected void processPath(PathData item) throws IOException { if (item.stat.isDirectory()) { throw new PathIsDirectoryException(item.toString()); } item.fs.setVerifyChecksum(verifyChecksum); printToStdout(getInputStream(item)); }
@Override protected void processPath(PathData item) throws IOException { if (item.stat.isDirectory()) { throw new PathIsDirectoryException(item.toString()); } item.fs.setVerifyChecksum(verifyChecksum); printToStdout(getInputStream(item)); }
@Override protected void processPath(PathData item) throws IOException { if (item.stat.isDirectory()) { throw new PathIsDirectoryException(item.toString()); } item.fs.setVerifyChecksum(verifyChecksum); printToStdout(getInputStream(item)); }
void checkVerifyChecksum(boolean flag) { viewFs.setVerifyChecksum(flag); assertEquals(flag, fs1.getVerifyChecksum()); assertEquals(flag, fs2.getVerifyChecksum()); }
void checkVerifyChecksum(boolean flag) { viewFs.setVerifyChecksum(flag); assertEquals(flag, fs1.getVerifyChecksum()); assertEquals(flag, fs2.getVerifyChecksum()); }