import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
public class nkdirDemo {
public static void main(String [] args) throws IOException, URISyntaxException {
FileSystem fs = FileSystem.get(new URI("hdfs://Master:9000"), new Configuration());
fs.mkdirs(new Path("/aaa/bbb/ccc"));
fs.create(new Path("/aaa/bbb/ccc/ddd.txt"));
fs.delete(new Path("/user/hadoop/file4.abc"));
fs.close();
}
}