Tabnine Logo
GroupByContainerCount$TaskGroup.getContainerId
Code IndexAdd Tabnine to your IDE (free)

How to use
getContainerId
method
in
org.apache.samza.container.grouper.task.GroupByContainerCount$TaskGroup

Best Java code snippets using org.apache.samza.container.grouper.task.GroupByContainerCount$TaskGroup.getContainerId (Showing top 4 results out of 315)

origin: org.apache.samza/samza-core_2.12

/**
 * Assigns tasks from the specified list to containers that have fewer containers than indicated
 * in taskCountPerContainer.
 *
 * @param taskCountPerContainer the expected number of tasks for each container.
 * @param taskNamesToAssign     the list of tasks to assign to the containers.
 * @param containers            the containers (as {@link TaskGroup}) to which the tasks will be assigned.
 */
// TODO: Change logic from using int arrays to a Map<String, Integer> (id -> taskCount)
private void assignTasksToContainers(int[] taskCountPerContainer, List<String> taskNamesToAssign,
  List<TaskGroup> containers) {
 for (TaskGroup taskGroup : containers) {
  for (int j = taskGroup.size(); j < taskCountPerContainer[Integer.valueOf(taskGroup.getContainerId())]; j++) {
   String taskName = taskNamesToAssign.remove(0);
   taskGroup.addTaskName(taskName);
   log.info("Assigned task {} to container {}", taskName, taskGroup.getContainerId());
  }
 }
}
origin: org.apache.samza/samza-core_2.10

/**
 * Assigns tasks from the specified list to containers that have fewer containers than indicated
 * in taskCountPerContainer.
 *
 * @param taskCountPerContainer the expected number of tasks for each container.
 * @param taskNamesToAssign     the list of tasks to assign to the containers.
 * @param containers            the containers (as {@link TaskGroup}) to which the tasks will be assigned.
 */
// TODO: Change logic from using int arrays to a Map<String, Integer> (id -> taskCount)
private void assignTasksToContainers(int[] taskCountPerContainer, List<String> taskNamesToAssign,
  List<TaskGroup> containers) {
 for (TaskGroup taskGroup : containers) {
  for (int j = taskGroup.size(); j < taskCountPerContainer[Integer.valueOf(taskGroup.getContainerId())]; j++) {
   String taskName = taskNamesToAssign.remove(0);
   taskGroup.addTaskName(taskName);
   log.info("Assigned task {} to container {}", taskName, taskGroup.getContainerId());
  }
 }
}
origin: org.apache.samza/samza-core_2.11

/**
 * Assigns tasks from the specified list to containers that have fewer containers than indicated
 * in taskCountPerContainer.
 *
 * @param taskCountPerContainer the expected number of tasks for each container.
 * @param taskNamesToAssign     the list of tasks to assign to the containers.
 * @param containers            the containers (as {@link TaskGroup}) to which the tasks will be assigned.
 */
// TODO: Change logic from using int arrays to a Map<String, Integer> (id -> taskCount)
private void assignTasksToContainers(int[] taskCountPerContainer, List<String> taskNamesToAssign,
  List<TaskGroup> containers) {
 for (TaskGroup taskGroup : containers) {
  for (int j = taskGroup.size(); j < taskCountPerContainer[Integer.valueOf(taskGroup.getContainerId())]; j++) {
   String taskName = taskNamesToAssign.remove(0);
   taskGroup.addTaskName(taskName);
   log.info("Assigned task {} to container {}", taskName, taskGroup.getContainerId());
  }
 }
}
origin: org.apache.samza/samza-core

/**
 * Assigns tasks from the specified list to containers that have fewer containers than indicated
 * in taskCountPerContainer.
 *
 * @param taskCountPerContainer the expected number of tasks for each container.
 * @param taskNamesToAssign     the list of tasks to assign to the containers.
 * @param containers            the containers (as {@link TaskGroup}) to which the tasks will be assigned.
 */
// TODO: Change logic from using int arrays to a Map<String, Integer> (id -> taskCount)
private void assignTasksToContainers(int[] taskCountPerContainer, List<String> taskNamesToAssign,
  List<TaskGroup> containers) {
 for (TaskGroup taskGroup : containers) {
  for (int j = taskGroup.size(); j < taskCountPerContainer[Integer.valueOf(taskGroup.getContainerId())]; j++) {
   String taskName = taskNamesToAssign.remove(0);
   taskGroup.addTaskName(taskName);
   log.info("Assigned task {} to container {}", taskName, taskGroup.getContainerId());
  }
 }
}
org.apache.samza.container.grouper.taskGroupByContainerCount$TaskGroupgetContainerId

Popular methods of GroupByContainerCount$TaskGroup

  • <init>
  • addTaskName
  • removeTask
  • size

Popular in Java

  • Updating database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setScale (BigDecimal)
  • getContentResolver (Context)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Path (java.nio.file)
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • BoxLayout (javax.swing)
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now