Java Hadoop分布式系统文件操作(2)

public static void main(String[] args)
 {
  try {
  DFSOperator.createFile("/lory/test1.txt", true);
  DFSOperator.deleteFile("/dfs_operator.txt", true);
  DFSOperator.writeStringToDFSFile("/lory/test1.txt", "You are a bad man.\nReally?\n");
  System.out.println(DFSOperator.readDFSFileToString("/lory/test1.txt"));
  } catch (IOException e) {
  // TODO Auto-generated catch block
  e.printStackTrace();
  }
  System.out.println("===end===");
 }
}

--------------------------------------分割线 --------------------------------------

Ubuntu 13.04上搭建Hadoop环境

Ubuntu 12.10 +Hadoop 1.2.1版本集群配置

Ubuntu上搭建Hadoop环境(单机模式+伪分布模式)

Ubuntu下Hadoop环境的配置

单机版搭建Hadoop环境图文教程详解

--------------------------------------分割线 --------------------------------------

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/bdd0f7700c1cf0e318b822027429f9d1.html