I Have an "Failed Map Tasks exceeded allowed limit" Error while I use C# to run the MapReduce example application as show on below. Can any one tell me why it keep showing me this error? Appreciate it.
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>();
}
==============================================================================
The Job tracker log for the error is show as below.
Thanks for all your help.
Unhandled Exception: Microsoft.Hadoop.MapReduce.StreamingException: The user type could not be loaded. 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: Could not load file or assembly 'file:///c:\hadoop\HDFS\mapred\local\taskTracker\Administrator\jobcache\job_201309041952_0030\attempt_201309041952_0030_m_000000_0\work\MRRunner.exe' or one of its dependencies. The system cannot find the file specified.