-
Notifications
You must be signed in to change notification settings - Fork 3
Operations
#Operations
Operation is defined as some action that Apache Storm performs over ever coming data item (or batch of items) on one specific type of bolt. For example, it could be calculating the sum of coming values, count how many tuples are processed within the last minute, etc.
Every Apache Storm tuple is converted into Particle which contains data value and also a timestamp. Therefore, all operations are performed on Particles.
There are 2 types of operations that are supported by the proposed library: SingleParticleOperation and ParticleBatchOperation.
##SingleParticleOperation The operation on one Particle is called SingleParticleOperation. When Particle comes to bolt, the Single operation is performed on that Particle, after which the resulting Particle can be transferred further following the topology.
The Operation is repeated for every coming to the bolt Particle.
##ParticleBatchOperation For some algorithms (for example, some grouping algorithms, etc.) it is important that the operation deals with the number of Particles altogether. The operation which should be performed on batch of Particles is called ParticleBatchOperation.
The operation waits until the Batcher sends the required number of Particles together in one batch, and after that calls the function to be performed on the whole batch of Particles.