关于hdfs的极限编程挑战

关于HDFS的极限编程挑战

  一.下载安装Linux版本的eclipse。

  1.下载路径 http://mirrors.neusoft.edu.cn/eclipse/technology/epp/downloads/release/luna/SR2/eclipse-jee-luna-SR2-linux-gtk-x86_64.tar.gz

  2.将Eclipse压缩包解压至opt目录下

  [root@localhose download] #sudo tar -zxvf eclipse-jee-luna-SR2-linux-gtk-x86_64.tar.gz -C /opt

  3.将eclipse执行文件链接到用户目录
  [root@localhose download] #sudo ln -s /opt/eclipse/eclipse /usr/bin/eclipse

  4.创建一个启动项

[root@localhose download] #vi /usr/share/applications/eclipse.desktop


添加如下代码:
[Desktop Entry]
Encoding=UTF-8
Name=Eclipse 4.4.2
Comment=Eclipse Luna
Exec=/usr/bin/eclipse
Icon=/opt/eclipse/icon.xpm
Categories=Application;Development;Java;IDE
Version=1.0
Type=Application
Terminal=0

二.代码实现

  

 I import java.io.;
Import java.io.IOException;Import java.io.InputStream;
publIc class Test i
publIc static void rwFile(A
FileWriter fw= null;
BufferedReader br = null;tryl
fw = new FileWriter("zch//hdfsstet2 true);
br = new BufferedReader(new InputStreamReader( new FileInputStream("chhdfss "UTF-8")String line = null;
whIle (line = br.readLine() != null)q
System.out
.println("neirong :"line);fw.write(line);
fw.flush();
br.close();
catch (FileNotFoundException e1)A
e1.printStackTrace(
catch (IOException e2) f
e2.printStackTrace0

 

posted on 2018-10-01 16:12  面向bug的程序设计  阅读(102)  评论(0编辑  收藏  举报