HDFS-4395. In INodeDirectorySnapshottable's constructor, the passed-in dir could be an INodeDirectoryWithSnapshot. Contributed by Jing Zhao
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/HDFS-2802@1432838 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
90d6d55a4b
commit
686e13db2f
@ -104,3 +104,6 @@ Branch-2802 Snapshot (Unreleased)
|
||||
HDFS-4098. Add FileWithLink, INodeFileUnderConstructionWithLink and
|
||||
INodeFileUnderConstructionSnapshot in order to support append to snapshotted
|
||||
files. (szetszwo)
|
||||
|
||||
HDFS-4395. In INodeDirectorySnapshottable's constructor, the passed-in dir
|
||||
could be an INodeDirectoryWithSnapshot. (Jing Zhao via szetszwo)
|
||||
|
@ -76,7 +76,8 @@ List<Snapshot> getSnapshotsByNames() {
|
||||
private int snapshotQuota = SNAPSHOT_LIMIT;
|
||||
|
||||
public INodeDirectorySnapshottable(INodeDirectory dir) {
|
||||
super(dir, true, null);
|
||||
super(dir, true, dir instanceof INodeDirectoryWithSnapshot ?
|
||||
((INodeDirectoryWithSnapshot) dir).getSnapshotDiffs() : null);
|
||||
}
|
||||
|
||||
/** @return the number of existing snapshots. */
|
||||
|
Loading…
Reference in New Issue
Block a user