1. 程式人生 > >12--配置IDEA遠端除錯Hadoop程式(Hadoop HA下)

12--配置IDEA遠端除錯Hadoop程式(Hadoop HA下)

public class MyUtils {
    public static void deleteDir(Configuration conf, String dirPath) throws IOException{
        FileSystem fs=FileSystem.get(conf);
        Path target=new Path(dirPath);
        if(fs.exists(target)){
            boolean delResult = fs.delete(target,true);
            if(delResult){
                System.out.println(target + " has been deleted sucessfullly.");
            } else {
                System.out.println(target + " deletion failed.");
            }
        }
    }
}