【问题标题】:"Failed Map Tasks exceeded allowed limit" Error from Hadoop来自 Hadoop 的“失败的映射任务超出了允许的限制”错误
【发布时间】:2013-09-05 12:28:20
【问题描述】:

当我使用 C# 运行 MapReduce 示例应用程序时出现“失败的映射任务超出允许的限制”错误,如下所示。 谁能告诉我为什么它一直显示这个错误? 欣赏它。

            public override void Map(string inputLine, MapperContext context)
        {
            //Extract the namespace declarations in the Csharp files
            var reg = new Regex(@"(using)\s[A-za-z0-9_\.]*\;");
            var matches = reg.Matches(inputLine);

            foreach (Match match in matches)
            {
                //Just emit the namespaces.
                context.EmitKeyValue(match.Value, "1");
            }
        }
    }

    //Reducer
    public class NamespaceReducer : ReducerCombinerBase
    {
        //Accepts each key and count the occurrances
        public override void Reduce(string key, IEnumerable<string> values, ReducerCombinerContext context)
        {
            //Write back  
            context.EmitKeyValue(key, values.Count().ToString());
        }
    }

    //Our Namespace counter job
    public class NamespaceCounterJob : HadoopJob<NamespaceMapper, NamespaceReducer>
    {
        public override HadoopJobConfiguration Configure(ExecutorContext context)
        {
            var config = new HadoopJobConfiguration();
            config.InputPath = "Input/CodeFiles";
            config.OutputFolder = "Output/CodeFiles";
            return config;
        }
    }

    static void Main(string[] args)
    {
        var hadoop = Hadoop.Connect();
        var result = hadoop.MapReduceJob.ExecuteJob<NamespaceCounterJob>();

    }

================================================ ================================

错误的作业跟踪日志如下所示。

感谢您的所有帮助。

未处理的异常:Microsoft.Hadoop.MapReduce.StreamingException:无法加载用户类型。 DLL=c:\hadoop\HDFS\mapred\local\taskTracker\Administrator\jobcache\job_201309041952_0030\attempt_201309041952_0030_m_000000_0\work\MRRunner.exe,类型=MRRunner.Program+NamespaceMapper ---> System.IO.FileNotFoundException:无法加载文件或程序集 'file:///c:\hadoop\HDFS\mapred\local\taskTracker\Administrator\jobcache\job_201309041952_0030\attempt_201309041952_0030_m_000000_0\work\MRRunner.exe' 或其依赖项之一。系统找不到指定的文件。

Job Tracker Log

【问题讨论】:

  • 如果您能显示失败的地图任务输出是什么将会很有帮助。

标签: c# hadoop mapreduce


【解决方案1】:

此错误表明太多地图任务失败。这可能有 n 个原因。如果没有任何日志或跟踪,就很难正确地告诉你一些事情,但你可以尝试查看失败的映射器的跟踪。它会让你更好地了解问题。只需将浏览器定位到 JobTracker webui(JobTracker_Host:50030)。在那里你可以找到所有失败的工作。转到这个特定的工作并单击它。这将向您显示所有地图(已完成和失败)。单击失败的映射器,然后在下一页的 Task Logs 列中选择 ALL 选项。你可以在这里找到完整的踪迹。

HTH

【讨论】:

【解决方案2】:

我确实认为有几点值得一试: 1.如果程序以管理员身份运行; 2. 如果有可执行文件(日志文件中的路径); 3. .net framework 版本是否正常; 4。如果构建目标是 x64 而不是 x86

为什么不从#4 开始呢?尽管文件在那里,但它可能会导致加载 dll 的异常。

【讨论】:

    猜你喜欢
    • 2013-01-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-12-11
    • 2020-10-05
    相关资源
    最近更新 更多