@Override public final void lcompute() {
    if( _hi-_lo >= 2 ) { // Multi-key case: just divide-and-conquer to 1 key
      final int mid = (_lo+_hi)>>>1; // Mid-point
      assert _left == null && _rite == null;
      T l = clone();
      T r = clone();
      _left = l; l._reservedMem = 0;
      _rite = r; r._reservedMem = 0;
      _left._hi = mid;          // Reset mid-point
      _rite._lo = mid;          // Also set self mid-point
      setPendingCount(1);
      // Compute min. memory required to run the right branch in parallel.  Min
      // memory equals to the max memory used if the right branch will be
      // executed single threaded (but in parallel with our left branch).
      // Assuming all memory is kept in the tasks and it is halved by reduce
      // operation, the min memory is proportional to the depth of the right
      // subtree.
      long reqMem = (log2(_hi - mid)+3)*memOverheadPerChunk();

      if(!_runSingleThreaded && MemoryManager.tryReserveTaskMem(reqMem)){
        _reservedMem += reqMem;   // Remember the amount of reserved memory to free it later.
        _left.fork();             // Runs in another thread/FJ instance
      } else {
        _left.compute2();
      }
      _rite.compute2();         // Runs in THIS F/J thread
    } else {
      if( _hi > _lo ) {         // Single key?
        try {
          map(_keys[_lo]);      // Get it, run it locally
        } catch( RuntimeException re ) { // Catch user-map-thrown exceptions
          throw H2O.setDetailMessage(re,re.getMessage()+" while mapping key "+_keys[_lo]);
        } catch( AssertionError re ) { // Catch user-map-thrown exceptions
          throw H2O.setDetailMessage(re,re.getMessage()+" while mapping key "+_keys[_lo]);
        } catch( OutOfMemoryError re ) { // Catch user-map-thrown exceptions
          throw H2O.setDetailMessage(re,re.getMessage()+" while mapping key "+_keys[_lo]);
        }
      }
      tryComplete();            // And this task is complete
    }
  }
@ Override public final void lcompute ( ) { if ( _hi - _lo >= 2 ) { final int mid = ( _lo + _hi ) > > > 1 ; assert _left == null && _rite == null ; T l = clone ( ) ; T r = clone ( ) ; _left = l ; l . _reservedMem = 0 ; _rite = r ; r . _reservedMem = 0 ; _left . _hi = mid ; _rite . _lo = mid ; setPendingCount ( 1 ) ; long reqMem = ( log2 ( _hi - mid ) + 3 ) * memOverheadPerChunk ( ) ; if ( ! _runSingleThreaded && MemoryManager . tryReserveTaskMem ( reqMem ) ) { _reservedMem += reqMem ; _left . fork ( ) ; } else { _left . compute2 ( ) ; } _rite . compute2 ( ) ; } else { if ( _hi > _lo ) { try { map ( _keys [ _lo ] ) ; } catch ( RuntimeException re ) { throw H2O . setDetailMessage ( re , re . getMessage ( ) + " while mapping key " + _keys [ _lo ] ) ; } catch ( AssertionError re ) { throw H2O . setDetailMessage ( re , re . getMessage ( ) + " while mapping key " + _keys [ _lo ] ) ; } catch ( OutOfMemoryError re ) { throw H2O . setDetailMessage ( re , re . getMessage ( ) + " while mapping key " + _keys [ _lo ] ) ; } } tryComplete ( ) ; } }
Do all the keys in the list associated with this Node.  Roll up the
results into <em>this</em> MRTask.