Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -434,10 +434,13 @@ public BackupManifest(FileSystem fs, Path backupPath) throws BackupException {
for (FileStatus subFile : subFiles) {
if (subFile.getPath().getName().equals(MANIFEST_FILE_NAME)) {
// load and set manifest field from file content
FSDataInputStream in = fs.open(subFile.getPath());
long len = subFile.getLen();
byte[] pbBytes = new byte[(int) len];
in.readFully(pbBytes);
try (FSDataInputStream in = fs.open(subFile.getPath())) {
in.readFully(pbBytes);
} catch (IOException e) {
throw new BackupException(e.getMessage());
}
BackupProtos.BackupImage proto = null;
try {
proto = BackupProtos.BackupImage.parseFrom(pbBytes);
Expand Down