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对象
最新推荐文章于 2021-11-04 18:32:49 发布