2013-09-05 25 views
0

我有一个“失败的映射任务超出允许的限制”错误,但我使用C#运行MapReduce示例应用程序,如下所示。 任何人都可以告诉我为什么它会一直向我显示这个错误吗? 欣赏它。“失败的映射任务超出允许的限制”来自Hadoop的错误

  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,Type = 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

+1

如果你能显示失败的地图任务输出是什么,这将是有帮助的。 – xdumaine

回答

1

此错误表明,太多的地图任务都失败了。可能有n这个原因的数量。没有任何日志或跟踪,很难正确地告诉你一些事情,但你可以尝试看看失败的映射器的踪迹。它会给你一个更好的想法。只需将您的浏览器设为JobTracker webui(JobTracker_Host:50030)。在那里你可以找到所有失败的工作。去这个特定的工作,并点击它。这会告诉你所有的地图(已完成和失败)。点击失败的映射器并选择全部选项任务日志列在下一页。你可以在这里找到完整的痕迹。

HTH

+0

我附上如下日志。 https://www.dropbox.com/s/no8wiruvc70mi04/_user_Administrator_Output_CodeFiles__logs_history_job_201309041952_0030_conf.xml –

1

我相信,有些点是值得被检查: 1.如果在程序运行的管理; 2.如果可执行文件存在(日志文件中的路径); 3.如果.net框架的版本正在运行; 4.如果建筑目标是x64而不是x86

为什么不从#4开始?它可能会导致加载DLL的异常,虽然该文件在那里。

相关问题