Skip to content

Commit 226cd5b

Browse files
committed
fix failed UT.
1 parent 9eb153c commit 226cd5b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/ModDataSetSubLockStrategy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public ModDataSetSubLockStrategy(long mod) {
3939

4040
@Override
4141
public String blockIdToSubLock(long blockid) {
42-
return LOCK_NAME_PERFIX + String.valueOf(blockid % modFactor);
42+
return LOCK_NAME_PERFIX + (blockid % modFactor);
4343
}
4444

4545
@Override

hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6568,6 +6568,15 @@
65686568
problem. In produce default set false, because it's have little performance loss.
65696569
</description>
65706570
</property>
6571+
6572+
<property>
6573+
<name>dfs.datanode.dataset.sublock.count</name>
6574+
<value>1000</value>
6575+
<description>
6576+
The dataset readwrite lock counts for a volume.
6577+
</description>
6578+
</property>
6579+
65716580
<property>
65726581
<name>dfs.client.fsck.connect.timeout</name>
65736582
<value>60000ms</value>

0 commit comments

Comments
 (0)