In HDFS, there is a configuration dfs.datanode.scan.period.hours in hdfs- site.xml to set the number of hours interval at which Block Scanner should run.
We can set dfs.datanode.scan.period.hours=0 to disable the Block Scanner. It means it will not run on HDFS DataNode.