In hadoop - Map-Reduce error with filesplit -


When I use the bottom row in the map class:

  string filename = ( (FileScript) Context.getInputSplit ()). GetPath () GetName (); Println (file name);  

I got an empty output file. In addition, the console has the last two lines:

  14/05/06 12:52:53 INFO mapred .JobClient: map output record = 0 14/05/06 12:52:53 information mapred.JobClient: SPLIT_RAW_BYTES = 2127  

The problem is with the system .out.println () , you will not get the result in the console. You must check your logs

or very simple: use a logger!

  1. Required import class for logging

      import org.apache.commons logging.Log; Import org.apache.commons.logging.LogFactory;  
  2. Define logger

      Private Static Last Log LOG = LogFactory.getLog (MyClass.class);  
  3. Log in to whatever you need

      LOG.info (fileName);  

You will get results during the job execution in the console.


Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -