Window->Show View->Other选择Map/Reduce,在面板中单击右键,选择 New Hadoop Location,在General选项里,因为之前fs.defaultFS的值设置为hdfs://172.26.5.187:9000,所以DFS Master 的 Port 写为9000,Location Name随便写,比如我写成187Hadoop,Map/Reduce(V2) Master的Host写172.26.5.187。最后点击Finish则完成配置。
配置完成后Project Explorer 中有DFS Location。双击下面的187Hadoop则可查看187集群下的HDFS文件了。
但通过WIN7连接远程linux的Hadoop集群会报错,比如后面Myeclipse用程序执行程序,可能会报如下错:
....................................
INFO client.RMProxy: Connecting to ResourceManager at Master/172.26.5.187:8032
INFO mapreduce.JobSubmitter: Cleaning up the staging area /tmp/hadoop-yarn/staging/SL/.staging/job_1452581976741_0001
Exception in thread "main" org.apache.hadoop.security.AccessControlException: Permission denied: user=SL, access=EXECUTE, inode="/tmp":hadoop:supergroup:drwxrwx---
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkFsPermission(FSPermissionChecker.java:271)
......................
Caused by: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.AccessControlException): Permission denied: user=SL, access=EXECUTE, inode="/tmp":hadoop:supergroup:drwxrwx---
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkFsPermission(FSPermissionChecker.java:271)
..........................