/** * See {@link DirectoryScanner} */ private synchronized void initDirectoryScanner(Configuration conf) { if (directoryScanner != null) { return; } String reason = null; if (conf.getTimeDuration(DFS_DATANODE_DIRECTORYSCAN_INTERVAL_KEY, DFS_DATANODE_DIRECTORYSCAN_INTERVAL_DEFAULT, TimeUnit.SECONDS) < 0) { reason = "verification is turned off by configuration"; } else if ("SimulatedFSDataset".equals(data.getClass().getSimpleName())) { reason = "verifcation is not supported by SimulatedFSDataset"; } if (reason == null) { directoryScanner = new DirectoryScanner(this, data, conf); directoryScanner.start(); } else { LOG.info("Periodic Directory Tree Verification scan " + "is disabled because {}", reason); } }
/** * See {@link DirectoryScanner} */ private synchronized void initDirectoryScanner(Configuration conf) { if (directoryScanner != null) { return; } String reason = null; if (conf.getInt(DFS_DATANODE_DIRECTORYSCAN_INTERVAL_KEY, DFS_DATANODE_DIRECTORYSCAN_INTERVAL_DEFAULT) < 0) { reason = "verification is turned off by configuration"; } else if ("SimulatedFSDataset".equals(data.getClass().getSimpleName())) { reason = "verifcation is not supported by SimulatedFSDataset"; } if (reason == null) { directoryScanner = new DirectoryScanner(this, data, conf); directoryScanner.start(); } else { LOG.info("Periodic Directory Tree Verification scan is disabled because " + reason); } }
/** * See {@link DirectoryScanner} */ private synchronized void initDirectoryScanner(Configuration conf) { if (directoryScanner != null) { return; } String reason = null; if (conf.getInt(DFS_DATANODE_DIRECTORYSCAN_INTERVAL_KEY, DFS_DATANODE_DIRECTORYSCAN_INTERVAL_DEFAULT) < 0) { reason = "verification is turned off by configuration"; } else if ("SimulatedFSDataset".equals(data.getClass().getSimpleName())) { reason = "verifcation is not supported by SimulatedFSDataset"; } if (reason == null) { directoryScanner = new DirectoryScanner(this, data, conf); directoryScanner.start(); } else { LOG.info("Periodic Directory Tree Verification scan is disabled because " + reason); } }
scanner = new DirectoryScanner(dataNode, fds, conf); ratio = runThrottleTest(blocks); retries -= 1; scanner = new DirectoryScanner(dataNode, fds, conf); ratio = runThrottleTest(blocks); retries -= 1; scanner = new DirectoryScanner(dataNode, fds, conf); ratio = runThrottleTest(blocks); retries -= 1; scanner = new DirectoryScanner(dataNode, fds, CONF); scanner.setRetainDiffs(true); scan(blocks, 0, 0, 0, 0, 0); scanner = new DirectoryScanner(dataNode, fds, conf); scanner.setRetainDiffs(true); DFSConfigKeys.DFS_DATANODE_DIRECTORYSCAN_THROTTLE_LIMIT_MS_PER_SEC_KEY, 0); scanner = new DirectoryScanner(dataNode, fds, conf); scanner.setRetainDiffs(true); scan(blocks, 0, 0, 0, 0, 0); DFSConfigKeys.DFS_DATANODE_DIRECTORYSCAN_THROTTLE_LIMIT_MS_PER_SEC_KEY, 1000); scanner = new DirectoryScanner(dataNode, fds, conf); scanner.setRetainDiffs(true);
fds = DataNodeTestUtils.getFSDataset(cluster.getDataNodes().get(0)); client = cluster.getFileSystem().getClient(); scanner = new DirectoryScanner(dataNode, fds, CONF); scanner.setRetainDiffs(true); FsDatasetTestUtil.stopLazyWriter(cluster.getDataNodes().get(0));
fds = DataNodeTestUtils.getFSDataset(cluster.getDataNodes().get(0)); client = cluster.getFileSystem().getClient(); scanner = new DirectoryScanner(dataNode, fds, CONF); scanner.setRetainDiffs(true); FsDatasetTestUtil.stopLazyWriter(cluster.getDataNodes().get(0));
CONF.setInt(DFSConfigKeys.DFS_DATANODE_DIRECTORYSCAN_THREADS_KEY, parallelism); scanner = new DirectoryScanner(fds, CONF);
parallelism); DataNode dataNode = cluster.getDataNodes().get(0); scanner = new DirectoryScanner(dataNode, fds, CONF); scanner.setRetainDiffs(true);