public boolean isEnabled() {
    return (conf.scanPeriodMs > 0) && (conf.targetBytesPerSec > 0);
  }
@Test(timeout=60000)
  public void testDisableVolumeScanner() throws Exception {
    Configuration conf = new Configuration();
    disableBlockScanner(conf);
    try(TestContext ctx = new TestContext(conf, 1)) {
      assertFalse(ctx.datanode.getBlockScanner().isEnabled());
    }
  }