package com.chuanzhi.boke;
import java.io.IOException;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
public class HDFSMkdir {
public static void main(String[] args) {
//1
Configuration configuration=new Configuration();
try {
Path path=new Path(“/user/hadoop/20131127″);
//2
FileSystem fs=path.getFileSystem(configuration);
//3
fs.mkdirs(path);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println(“f”);
}
}
不是所有的MapReduce程序都要在MapReduce上执行
最新推荐文章于 2023-06-08 10:35:02 发布