コード例 #1
0
 /// <exception cref="Org.Apache.Hadoop.Hdfs.Protocol.QuotaExceededException"/>
 internal void AddSpaceConsumed(INodeDirectory dir, QuotaCounts counts, bool verify
                                )
 {
     if (dir.IsQuotaSet())
     {
         // The following steps are important:
         // check quotas in this inode and all ancestors before changing counts
         // so that no change is made if there is any quota violation.
         // (1) verify quota in this inode
         if (verify)
         {
             VerifyQuota(counts);
         }
         // (2) verify quota and then add count in ancestors
         dir.AddSpaceConsumed2Parent(counts, verify);
         // (3) add count in this inode
         AddSpaceConsumed2Cache(counts);
     }
     else
     {
         dir.AddSpaceConsumed2Parent(counts, verify);
     }
 }