Tabnine Logo
TaskInfo.getNumberOfParallelSubtasks
Code IndexAdd Tabnine to your IDE (free)

How to use
getNumberOfParallelSubtasks
method
in
org.apache.flink.api.common.TaskInfo

Best Java code snippets using org.apache.flink.api.common.TaskInfo.getNumberOfParallelSubtasks (Showing top 20 results out of 315)

origin: apache/flink

@Override
public int getNumberOfParallelSubtasks() {
  return taskInfo.getNumberOfParallelSubtasks();
}
origin: apache/flink

operatorClassName,
taskInfo.getIndexOfThisSubtask(),
taskInfo.getNumberOfParallelSubtasks());
origin: apache/flink

taskInfo.getNumberOfParallelSubtasks(),
taskInfo.getIndexOfThisSubtask());
origin: apache/flink

int numSubtasks = getEnvironment().getTaskInfo().getNumberOfParallelSubtasks();
int subtaskIndex = getEnvironment().getTaskInfo().getIndexOfThisSubtask();
origin: org.apache.flink/flink-core

@Override
public int getNumberOfParallelSubtasks() {
  return taskInfo.getNumberOfParallelSubtasks();
}
origin: com.alibaba.blink/flink-core

@Override
public int getNumberOfParallelSubtasks() {
  return taskInfo.getNumberOfParallelSubtasks();
}
origin: org.apache.flink/flink-runtime_2.10

/**
 * Returns the current number of subtasks the respective task is split into.
 * 
 * @return the current number of subtasks the respective task is split into
 */
public int getCurrentNumberOfSubtasks() {
  return this.environment.getTaskInfo().getNumberOfParallelSubtasks();
}
origin: org.apache.flink/flink-runtime_2.11

/**
 * Returns the current number of subtasks the respective task is split into.
 *
 * @return the current number of subtasks the respective task is split into
 */
public int getCurrentNumberOfSubtasks() {
  return this.environment.getTaskInfo().getNumberOfParallelSubtasks();
}
origin: org.apache.flink/flink-runtime

/**
 * Returns the current number of subtasks the respective task is split into.
 *
 * @return the current number of subtasks the respective task is split into
 */
public int getCurrentNumberOfSubtasks() {
  return this.environment.getTaskInfo().getNumberOfParallelSubtasks();
}
origin: com.alibaba.blink/flink-runtime

/**
 * Returns the current number of subtasks the respective task is split into.
 * 
 * @return the current number of subtasks the respective task is split into
 */
public int getCurrentNumberOfSubtasks() {
  return this.environment.getTaskInfo().getNumberOfParallelSubtasks();
}
origin: org.apache.flink/flink-runtime

/**
 * Utility function that composes a string for logging purposes. The string includes the given message,
 * the given name of the task and the index in its subtask group as well as the number of instances
 * that exist in its subtask group.
 *
 * @param message The main message for the log.
 * @param taskName The name of the task.
 * @param parent The task that contains the code producing the message.
 *
 * @return The string for logging.
 */
public static String constructLogString(String message, String taskName, AbstractInvokable parent) {
  return message + ":  " + taskName + " (" + (parent.getEnvironment().getTaskInfo().getIndexOfThisSubtask() + 1) +
      '/' + parent.getEnvironment().getTaskInfo().getNumberOfParallelSubtasks() + ')';
}
origin: com.alibaba.blink/flink-runtime

/**
 * Utility function that composes a string for logging purposes. The string includes the given message,
 * the given name of the task and the index in its subtask group as well as the number of instances
 * that exist in its subtask group.
 *
 * @param message The main message for the log.
 * @param taskName The name of the task.
 * @param parent The task that contains the code producing the message.
 *
 * @return The string for logging.
 */
public static String constructLogString(String message, String taskName, AbstractInvokable parent) {
  return message + ":  " + taskName + " (" + (parent.getEnvironment().getTaskInfo().getIndexOfThisSubtask() + 1) +
      '/' + parent.getEnvironment().getTaskInfo().getNumberOfParallelSubtasks() + ')';
}
origin: org.apache.flink/flink-runtime_2.10

/**
 * Utility function that composes a string for logging purposes. The string includes the given message,
 * the given name of the task and the index in its subtask group as well as the number of instances
 * that exist in its subtask group.
 *
 * @param message The main message for the log.
 * @param taskName The name of the task.
 * @param parent The task that contains the code producing the message.
 *
 * @return The string for logging.
 */
