Home > other > Java graphs wordcount statistical occurrences
Java graphs wordcount statistical occurrences
Time:10-01
First apologize, I didn't find graphs of the plate, so we have to put this question to the coming To trouble you again a great god! The problem is this: If at the time of the day, each hour of the web access record how many times, and how many users are in so many visit record, the original format is as follows: Hourid url 0 com 0 com 0 cn Zero net 1 org 2 com 2 com 2 cn .
Output format is similar to the following: Hourid visitscount userscount 0 4 3 1 1 1 2, 3, 2
A time period there were a few access records, visitscount is few; Userscount refers to (com, cn,.net) If the kind of implementation method with wordcount, are summed up according to the key value, complete the function of the above two don't want to write a Java program, but I want to output to a document at the same time, really don't know how the format of the output as shown above, also please great god action, Or tell me the implementation approach can also, I now is a confused, thanks again!!
CodePudding user response:
The Map key output for hourid, the value for the url Reduce iterative processing values inside, the size of the values is visitscount, values is to repeat userscount A graphs