请问这样创建的hdfs文件夹在hdfs中怎么看不到呢
- 请问这样创建的hdfs文件夹在hdfs中怎么看不到呢
- import java.io.IOException;
-
- import org.apache.hadoop.conf.Configuration;
- import org.apache.hadoop.fs.FileSystem;
- import org.apache.hadoop.fs.Path;
-
-
- public class CreateHdfsDir {
- public static void main(String args[]) throws IOException{
- Configuration conf = new Configuration();
- FileSystem fs = FileSystem.get(conf);
- Path p = new Path("/data/dir");
- fs.mkdirs(p);
- System.out.println("fileexit: "+fs.exists(p));
- }
- }
复制代码
|