示例#1
0
 public DstReference(INodeDirectory parent, INodeReference.WithCount referred, int
                     dstSnapshotId)
     : base(parent, referred)
 {
     this.dstSnapshotId = dstSnapshotId;
     referred.AddReference(this);
 }
示例#2
0
 public WithName(INodeDirectory parent, INodeReference.WithCount referred, byte[]
                 name, int lastSnapshotId)
     : base(parent, referred)
 {
     this.name           = name;
     this.lastSnapshotId = lastSnapshotId;
     referred.AddReference(this);
 }
示例#3
0
            /// <exception cref="Org.Apache.Hadoop.Hdfs.Protocol.QuotaExceededException"/>
            internal virtual void RestoreDst(BlockStoragePolicySuite bsps)
            {
                Preconditions.CheckState(oldDstChild != null);
                INodeDirectory dstParent = dstParentIIP.GetLastINode().AsDirectory();

                if (dstParent.IsWithSnapshot())
                {
                    dstParent.UndoRename4DstParent(bsps, oldDstChild, dstIIP.GetLatestSnapshotId());
                }
                else
                {
                    fsd.AddLastINodeNoQuotaCheck(dstParentIIP, oldDstChild);
                }
                if (oldDstChild != null && oldDstChild.IsReference())
                {
                    INodeReference           removedDstRef = oldDstChild.AsReference();
                    INodeReference.WithCount wc            = (INodeReference.WithCount)removedDstRef.GetReferredINode
                                                                 ().AsReference();
                    wc.AddReference(removedDstRef);
                }
            }