8000 HDFS-16543. Keep default value of dfs.datanode.directoryscan.throttle.limit.ms.pe… by cndaimin · Pull Request #4178 · apache/hadoop · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

HDFS-16543. Keep default value of dfs.datanode.directoryscan.throttle.limit.ms.pe… #4178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@

<property>
<name>dfs.datanode.directoryscan.throttle.limit.ms.per.sec</name>
<value>1000</value>
<value>-1</value>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. But the comment 1000 is the default setting also needs to update.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tomscut Thanks for your review. The description is updated.

<description>The report compilation threads are limited to only running for
a given number of milliseconds per second, as configured by the
property. The limit is taken per thread, not in aggregate, e.g. setting
Expand All @@ -896,9 +896,9 @@
actual running time of the threads per second will typically be somewhat
higher than the throttle limit, usually by no more than 20%.

Setting this limit to 1000 disables compiler thread throttling. Only
Setting this limit to -1 disables compiler thread throttling. Only
values between 1 and 1000 are valid. Setting an invalid value will result
in the throttle being disabled and an error message being logged. 1000 is
in the throttle being disabled and an error message being logged. -1 is
the default setting.
</description>
</property>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.apache.hadoop.io.nativeio.NativeIO;
import org.apache.hadoop.test.GenericTestUtils;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;

Expand Down Expand Up @@ -165,4 +166,14 @@ public void testMemlockLimit() throws Exception {
prevLimit);
}
}

@Test(timeout = 10000)
public void testValue() throws Exception {
Configuration conf = cluster.getConfiguration(0);
int throttle = conf.getInt(
DFSConfigKeys.DFS_DATANODE_DIRECTORYSCAN_THROTTLE_LIMIT_MS_PER_SEC_KEY,
DFSConfigKeys.DFS_DATANODE_DIRECTORYSCAN_THROTTLE_LIMIT_MS_PER_SEC_DEFAULT);
Assert.assertEquals(-1, throttle);
}

}
0