2013-09-05 24 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的異常,雖然該文件在那裏。

相關問題