Mapreduce代码运行但未提供所需的输出

时间:2018-07-12 09:00:59

标签: python-3.x mapreduce bigdata

#!/usr/bin/python2
mapper1.py
import sys
for line in sys.stdin:
   a=line.split(",")    
   print (a[7])

Rducer1.py
#!/usr/bin/python2

import sys
fcounter=0
mcounter=0
for i in sys.stdin:
    i.strip()
    if i=="Male":
    mcounter+=1
    else:
    fcounter+=1
tot=mcounter+fcounter
print ("Total no. of Candidates:-"+str(tot))        
print ("No. of females:- "+str(fcounter))
print ("No. of males:- "+str(mcounter))

this is output on hadoop cluster

数据集 Aadhar Card Dataset

任何人都可以帮忙吗?为什么我没有得到。男性的权利??

0 个答案:

没有答案