Hello:
    In the org.apache.nutch.fetcher.FetcherReducer.QueueFeeder Class, there is 
a run methmod.
    I wan to make It look like more simply, maybe.


    public void run() {
         ...   
        while (hasMore) {
+        currentIter = context.getValues().iterator();
          if (System.currentTimeMillis() >= timelimit && timelimit != -1) {
            // enough .. lets' simply
            // read all the entries from the input without processing them
            while (currentIter.hasNext()) {
              currentIter.next();
              timelimitcount++;
            }
            hasMore = context.nextKey();
-           if (hasMore) {
-            currentIter = context.getValues().iterator();
-           }
            continue;
          }
         ...
        if (currentIter.hasNext()) {
            continue; // finish items in current list before reading next key
          }
          hasMore = context.nextKey();
-         if (hasMore) {
-           currentIter = context.getValues().iterator();
-         }
        }   ...


Thanks 
HeChuan

Reply via email to