List of usage examples for org.apache.hadoop.hdfs.tools DFSck DFSck
public DFSck(Configuration conf) throws IOException
From source file:org.smartfrog.services.hadoop.operations.dfs.DfsFsckImpl.java
License:Open Source License
/** * call {@link DFSck} to check the filesystem. This may take an indeterminate amount of time. * * @throws Exception on any failure/*from ww w . ja v a 2 s . com*/ */ @Override protected void performDfsOperation(FileSystem fileSystem, ManagedConfiguration conf) throws Exception { DFSck fsck = new DFSck(conf); List<String> args = new ArrayList<String>(); addIfSet(args, "move"); addIfSet(args, "delete"); addIfSet(args, "blocks"); addIfSet(args, "locations"); addIfSet(args, "racks"); addIfSet(args, "openForWrite", "-openforwrite"); String[] argv = args.toArray(new String[args.size()]); fsck.run(argv); }