

http://192.168.26.50:50070/dfshealth.html#tab-overview
@Test
public void testApi1(){
Configuration configuration = new Configuration();
Path path = new Path("/hdfsapi/test");
try {
FileSystem fs = FileSystem.get(new URI(“hdfs://192.168.26.50:8020”),configuration,“root”);
boolean f = fs.mkdirs(path);//创建目录
System.out.println(f);
} catch (IOException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
} catch (URISyntaxException e) {
e.printStackTrace();
}
}