HBASE-17347 ExportSnapshot may write snapshot info file to wrong directory when specifying target name (Jianwei Cui)
This commit is contained in:
parent
e75dee3a21
commit
5ebb25d601
|
@ -1035,7 +1035,15 @@ public class ExportSnapshot extends AbstractHBaseTool implements Tool {
|
||||||
.toBuilder()
|
.toBuilder()
|
||||||
.setName(targetName)
|
.setName(targetName)
|
||||||
.build();
|
.build();
|
||||||
SnapshotDescriptionUtils.writeSnapshotInfo(snapshotDesc, snapshotTmpDir, outputFs);
|
SnapshotDescriptionUtils.writeSnapshotInfo(snapshotDesc, initialOutputSnapshotDir, outputFs);
|
||||||
|
if (filesUser != null || filesGroup != null) {
|
||||||
|
outputFs.setOwner(new Path(initialOutputSnapshotDir,
|
||||||
|
SnapshotDescriptionUtils.SNAPSHOTINFO_FILE), filesUser, filesGroup);
|
||||||
|
}
|
||||||
|
if (filesMode > 0) {
|
||||||
|
outputFs.setPermission(new Path(initialOutputSnapshotDir,
|
||||||
|
SnapshotDescriptionUtils.SNAPSHOTINFO_FILE), new FsPermission((short)filesMode));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Step 2 - Start MR Job to copy files
|
// Step 2 - Start MR Job to copy files
|
||||||
|
|
Loading…
Reference in New Issue