title: hadoop - Map reduce on multiple cluster
body: <p>I have configured Hadoop cluster . And im having two machines <strong>MA</strong> and <strong>MB</strong>
  When i run the mapreduce program using the following code </p>
  
  <pre><code> hadoop  jar /HDP/hadoop-1.2.0.1.3.0.0-0380/contrib/streaming/hadoop-streaming-1.2.0.1.3.0.0-0380.jar  -mapper "python C:\Python33\mapper.py"  -reducer "python C:\Python33\redu.py"  -input "/user/XXXX/input/input.txt"  -output "/user/XXXX/output/out20131112_09"
  </code></pre>
  
  <p><strong>where : mapper - C:\Python33\mapper.py and reducer C:\Python33\redu.py is in  MB's local disk</strong> </p>
  
  <p><strong>UPDATE</strong>
  <img src="https://i.stack.imgur.com/wsG0J.png" alt="enter image description here"></p>
  
  <p>Finally i have tracked down the error .</p>
  
  <p>MA- error log </p>
  
  <pre><code>stderr logs
  python: can't open file 'C:\Python33\mapper.py': [Errno 2] No such file or directory
  java.lang.RuntimeException: PipeMapRed.waitOutputThreads(): subprocess failed with code 2
  </code></pre>
  
  <p><strong>mapper - C:\Python33\mapper.py and reducer C:\Python33\redu.py is in  MA's local disk</strong> and it is not in <strong>MB</strong> </p>
  
  <p>Now , Do i need to copy my m/r program to <strong>MA</strong> or how shall i resolve this </p>
  
  <p><strong>Mapper</strong></p>
  
  <pre><code>import sys
  for line in sys.stdin:
     line = line.strip()
     keys = line.split()
     for key in keys:
         value = 1
         print( '%s \t %d' % (key, value))
  </code></pre>