Grouping
Thursday, February 24, 2011
11:50 AM
Now we have the schema: 
failure2: (user:chararray, subnet:chararray)
But, an incident is specific to one login name, so we group by that: 
users = GROUP failure2 by user;
Now our schema is 
users: (group: chararray, failure2:{(user:chararray, subnet:chararray)})
Now we don't need the user in the subsets, so let's project that out:
user2 = FOREACH users GENERATE group as user, failure2.subnet as locations; 
Now our schema is:
user2: (user:chararray, locations:{(subnet:chararray)})