package com.ibeifeng.hadoop.senior.hdfs;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
public class HdfsApp {
public static FileSystem getFileSystem() throws Exception{
Configuration conf = new Configuration();
FileSystem fileSystem = FileSystem.get(conf);
return fileSystem;
}
public static void main(String[] args) throws Exception {
FileSystem filesystem = getFileSystem();
}
}
HDFS Java API使用之获取FileSystem对象
猜你喜欢
转载自blog.csdn.net/Chen6810/article/details/81481741
今日推荐
周排行