public class ColumnRangePartitioner extends java.lang.Object implements Partitioner
| Constructor and Description |
|---|
ColumnRangePartitioner() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,ExecutionContext> |
partition(int gridSize)
Partition a database table assuming that the data in the column specified
are uniformly distributed.
|
void |
setColumn(java.lang.String column)
The name of the column to partition.
|
void |
setDataSource(javax.sql.DataSource dataSource)
The data source for connecting to the database.
|
void |
setTable(java.lang.String table)
The name of the SQL table the data are in.
|
public void setTable(java.lang.String table)
table - the name of the tablepublic void setColumn(java.lang.String column)
column - the column name.public void setDataSource(javax.sql.DataSource dataSource)
dataSource - a DataSourcepublic java.util.Map<java.lang.String,ExecutionContext> partition(int gridSize)
minValue and maxValue specifying the range of
values to consider in each partition.partition in interface PartitionergridSize - the size of the map to returnPartitioner.partition(int)