Examples of Values


Examples of backtype.storm.tuple.Values

    if (!MyUtilities.isAckEveryTuple(_conf))
      if (_hierarchyPosition == FINAL_COMPONENT) {
        if (!_hasSentEOF) {
          _hasSentEOF = true; // to ensure we will not send multiple
          // EOF per single spout
          _collector.emit(SystemParameters.EOF_STREAM, new Values(SystemParameters.EOF));
        }
      } else if (!_hasSentLastAck) {
        _hasSentLastAck = true;
        final List<String> lastTuple = new ArrayList<String>(
            Arrays.asList(SystemParameters.LAST_ACK));
        _collector.emit(new Values("N/A", lastTuple, "N/A"));
      }
  }
View Full Code Here

Examples of backtype.storm.tuple.Values

  private void sendEOF() {
    if (MyUtilities.isAckEveryTuple(_conf))
      if (_pendingTuples == 0)
        if (!_hasSentEOF) {
          _hasSentEOF = true;
          _collector.emit(SystemParameters.EOF_STREAM, new Values(SystemParameters.EOF));
        }
  }
View Full Code Here

Examples of backtype.storm.tuple.Values

    if (relIndex == 1)
      index = _componentIndexRel1;
    else
      index = _componentIndexRel2;

    final Values stormTupleSnd = MyUtilities.createTupleValues(tuple, 0, index, _hashIndexes,
        _hashExpressions, _conf);
    MyUtilities.sendTuple(stormTupleSnd, _collector, _conf);
  }
View Full Code Here

Examples of backtype.storm.tuple.Values

      _targetBuffers[i] = new StringBuffer("");

      if (!tupleString.isEmpty())
        // some buffers might be empty
        if (MyUtilities.isCustomTimestampMode(_conf))
          _collector.emit(new Values(_componentIndex, tupleString, _targetTimestamps[i]));
        else
          _collector.emit(new Values(_componentIndex, tupleString));
    }
  }
View Full Code Here

Examples of backtype.storm.tuple.Values

        .equalsIgnoreCase(SystemParameters.DUMP_RESULTS_STREAM);
  }

  // non-ManualBatchMode
  private void regularTupleSend(List<String> tuple, Tuple stormTupleRcv, long timestamp) {
    final Values stormTupleSnd = MyUtilities.createTupleValues(tuple, timestamp,
        _componentIndex, _hashIndexes, _hashExpressions, _conf);
    MyUtilities.sendTuple(stormTupleSnd, stormTupleRcv, _collector, _conf);
  }
View Full Code Here

Examples of backtype.storm.tuple.Values

      List<ValueExpression> hashExpressions, Map conf) {

    final String outputTupleHash = MyUtilities.createHashString(tuple, hashIndexes,
        hashExpressions, conf);
    if (MyUtilities.isCustomTimestampMode(conf))
      return new Values(componentIndex, tuple, outputTupleHash, timestamp);
    else
      return new Values(componentIndex, tuple, outputTupleHash);
  }
View Full Code Here

Examples of backtype.storm.tuple.Values

    else
      return new Values(componentIndex, tuple, outputTupleHash);
  }

  public static Values createUniversalFinalAckTuple(Map map) {
    final Values values = new Values();
    values.add("N/A");
    if (!MyUtilities.isManualBatchingMode(map)) {
      final List<String> lastTuple = new ArrayList<String>(
          Arrays.asList(SystemParameters.LAST_ACK));
      values.add(lastTuple);
      values.add("N/A");
    } else
      values.add(SystemParameters.LAST_ACK);
    if (MyUtilities.isCustomTimestampMode(map))
      values.add(0);
    return values;
  }
View Full Code Here

Examples of backtype.storm.tuple.Values

    if (numRemainingParents == 0)
      // this task received from all the parent tasks
      // SystemParameters.LAST_ACK
      if (hierarchyPosition != StormComponent.FINAL_COMPONENT) {
        // if this component is not the last one
        final Values values = createUniversalFinalAckTuple(conf);
        collector.emit(values);
      } else
        collector.emit(SystemParameters.EOF_STREAM, new Values(SystemParameters.EOF));
    collector.ack(stormTupleRcv);
  }
View Full Code Here

Examples of backtype.storm.tuple.Values

        // timestamp has to be removed
        final String parts[] = tupleString.split("\\@");
        lineageTimestamp = Long.valueOf(new String(parts[0]));
        tupleString = new String(parts[1]);
      }
      final Values tplSend = new Values(emitterIndex, MyUtilities.stringToTuple(tupleString,
          getConf()), "N/A", _currentEpochNumber);
      appendTimestampExisting(tplSend, lineageTimestamp);

      getCollector().emit(SystemParameters.ThetaDataMigrationJoinerToReshuffler, tplSend);
    }
View Full Code Here

Examples of backtype.storm.tuple.Values

              + " has reached end of DataMigration" + " actualID: " + _thisTaskID
              + " got:" + _currentNumberOfAckedReshufflerWorkersTasks + "/"
              + _numParentTasks);
          _currentNumberOfAckedReshufflerWorkersTasks = 0;
          getCollector().emitDirect(_AdvisorIndex, SystemParameters.ThetaJoinerAcks,
              new Values(SystemParameters.ThetaAckDataMigrationEnded));
        }
      }
    }
    /**
     * Case 2 or 3) tuples only from the reshuffler; either
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.