Ahh, well that's embarrassing and explains the situation where it runs
for many hours. 

I am still baffled as to the split on delimiter version timing out,
though. 

  String line = value.toString();
  String[] splitLine = line.split(",");
  
  if( splitLine.length >= 5 )
  {
        word.set(splitLine[4]);
        output.collect(word, one);
  }

This runs and times out on map every time.

Thanks.

Maryanne DellaSalla 

-----Original Message-----
From: Ted Dunning [mailto:[email protected]] 
Sent: Tuesday, May 24, 2011 12:25 PM
To: [email protected]
Subject: Re: Simple change to WordCount either times out or runs 18+ hrs
with little progress

itr.nextToken() is inside the if.

On Tue, May 24, 2011 at 7:29 AM, <[email protected]> wrote:

>    while (itr.hasMoreTokens()) {
>        if(count == 5)
>        {
>                word.set(itr.nextToken());
>                output.collect(word, one);
>        }
>        count++;
>      }
>

Reply via email to