public class SimplePartitionConsumer extends Object
Partitions of a PartitionedFileSet which maintains state in memory.| Constructor and Description |
|---|
SimplePartitionConsumer(co.cask.cdap.api.dataset.lib.PartitionedFileSet partitionedFileSet)
Creates an instance of a SimplePartitionConsumer which begins consuming from the beginning.
|
| Modifier and Type | Method and Description |
|---|---|
List<co.cask.cdap.api.dataset.lib.PartitionDetail> |
consumePartitions() |
List<co.cask.cdap.api.dataset.lib.PartitionDetail> |
consumePartitions(int limit) |
List<co.cask.cdap.api.dataset.lib.PartitionDetail> |
consumePartitions(int limit,
co.cask.cdap.api.Predicate<co.cask.cdap.api.dataset.lib.PartitionDetail> predicate) |
public SimplePartitionConsumer(co.cask.cdap.api.dataset.lib.PartitionedFileSet partitionedFileSet)
partitionedFileSet - the PartitionedFileSet to consume frompublic List<co.cask.cdap.api.dataset.lib.PartitionDetail> consumePartitions()
Partitions of the underlying PartitionedFileSet created since the last call
to this method. This excludes partitions created in in-progress transactions including the one in which the
call to this method is made.public List<co.cask.cdap.api.dataset.lib.PartitionDetail> consumePartitions(int limit)
limit - limit to be applied while consuming partitionsPartitions of the underlying PartitionedFileSet created since the last call
to this method. This excludes partitions created in in-progress transactions including the one in which the
call to this method is made.public List<co.cask.cdap.api.dataset.lib.PartitionDetail> consumePartitions(int limit, co.cask.cdap.api.Predicate<co.cask.cdap.api.dataset.lib.PartitionDetail> predicate)
limit - limit to be applied while consuming partitionspredicate - predicate to be applied while consuming partitionsPartitions of the underlying PartitionedFileSet created since the last call
to this method. This excludes partitions created in in-progress transactions including the one in which the
call to this method is made.Copyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.