InputStream in; if (linkPath != null) { in = HFileLink.buildFromHFileLinkPattern(conf, linkPath).open(fs); } else { linkPath = new Path(new Path(HRegion.getRegionDir(snapshotManifest.getSnapshotDir(),
public Reader(FileSystem fs, Path path, HFileLink hfileLink, long size, CacheConfig cacheConf, DataBlockEncoding preferredEncodingInCache, boolean closeIStream) throws IOException { super(path); FSDataInputStream in = hfileLink.open(fs); FSDataInputStream inNoChecksum = in; if (fs instanceof HFileSystem) { FileSystem noChecksumFs = ((HFileSystem)fs).getNoChecksumFs(); inNoChecksum = hfileLink.open(noChecksumFs); } reader = HFile.createReaderWithEncoding(fs, path, in, inNoChecksum, size, cacheConf, preferredEncodingInCache, closeIStream); bloomFilterType = BloomType.NONE; }
private FSDataInputStream openSourceFile(final Path path) { try { if (HFileLink.isHFileLink(path)) { return new HFileLink(inputRoot, inputArchive, path).open(inputFs); } else if (isHLogLinkPath(path)) { String serverName = path.getParent().getName(); String logName = path.getName(); return new HLogLink(inputRoot, serverName, logName).open(inputFs); } return inputFs.open(path); } catch (IOException e) { LOG.error("Unable to open source file=" + path, e); return null; } }
InputStream in = new HFileLink(conf, linkPath).open(fs); OutputStream out = fs.create(outPath); IOUtils.copyBytes(in, out, conf);
InputStream in; if (linkPath != null) { in = HFileLink.buildFromHFileLinkPattern(conf, linkPath).open(fs); } else { linkPath = new Path(new Path(HRegion.getRegionDir(snapshotManifest.getSnapshotDir(),