Skip to content

Commit 8f570c9

Browse files
committed
fix checkstyle
1 parent 1e9321b commit 8f570c9

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirRenameOp.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ private static Triple<Boolean, Optional<QuotaCounts>, Optional<QuotaCounts>> ver
8585
// Verify path without valid 'DirectoryWithQuotaFeature'
8686
// Note: In overwrite scenarios, quota calculation is still required,
8787
// overwrite operations delete existing content, which affects the root directory's quota.
88-
if (!overwrite && FSDirectory.verifyPathWithoutValidFeature(src)
89-
&& FSDirectory.verifyPathWithoutValidFeature(dst)) {
88+
if (!overwrite && FSDirectory.verifyPathWithoutValidQuotaFeature(src)
89+
&& FSDirectory.verifyPathWithoutValidQuotaFeature(dst)) {
9090
return Triple.of(false, srcDelta, dstDelta);
9191
}
9292

hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,13 +1244,12 @@ static void verifyQuota(INodesInPath iip, int pos, QuotaCounts deltas,
12441244

12451245
/**
12461246
* Verify that the path from the specified position to the root
1247-
* (excluding the root itself) does not contain any valid quota features.
1247+
* (excluding the root itself) does not contain any valid quota feature.
12481248
*
1249-
* @param iip the INodesInPath containing all the ancestral INodes.
1250-
* @return true if no valid features are found along the path,
1251-
* false if any directory in the path has an active feature.
1249+
* @param iip the INodesInPath instance containing all the INodes for the path.
1250+
* @return true if no valid quota feature, false if any directory in the path has quota feature.
12521251
*/
1253-
static boolean verifyPathWithoutValidFeature(INodesInPath iip) {
1252+
static boolean verifyPathWithoutValidQuotaFeature(INodesInPath iip) {
12541253
for (int i = iip.length() - 2; i >= 1; i--) {
12551254
INodeDirectory d = iip.getINode(i).asDirectory();
12561255
if (d.isWithQuota()) {

hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestCorrectnessOfQuotaAfterRenameOp.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,15 +257,15 @@ public void testRenameUndoWithoutValidFeature() throws Exception {
257257
Path file1 = new Path(srcDir3, "file" + i);
258258
DFSTestUtil.createFile(dfs, file1, fileLen, replication, 0);
259259
}
260-
260+
261261
// Test rename1
262262
ContentSummary rootContentSummary1 = dfs.getContentSummary(new Path("/"));
263263
QuotaUsage rootQuotaUsage1 = dfs.getQuotaUsage(new Path("/"));
264264
ContentSummary contentSummary1 = dfs.getContentSummary(testParentDir1);
265-
265+
266266
FSNamesystem fsn = cluster.getNamesystem();
267267
FSDirectory fsDirectory = fsn.getFSDirectory();
268-
268+
269269
// Replace INode, expected addChild return false
270270
INodeDirectory dir = fsDirectory.getINode4Write(testParentDir2.toString()).asDirectory();
271271
INodeDirectory mockDir = Mockito.spy(dir);

0 commit comments

Comments
 (0)