Package backtype.storm.transactional.state

Examples of backtype.storm.transactional.state.RotatingTransactionalState


      List<String> existingPartitions = _state.list("");
      for (String p : existingPartitions) {
        int partition = Integer.parseInt(p);
        if ((partition - _index) % _numTasks == 0) {
          _partitionStates.put(partition,
              new RotatingTransactionalState(_state, p));
        }
      }
    }
View Full Code Here


      } else {
        prevCached = new HashMap<Integer, Object>();
      }

      for (int i = _index; i < partitions; i += _numTasks) {
        RotatingTransactionalState state = _partitionStates.get(i);
        if (state == null) {
          state = new RotatingTransactionalState(_state, "" + i);
          _partitionStates.put(i, state);
        }
        state.removeState(tx.getTransactionId());
        Object lastMeta = prevCached.get(i);
        if (lastMeta == null)
          lastMeta = state.getLastState();
        Object meta = _emitter.emitPartitionBatch(tx, collector, i,
            lastMeta);
        metas.put(i, meta);
      }
    }
View Full Code Here

TOP

Related Classes of backtype.storm.transactional.state.RotatingTransactionalState

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.