private synchronized void initDataBlockScanner(Configuration conf) {
    if (blockScanner != null) {
      return;
    }
    //initialize periodic block scanner
    String reason = null;
    if (conf.getInt("dfs.datanode.scan.period.hours", 0) < 0) {
      reason = "verification is turned off by configuration";
    } else if ( !(data instanceof FSDataset) ) {
      reason = "verifcation is supported only with FSDataset";
    } 

    if ( reason == null ) {
      blockScanner = new DataBlockScannerSet(this, (FSDataset)data, conf);      
    } else {
      LOG.info("Periodic Block Verification is disabled because " +
               reason + ".");
    }
  }
private synchronized void initDataBlockScanner ( Configuration conf ) { if ( blockScanner != null ) { return ; } String reason = null ; if ( conf . getInt ( "dfs.datanode.scan.period.hours" , 0 ) < 0 ) { reason = "verification is turned off by configuration" ; } else if ( ! ( data instanceof FSDataset ) ) { reason = "verifcation is supported only with FSDataset" ; } if ( reason == null ) { blockScanner = new DataBlockScannerSet ( this , ( FSDataset ) data , conf ) ; } else { LOG . info ( "Periodic Block Verification is disabled because " + reason + "." ) ; } }
See {@link DataBlockScanner}