Sie sind auf Seite 1von 1

dayGroupedHosts = dayToHostPairTuple.

reducebyKey(lambda a, b : a + b)
dayHostCount = dayGroupedHosts.map(lambda x:x)
dailyHosts = (dayHostCount
.sortByKey()
.cache()
)
dailyHostsList = dailyHosts.take(30)
print 'Unique hosts per day: %s' % dailyHostsList

Das könnte Ihnen auch gefallen