Package plan_runner.utilities.thetajoin.dynamic

Examples of plan_runner.utilities.thetajoin.dynamic.BufferedTuple


          _currentCount = 0;
          _currentAccCountALL = _relation1Count * _multFactor;
          _currentAccCount = _currentAccCountALL - _relation2Count;
        }
      } else { // it is the other tuple
        bufferedTuplesRel1.add(new BufferedTuple(inputComponentIndex, inputTupleString,
            inputTupleHash));
        // emit a buffered tuple from the second relation if exists
        if (!bufferedTuplesRel2.isEmpty()) {
          final BufferedTuple bufTup = bufferedTuplesRel2.removeFirst();
          _collector
              .emit(new Values(bufTup.get_componentName(), MyUtilities.stringToTuple(
                  bufTup.get_tupleString(), _conf), bufTup.get_tupleHash()));
          _currentCount++;
          _relation2Count++;
          // LOG.info("Emitting 2: ("+_relation1Count+","+_relation2Count+")");
          // now check if a switch should happen
          if ((_currentCount == _currentAccCount) && (!_isFirstFinished)) {
            _currentRelationPointer = 1;
            _currentCount = 0;
            _currentAccCountALL = _relation2Count * _multFactor;
            _currentAccCount = _currentAccCountALL - _relation1Count;
          }
        }
      }

    } else if (_secondEmitterIndex.equals(inputComponentIndex))
      if (_currentRelationPointer == 2) {
        // send right away
        _collector.emit(new Values(inputComponentIndex, MyUtilities.stringToTuple(
            inputTupleString, _conf), inputTupleHash));
        _currentCount++;
        _relation2Count++;
        // LOG.info("Emitting 2: ("+_relation1Count+","+_relation2Count+")");

        // now check if a switch should happen
        if ((_currentCount == _currentAccCount) && (!_isFirstFinished)) {
          _currentRelationPointer = 1;
          _currentCount = 0;
          _currentAccCountALL = _relation2Count * _multFactor;
          _currentAccCount = _currentAccCountALL - _relation1Count;
        }
      } else { // it is the other tuple
        bufferedTuplesRel2.add(new BufferedTuple(inputComponentIndex, inputTupleString,
            inputTupleHash));
        // emit a buffered tuple from the second relation if exists
        if (!bufferedTuplesRel1.isEmpty()) {
          final BufferedTuple bufTup = bufferedTuplesRel1.removeFirst();
          _collector
              .emit(new Values(bufTup.get_componentName(), MyUtilities.stringToTuple(
                  bufTup.get_tupleString(), _conf), bufTup.get_tupleHash()));
          _currentCount++;
          _relation1Count++;
          // LOG.info("Emitting 1: ("+_relation1Count+","+_relation2Count+")");
          // now check if a switch should happen
          if ((_currentCount == _currentAccCount) && (!_isSecondFinished)) {
View Full Code Here

TOP

Related Classes of plan_runner.utilities.thetajoin.dynamic.BufferedTuple

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.