public static String constructLogString(String message, String taskName, AbstractInvokable parent) {
  return message + ":  " + taskName + " (" + (parent.getEnvironment().getTaskInfo().getIndexOfThisSubtask() + 1) +
      '/' + parent.getEnvironment().getTaskInfo().getNumberOfParallelSubtasks() + ')';
}
origin: org.apache.flink/flink-runtime_2.11

/**
 * Utility function that composes a string for logging purposes. The string includes the given message,
 * the given name of the task and the index in its subtask group as well as the number of instances
 * that exist in its subtask group.
 *
 * @param message The main message for the log.
 * @param taskName The name of the task.
 * @param parent The task that contains the code producing the message.
 *
 * @return The string for logging.
 */
public static String constructLogString(String message, String taskName, AbstractInvokable parent) {
  return message + ":  " + taskName + " (" + (parent.getEnvironment().getTaskInfo().getIndexOfThisSubtask() + 1) +
      '/' + parent.getEnvironment().getTaskInfo().getNumberOfParallelSubtasks() + ')';
}
origin: org.apache.flink/flink-streaming-java

operatorClassName,
taskInfo.getIndexOfThisSubtask(),
taskInfo.getNumberOfParallelSubtasks());
origin: org.apache.flink/flink-streaming-java_2.11

operatorClassName,
taskInfo.getIndexOfThisSubtask(),
taskInfo.getNumberOfParallelSubtasks());
origin: org.apache.flink/flink-runtime_2.10

format.open(this.getEnvironment().getTaskInfo().getIndexOfThisSubtask(), this.getEnvironment().getTaskInfo().getNumberOfParallelSubtasks());
origin: org.apache.flink/flink-streaming-java_2.10

private void initKeyedState() {
  try {
    TypeSerializer<Object> keySerializer = config.getStateKeySerializer(getUserCodeClassloader());
    // create a keyed state backend if there is keyed state, as indicated by the presence of a key serializer
    if (null != keySerializer) {
      KeyGroupRange subTaskKeyGroupRange = KeyGroupRangeAssignment.computeKeyGroupRangeForOperatorIndex(
          container.getEnvironment().getTaskInfo().getMaxNumberOfParallelSubtasks(),
          container.getEnvironment().getTaskInfo().getNumberOfParallelSubtasks(),
          container.getEnvironment().getTaskInfo().getIndexOfThisSubtask());
      this.keyedStateBackend = container.createKeyedStateBackend(
          keySerializer,
          // The maximum parallelism == number of key group
          container.getEnvironment().getTaskInfo().getMaxNumberOfParallelSubtasks(),
          subTaskKeyGroupRange);
      this.keyedStateStore = new DefaultKeyedStateStore(keyedStateBackend, getExecutionConfig());
    }
  } catch (Exception e) {
    throw new IllegalStateException("Could not initialize keyed state backend.", e);
  }
}
origin: org.apache.flink/flink-streaming-java_2.11

taskInfo.getNumberOfParallelSubtasks(),
taskInfo.getIndexOfThisSubtask());
origin: org.apache.flink/flink-streaming-java

taskInfo.getNumberOfParallelSubtasks(),
taskInfo.getIndexOfThisSubtask());
org.apache.flink.api.commonTaskInfogetNumberOfParallelSubtasks

Javadoc

Gets the parallelism with which the parallel task runs.

Popular methods of TaskInfo

  • getIndexOfThisSubtask
    Gets the number of this parallel subtask. The numbering starts from 0 and goes up to parallelism-1 (
  • getTaskNameWithSubtasks
    Returns the name of the task, appended with the subtask indicator, such as "MyTask (3/6)", where 3 w
  • getTaskName
    Returns the name of the task
  • getMaxNumberOfParallelSubtasks
    Gets the max parallelism aka the max number of subtasks.
  • <init>
  • getAttemptNumber
    Gets the attempt number of this parallel subtask. First attempt is numbered 0. The attempt number co
  • getAllocationIDAsString
    Returns the allocation id for where this task is executed.

Popular in Java

  • Making http requests using okhttp
  • getContentResolver (Context)
  • setRequestProperty (URLConnection)
  • startActivity (Activity)
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • JComboBox (javax.swing)
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top 12 Jupyter Notebook extensions
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