Codota Logo
GroupByContainerCount$TaskGroup.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.apache.samza.container.grouper.task.GroupByContainerCount$TaskGroup
constructor

Best Java code snippets using org.apache.samza.container.grouper.task.GroupByContainerCount$TaskGroup.<init> (Showing top 8 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: org.apache.samza/samza-core_2.12

/**
 * Creates a list of empty {@link TaskGroup} instances for a range of container id's
 * from the start(inclusive) to end(exclusive) container id.
 *
 * @param startContainerId  the first container id for which a TaskGroup is needed.
 * @param endContainerId    the first container id AFTER the last TaskGroup that is needed.
 * @return                  a set of empty TaskGroup instances corresponding to the range
 *                          [startContainerId, endContainerId)
 */
private List<TaskGroup> createContainers(int startContainerId, int endContainerId) {
 List<TaskGroup> containers = new ArrayList<>(endContainerId - startContainerId);
 for (int i = startContainerId; i < endContainerId; i++) {
  TaskGroup taskGroup = new TaskGroup(String.valueOf(i), new ArrayList<String>());
  containers.add(taskGroup);
 }
 return containers;
}
origin: org.apache.samza/samza-core_2.10

/**
 * Creates a list of empty {@link TaskGroup} instances for a range of container id's
 * from the start(inclusive) to end(exclusive) container id.
 *
 * @param startContainerId  the first container id for which a TaskGroup is needed.
 * @param endContainerId    the first container id AFTER the last TaskGroup that is needed.
 * @return                  a set of empty TaskGroup instances corresponding to the range
 *                          [startContainerId, endContainerId)
 */
private List<TaskGroup> createContainers(int startContainerId, int endContainerId) {
 List<TaskGroup> containers = new ArrayList<>(endContainerId - startContainerId);
 for (int i = startContainerId; i < endContainerId; i++) {
  TaskGroup taskGroup = new TaskGroup(String.valueOf(i), new ArrayList<String>());
  containers.add(taskGroup);
 }
 return containers;
}
origin: org.apache.samza/samza-core_2.11

/**
 * Creates a list of empty {@link TaskGroup} instances for a range of container id's
 * from the start(inclusive) to end(exclusive) container id.
 *
 * @param startContainerId  the first container id for which a TaskGroup is needed.
 * @param endContainerId    the first container id AFTER the last TaskGroup that is needed.
 * @return                  a set of empty TaskGroup instances corresponding to the range
 *                          [startContainerId, endContainerId)
 */
private List<TaskGroup> createContainers(int startContainerId, int endContainerId) {
 List<TaskGroup> containers = new ArrayList<>(endContainerId - startContainerId);
 for (int i = startContainerId; i < endContainerId; i++) {
  TaskGroup taskGroup = new TaskGroup(String.valueOf(i), new ArrayList<String>());
  containers.add(taskGroup);
 }
 return containers;
}
origin: org.apache.samza/samza-core

/**
 * Creates a list of empty {@link TaskGroup} instances for a range of container id's
 * from the start(inclusive) to end(exclusive) container id.
 *
 * @param startContainerId  the first container id for which a TaskGroup is needed.
 * @param endContainerId    the first container id AFTER the last TaskGroup that is needed.
 * @return                  a set of empty TaskGroup instances corresponding to the range
 *                          [startContainerId, endContainerId)
 */
private List<TaskGroup> createContainers(int startContainerId, int endContainerId) {
 List<TaskGroup> containers = new ArrayList<>(endContainerId - startContainerId);
 for (int i = startContainerId; i < endContainerId; i++) {
  TaskGroup taskGroup = new TaskGroup(String.valueOf(i), new ArrayList<String>());
  containers.add(taskGroup);
 }
 return containers;
}
origin: org.apache.samza/samza-core_2.11

/**
 * Converts the task->containerId map to an ordered list of {@link TaskGroup} instances.
 *
 * @param taskToContainerId a map from each task name to the containerId to which it is assigned.
 * @return                  a list of TaskGroups ordered ascending by containerId.
 */
private List<TaskGroup> getOrderedContainers(Map<String, String> taskToContainerId) {
 log.debug("Got task to container map: {}", taskToContainerId);
 // Group tasks by container Id
 HashMap<String, List<String>> containerIdToTaskNames = new HashMap<>();
 for (Map.Entry<String, String> entry : taskToContainerId.entrySet()) {
  String taskName = entry.getKey();
  String containerId = entry.getValue();
  List<String> taskNames = containerIdToTaskNames.get(containerId);
  if (taskNames == null) {
   taskNames = new ArrayList<>();
   containerIdToTaskNames.put(containerId, taskNames);
  }
  taskNames.add(taskName);
 }
 // Build container tasks
 List<TaskGroup> containerTasks = new ArrayList<>(containerIdToTaskNames.size());
 for (int i = 0; i < containerIdToTaskNames.size(); i++) {
  if (containerIdToTaskNames.get(String.valueOf(i)) == null) throw new IllegalStateException("Task mapping is missing container: " + i);
  containerTasks.add(new TaskGroup(String.valueOf(i), containerIdToTaskNames.get(String.valueOf(i))));
 }
 return containerTasks;
}
origin: org.apache.samza/samza-core_2.10

/**
 * Converts the task->containerId map to an ordered list of {@link TaskGroup} instances.
 *
 * @param taskToContainerId a map from each task name to the containerId to which it is assigned.
 * @return                  a list of TaskGroups ordered ascending by containerId.
 */
private List<TaskGroup> getOrderedContainers(Map<String, String> taskToContainerId) {
 log.debug("Got task to container map: {}", taskToContainerId);
 // Group tasks by container Id
 HashMap<String, List<String>> containerIdToTaskNames = new HashMap<>();
 for (Map.Entry<String, String> entry : taskToContainerId.entrySet()) {
  String taskName = entry.getKey();
  String containerId = entry.getValue();
  List<String> taskNames = containerIdToTaskNames.get(containerId);
  if (taskNames == null) {
   taskNames = new ArrayList<>();
   containerIdToTaskNames.put(containerId, taskNames);
  }
  taskNames.add(taskName);
 }
 // Build container tasks
 List<TaskGroup> containerTasks = new ArrayList<>(containerIdToTaskNames.size());
 for (int i = 0; i < containerIdToTaskNames.size(); i++) {
  if (containerIdToTaskNames.get(String.valueOf(i)) == null) throw new IllegalStateException("Task mapping is missing container: " + i);
  containerTasks.add(new TaskGroup(String.valueOf(i), containerIdToTaskNames.get(String.valueOf(i))));
 }
 return containerTasks;
}
origin: org.apache.samza/samza-core

/**
 * Converts the task->containerId map to an ordered list of {@link TaskGroup} instances.
 *
 * @param taskToContainerId a map from each task name to the containerId to which it is assigned.
 * @return                  a list of TaskGroups ordered ascending by containerId.
 */
private List<TaskGroup> getOrderedContainers(Map<String, String> taskToContainerId) {
 log.debug("Got task to container map: {}", taskToContainerId);
 // Group tasks by container Id
 HashMap<String, List<String>> containerIdToTaskNames = new HashMap<>();
 for (Map.Entry<String, String> entry : taskToContainerId.entrySet()) {
  String taskName = entry.getKey();
  String containerId = entry.getValue();
  List<String> taskNames = containerIdToTaskNames.get(containerId);
  if (taskNames == null) {
   taskNames = new ArrayList<>();
   containerIdToTaskNames.put(containerId, taskNames);
  }
  taskNames.add(taskName);
 }
 // Build container tasks
 List<TaskGroup> containerTasks = new ArrayList<>(containerIdToTaskNames.size());
 for (int i = 0; i < containerIdToTaskNames.size(); i++) {
  if (containerIdToTaskNames.get(String.valueOf(i)) == null) throw new IllegalStateException("Task mapping is missing container: " + i);
  containerTasks.add(new TaskGroup(String.valueOf(i), containerIdToTaskNames.get(String.valueOf(i))));
 }
 return containerTasks;
}
origin: org.apache.samza/samza-core_2.12

/**
 * Converts the task->containerId map to an ordered list of {@link TaskGroup} instances.
 *
 * @param taskToContainerId a map from each task name to the containerId to which it is assigned.
 * @return                  a list of TaskGroups ordered ascending by containerId.
 */
private List<TaskGroup> getOrderedContainers(Map<String, String> taskToContainerId) {
 log.debug("Got task to container map: {}", taskToContainerId);
 // Group tasks by container Id
 HashMap<String, List<String>> containerIdToTaskNames = new HashMap<>();
 for (Map.Entry<String, String> entry : taskToContainerId.entrySet()) {
  String taskName = entry.getKey();
  String containerId = entry.getValue();
  List<String> taskNames = containerIdToTaskNames.get(containerId);
  if (taskNames == null) {
   taskNames = new ArrayList<>();
   containerIdToTaskNames.put(containerId, taskNames);
  }
  taskNames.add(taskName);
 }
 // Build container tasks
 List<TaskGroup> containerTasks = new ArrayList<>(containerIdToTaskNames.size());
 for (int i = 0; i < containerIdToTaskNames.size(); i++) {
  if (containerIdToTaskNames.get(String.valueOf(i)) == null) throw new IllegalStateException("Task mapping is missing container: " + i);
  containerTasks.add(new TaskGroup(String.valueOf(i), containerIdToTaskNames.get(String.valueOf(i))));
 }
 return containerTasks;
}
org.apache.samza.container.grouper.taskGroupByContainerCount$TaskGroup<init>

Popular methods of GroupByContainerCount$TaskGroup

  • addTaskName
  • getContainerId
  • removeTask
  • size

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • onCreateOptionsMenu (Activity)
  • orElseThrow (Optional)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
  • BoxLayout (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