List of usage examples for org.apache.hadoop.hdfs DFSClient delete
public boolean delete(String src, boolean recursive) throws IOException
From source file:org.opencloudengine.flamingo.mapreduce.util.HdfsUtils.java
License:Apache License
/** * .//from w w w. j a v a 2 s. co m * * @param client DFS Client * @param path * @param recursive Recusive ? * @return <tt>true</tt> * @throws java.io.IOException ?? */ public static boolean remove(DFSClient client, String path, boolean recursive) throws IOException { if (client.exists(path)) { logger.info(" [{}] ?? . Recursive [{}]", path, recursive); return client.delete(path, recursive); } logger.info(" [{}] ?? .", path); return false; }