PartitionT
- Element type of the column used for partition.public interface JdbcReadWithPartitionsHelper<PartitionT> extends JdbcIO.PreparedStatementSetter<KV<PartitionT,PartitionT>>, JdbcIO.RowMapper<KV<java.lang.Long,KV<PartitionT,PartitionT>>>
JdbcIO.ReadWithPartitions
that handles range calculations.Modifier and Type | Method and Description |
---|---|
java.lang.Iterable<KV<PartitionT,PartitionT>> |
calculateRanges(PartitionT lowerBound,
PartitionT upperBound,
java.lang.Long partitions)
Calculate the range of each partition from the lower and upper bound, and number of partitions.
|
KV<java.lang.Long,KV<PartitionT,PartitionT>> |
mapRow(java.sql.ResultSet resultSet) |
void |
setParameters(KV<PartitionT,PartitionT> element,
java.sql.PreparedStatement preparedStatement) |
java.lang.Iterable<KV<PartitionT,PartitionT>> calculateRanges(PartitionT lowerBound, PartitionT upperBound, java.lang.Long partitions)
Return a list of pairs for each lower and upper bound within each partition.
void setParameters(KV<PartitionT,PartitionT> element, java.sql.PreparedStatement preparedStatement)
setParameters
in interface JdbcIO.PreparedStatementSetter<KV<PartitionT,PartitionT>>
KV<java.lang.Long,KV<PartitionT,PartitionT>> mapRow(java.sql.ResultSet resultSet) throws java.lang.Exception
mapRow
in interface JdbcIO.RowMapper<KV<java.lang.Long,KV<PartitionT,PartitionT>>>
java.lang.Exception