类 ColumnRangePartitioner

  • 所有已实现的接口:
    Partitioner

    public class ColumnRangePartitioner
    extends java.lang.Object
    implements Partitioner
    Simple minded partitioner for a range of values of a column in a database table. Works best if the values are uniformly distributed (e.g. auto-generated primary key values).
    作者:
    Dave Syer
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型方法说明
      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.
      voidsetColumn​(java.lang.String column)
      The name of the column to partition.
      voidsetDataSource​(javax.sql.DataSource dataSource)
      The data source for connecting to the database.
      voidsetTable​(java.lang.String table)
      The name of the SQL table the data are in.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 方法详细资料

      • setTable

        public void setTable​(java.lang.String table)
        The name of the SQL table the data are in.
        参数:
        table - the name of the table
      • setColumn

        public void setColumn​(java.lang.String column)
        The name of the column to partition.
        参数:
        column - the column name.
      • setDataSource

        public void setDataSource​(javax.sql.DataSource dataSource)
        The data source for connecting to the database.
        参数:
        dataSource - a DataSource
      • partition

        public java.util.Map<java.lang.String,​ExecutionContextpartition​(int gridSize)
        Partition a database table assuming that the data in the column specified are uniformly distributed. The execution context values will have keys minValue and maxValue specifying the range of values to consider in each partition.
        指定者:
        partition 在接口中 Partitioner
        参数:
        gridSize - the size of the map to return
        返回:
        a map from identifier to input parameters
        另请参阅:
        Partitioner.partition(int)