Codota Logo
PartitionConsumerResult
Code IndexAdd Codota to your IDE (free)

How to use
PartitionConsumerResult
in
co.cask.cdap.api.dataset.lib

Best Java code snippets using co.cask.cdap.api.dataset.lib.PartitionConsumerResult (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: cdapio/cdap

 /**
  * @param limit limit to be applied while consuming partitions
  * @param predicate predicate to be applied while consuming partitions
  * @return a list of {@link Partition}s of the underlying {@link 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<PartitionDetail> consumePartitions(int limit, Predicate<PartitionDetail> predicate) {
  PartitionConsumerResult partitionConsumerResult =
   partitionedFileSet.consumePartitions(partitionConsumerState, limit, predicate);
  partitionConsumerState = partitionConsumerResult.getPartitionConsumerState();
  return partitionConsumerResult.getPartitions();
 }
}
origin: cdapio/cdap

return new PartitionConsumerResult(new PartitionConsumerState(scanUpTo, inProgressBeforeScanEnd),
                  partitions);
origin: co.cask.cdap/cdap-data-fabric

return new PartitionConsumerResult(new PartitionConsumerState(scanUpTo, inProgressBeforeScanEnd),
                  partitions);
origin: co.cask.cdap/cdap-data-fabric

 /**
  * @param limit limit to be applied while consuming partitions
  * @param predicate predicate to be applied while consuming partitions
  * @return a list of {@link Partition}s of the underlying {@link 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<PartitionDetail> consumePartitions(int limit, Predicate<PartitionDetail> predicate) {
  PartitionConsumerResult partitionConsumerResult =
   partitionedFileSet.consumePartitions(partitionConsumerState, limit, predicate);
  partitionConsumerState = partitionConsumerResult.getPartitionConsumerState();
  return partitionConsumerResult.getPartitions();
 }
}
origin: cdapio/cdap

/**
 * Populates the ConsumerWorkingSet by fetching partitions from the given PartitionedFileSet.
 *
 * @param partitionedFileSet the PartitionedFileSet to fetch partitions from
 * @param configuration the ConsumerConfiguration which defines parameters for consuming
 */
public void populate(PartitionedFileSet partitionedFileSet, ConsumerConfiguration configuration) {
 int numToPopulate = configuration.getMaxWorkingSetSize() - partitions.size();
 Predicate<PartitionDetail> predicate = configuration.getPartitionPredicate();
 co.cask.cdap.api.dataset.lib.PartitionConsumerResult result =
  partitionedFileSet.consumePartitions(partitionConsumerState, numToPopulate, predicate);
 List<PartitionDetail> partitions = result.getPartitions();
 for (PartitionDetail partition : partitions) {
  addPartition(partition.getPartitionKey());
 }
 partitionConsumerState = result.getPartitionConsumerState();
}
co.cask.cdap.api.dataset.libPartitionConsumerResult

Javadoc

Returns access to an iterator of the requested partitions as well as a PartitionConsumerState which can be used to request partitions created after the previous request of partitions.

Most used methods

  • getPartitionConsumerState
  • getPartitions
  • <init>

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • putExtra (Intent)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Socket (java.net)
    Provides a client-side TCP socket.
  • TreeSet (java.util)
    A NavigableSet implementation based on a TreeMap. The elements are ordered using their Comparable, o
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now