Package com.illumon.iris.db.v2
Class EvenlyDividedTableMap
java.lang.Object
com.illumon.iris.db.v2.EvenlyDividedTableMap
public class EvenlyDividedTableMap extends Object
Divide a table evenly into slices and put the slices into a TableMap.
This enables the use of parallelism on a table without the full cost of a byExternal operation.
-
Method Summary
Modifier and Type Method Description static TableMap
makeEvenlyDividedTableMap(Table table, int divisions, int minimumSize)
Divide the table into even slices, inserting the results into a TableMap.
-
Method Details
-
makeEvenlyDividedTableMap
Divide the table into even slices, inserting the results into a TableMap.This method is intended to be used to enable parallelism by creating a TableMap without the cost of a full byExternal. It is important to note that any natural boundaries in the data are not respected, thus when doing operations in parallel and calling
TransformableTableMap.merge()
the result is very likely not the same as doing the operations individually. Care must be taken to preserve your desired semantics.- Parameters:
table
- the table to dividedivisions
- how many divisions should be created, you may want to align this value withTableMapTransformThreadPool.getTransformThreads()
.minimumSize
- the minimum size of each division- Returns:
- a TableMap with constituents representing the slices of the original table
-