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

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

Best Java code snippets using co.cask.cdap.api.dataset.lib.PartitionConsumerResult.getPartitionConsumerState (Showing top 3 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: 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.libPartitionConsumerResultgetPartitionConsumerState

Popular methods of PartitionConsumerResult

  • getPartitions
  • <init>

Popular in Java

  • Making http post requests using okhttp
  • getApplicationContext (Context)
  • getExternalFilesDir (Context)
  • getContentResolver (Context)
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • JTextField (javax.swing)
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