This topic contains 0 replies, has 1 voice, and was last updated by  Swathi sareddy 4 years, 3 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #244

    Swathi sareddy
    Participant

    lines = LOAD ‘/wordcount’ AS (line:chararray);
    words = FOREACH lines GENERATE FLATTEN(TOKENIZE(line)) as word;
    grouped = GROUP words BY word;
    wordcount = FOREACH grouped GENERATE group, COUNT(words);
    DUMP wordcount;

Viewing 1 post (of 1 total)

The forum ‘Hadoop Developer|Batch-04/06/2014’ is closed to new topics and replies.