The goal is to be able to change the number of partition of a stream. This is needed to change the Computation concurrency settings.
Extend the Stream interface to provide a rebalance operation.
void rebalance(targetParitions)
This will create a new stream with the target partitions, then read all records from the source stream and apply the distribution on the new stream.
Then the source stream is closed and renamed.
The target stream is renamed to the source name.
To dynamically change the computation concurrency, this require to:
1. stop the ComputationManager
2. resize streams according to new Settings
3. start the ComputationManager