[ 
https://issues.apache.org/jira/browse/HDFS-17408?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17830506#comment-17830506
 ] 

ASF GitHub Bot commented on HDFS-17408:
---------------------------------------

ThinkerLei commented on code in PR #6653:
URL: https://github.com/apache/hadoop/pull/6653#discussion_r1537676159


##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestCorrectnessOfQuotaAfterRenameOp.java:
##########
@@ -0,0 +1,163 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hdfs.server.namenode;
+
+import org.apache.hadoop.fs.ContentSummary;
+import org.apache.hadoop.fs.Options;
+import org.apache.hadoop.fs.Path;
+
+import org.apache.hadoop.hdfs.DFSTestUtil;
+import org.apache.hadoop.hdfs.DistributedFileSystem;
+import org.apache.hadoop.hdfs.HdfsConfiguration;
+import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.hadoop.hdfs.protocol.HdfsConstants;
+import org.apache.hadoop.hdfs.server.blockmanagement.BlockStoragePolicySuite;
+import org.apache.hadoop.hdfs.server.namenode.snapshot.Snapshot;
+import org.apache.hadoop.test.GenericTestUtils;
+import org.apache.hadoop.test.PathUtils;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+

Review Comment:
   fixed





> Reduce the number of quota calculations in FSDirRenameOp
> --------------------------------------------------------
>
>                 Key: HDFS-17408
>                 URL: https://issues.apache.org/jira/browse/HDFS-17408
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: lei w
>            Assignee: lei w
>            Priority: Major
>              Labels: pull-request-available
>
> During the execution of the rename operation, we first calculate the quota 
> for the source INode using verifyQuotaForRename, and at the same time, we 
> calculate the quota for the target INode. Subsequently, in 
> RenameOperation#removeSrc, RenameOperation#removeSrc4OldRename, and 
> RenameOperation#addSourceToDestination, the quota for the source directory is 
> calculated again. In exceptional cases, RenameOperation#restoreDst and 
> RenameOperation#restoreSource will also perform quota calculations for the 
> source and target directories. In fact, many of the quota calculations are 
> redundant and unnecessary, so we should optimize them away.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to