分享

eclipse初识hadoop时的问题

hljzml2016 发表于 2013-10-16 13:39:01 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 2 5250
本帖最后由 nettman 于 2014-5-27 03:47 编辑

dear 大神们:
昨天刚把hadoop在虚拟机上搭了一下,服务端所有节点都已经起来了。然后就准备用eclipse连接,试试调试。
可是报了下面这个错
13/07/16 10:01:14 INFO security.Groups: Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping; cacheTimeout=300000
13/07/16 10:01:15 INFO jvm.JvmMetrics: Initializing JVM Metrics with processName=JobTracker, sessionId=
Exception in thread "main" org.apache.hadoop.util.Shell$ExitCodeException:
        at org.apache.hadoop.util.Shell.runCommand(Shell.java:256)
        at org.apache.hadoop.util.Shell.run(Shell.java:183)
        at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:376)
        at org.apache.hadoop.util.Shell.execCommand(Shell.java:462)
        at org.apache.hadoop.util.Shell.execCommand(Shell.java:445)
        at org.apache.hadoop.fs.RawLocalFileSystem.execCommand(RawLocalFileSystem.java:543)
        at org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSystem.java:535)
        at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:345)
        at org.apache.hadoop.fs.FilterFileSystem.mkdirs(FilterFileSystem.java:205)
        at org.apache.hadoop.mapreduce.JobSubmissionFiles.getStagingDir(JobSubmissionFiles.java:115)
        at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:316)
        at org.apache.hadoop.mapreduce.Job.submit(Job.java:960)
        at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:976)
        at hadoop.MyDriver.main(MyDriver.java:48)
我这匮乏的hadoop知识实在是没玩明白是怎么个问题啊,求助诸位了。
MyDriver类代码如下(在运行hadoop的时候,运行的是这个类)
public class MyDriver {
        public static void main(String[] args)
                        throws IOException,InterruptedException, ClassNotFoundException {
                Configuration conf = new Configuration();
            String[] otherArgs = new GenericOptionsParser(conf, args).getRemainingArgs();
            if (otherArgs.length != 2) {
              System.err.println("Usage: wordcount ");
              System.exit(2);
            }
            Job job = new Job(conf, "word count");
            job.setJarByClass(MyDriver.class);
            job.setMapperClass(MyMap.class);
            job.setCombinerClass(MyReduce.class);
            job.setReducerClass(MyReduce.class);
            job.setOutputKeyClass(Text.class);
            job.setOutputValueClass(IntWritable.class);
            FileInputFormat.addInputPath(job, new Path(otherArgs[0]));
            FileOutputFormat.setOutputPath(job, new Path(otherArgs[1]));
            System.exit(job.waitForCompletion(true) ? 0 : 1);
        }
}
              
               
               

已有(2)人评论

跳转到指定楼层
u010926176 发表于 2013-10-16 13:39:54

            http://www.24xuexi.com/w/2011-07-13/94853.html
这上面说是Hadoop版本的问题。
        
回复

使用道具 举报

s060403072 发表于 2013-10-16 13:40:44

            http://blog.csdn.net/column/details/hadoop-.html
去研磨hadoop上普及下
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条