Mapreduce method for triangle enumeration and apparatus thereof