#!/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
任何人都可以帮忙吗?为什么我没有得到。男性的权利??