hdfs文件系统api操作
hdfs具体的安装方法参考前文(cm5.4和cdh5.4安装http://my.oschina.net/penngo/blog/517223) 这里只介绍java对hdfs文件系统的操作,下图是需要用到的包(这里包括hbase相关包) import java.io.IOException; import java.net.URI; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; public class HdfsTest { private FileSystem fileSystem = null; private Configuration config = null; public HdfsTest() { } public void connect() throws Exception { String uri =