void visit(RandomAccessFile file) throws IOException { if (!FSImageUtil.checkFileFormat(file)) { throw new IOException("Unrecognized FSImage"); } FileSummary summary = FSImageUtil.loadSummary(file); try (FileInputStream in = new FileInputStream(file.getFD())) { for (FileSummary.Section s : summary.getSectionsList()) { if (SectionName.fromString(s.getName()) != SectionName.INODE) { continue; } in.getChannel().position(s.getOffset()); InputStream is = FSImageUtil.wrapInputStreamForCompression(conf, summary.getCodec(), new BufferedInputStream(new LimitInputStream( in, s.getLength()))); run(is); output(); } } }
InputStream is; ArrayList<FileSummary.Section> sections = Lists.newArrayList(summary.getSectionsList()); Collections.sort(sections, new Comparator<FileSummary.Section>() {
Lists.newArrayList(summary.getSectionsList()); Collections.sort(sections, new Comparator<FsImageProto.FileSummary.Section>() {
.getSectionsList()); Collections.sort(sections, new Comparator<FileSummary.Section>() { @Override
.getSectionsList()); Collections.sort(sections, new Comparator<FileSummary.Section>() { @Override
Lists.newArrayList(summary.getSectionsList()); Collections.sort(sections, new Comparator<FsImageProto.FileSummary.Section>() {
Lists.newArrayList(summary.getSectionsList()); Collections.sort(sections, new Comparator<FsImageProto.FileSummary.Section>() {
.getSectionsList()); Collections.sort(sections, new Comparator<FileSummary.Section>() { @Override
.getSectionsList()); Collections.sort(sections, new Comparator<FileSummary.Section>() { @Override
InputStream is; ArrayList<FileSummary.Section> sections = Lists.newArrayList(summary.getSectionsList()); Collections.sort(sections, new Comparator<FileSummary.Section>() {
InputStream is; ArrayList<FileSummary.Section> sections = Lists.newArrayList(summary.getSectionsList()); Collections.sort(sections, new Comparator<FileSummary.Section>() {
void visit(RandomAccessFile file) throws IOException { if (!FSImageUtil.checkFileFormat(file)) { throw new IOException("Unrecognized FSImage"); } FileSummary summary = FSImageUtil.loadSummary(file); try (FileInputStream in = new FileInputStream(file.getFD())) { for (FileSummary.Section s : summary.getSectionsList()) { if (SectionName.fromString(s.getName()) != SectionName.INODE) { continue; } in.getChannel().position(s.getOffset()); InputStream is = FSImageUtil.wrapInputStreamForCompression(conf, summary.getCodec(), new BufferedInputStream(new LimitInputStream( in, s.getLength()))); run(is); output(); } } }
void visit(RandomAccessFile file) throws IOException { if (!FSImageUtil.checkFileFormat(file)) { throw new IOException("Unrecognized FSImage"); } FileSummary summary = FSImageUtil.loadSummary(file); try (FileInputStream in = new FileInputStream(file.getFD())) { for (FileSummary.Section s : summary.getSectionsList()) { if (SectionName.fromString(s.getName()) != SectionName.INODE) { continue; } in.getChannel().position(s.getOffset()); InputStream is = FSImageUtil.wrapInputStreamForCompression(conf, summary.getCodec(), new BufferedInputStream(new LimitInputStream( in, s.getLength()))); run(is); output(); } } }
.getSectionsList()); Collections.sort(sections, new Comparator<FileSummary.Section>() { @Override
.getSectionsList()); Collections.sort(sections, new Comparator<FileSummary.Section>() { @Override