[
https://issues.apache.org/jira/browse/HDFS-14485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16838425#comment-16838425
]
Jinglun commented on HDFS-14485:
--------------------------------
Hi [~jojochuang], seems we can disable the thread by configuring DFSConfigKeys.
DFS_NAMENODE_LAZY_PERSIST_FILE_SCRUB_INTERVAL_SEC to zero. See HDFS-6929.
{code:java}
FSNamesystem(Configuration conf, FSImage fsImage, boolean ignoreRetryCache)
throws IOException {
this.lazyPersistFileScrubIntervalSec = conf.getInt(
DFS_NAMENODE_LAZY_PERSIST_FILE_SCRUB_INTERVAL_SEC,
DFS_NAMENODE_LAZY_PERSIST_FILE_SCRUB_INTERVAL_SEC_DEFAULT);
}{code}
{code:java}
void startActiveServices() {
if (lazyPersistFileScrubIntervalSec > 0) {
lazyPersistFileScrubber = new Daemon(new LazyPersistFileScrubber(
lazyPersistFileScrubIntervalSec));
lazyPersistFileScrubber.start();
} else {
LOG.warn("Lazy persist file scrubber is disabled,"
+ " configured scrub interval is zero.");
}
}
{code}
Is it acceptable to set the key to zero each time doing testing/dev? May be
making the DFS_NAMENODE_LAZY_PERSIST_FILE_SCRUB_INTERVAL_SEC=0 as a default
behavior when starting a MiniDFSCluster?
> Optionally disable LazyPersistFileScrubber thread
> -------------------------------------------------
>
> Key: HDFS-14485
> URL: https://issues.apache.org/jira/browse/HDFS-14485
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: namenode
> Reporter: Wei-Chiu Chuang
> Priority: Major
>
> NameNode automatically starts a LazyPersistFileScrubber thread to remove
> missing block files from namespace.
> However, for testing/dev purposes, if I simply want to load a NameNode with a
> fsimage, the thread would still kick off and consume CPU resources. That's
> quite annoying.
>
> I would like to propose an option to disable this thread if a developer knows
> exact what he/she is doing.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]