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

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

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

origin: apache/flink

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

@Override
public void init() throws Exception {
  final String iterationId = getConfiguration().getIterationId();
  if (iterationId == null || iterationId.length() == 0) {
    throw new Exception("Missing iteration ID in the task configuration");
  }
  final String brokerID = StreamIterationHead.createBrokerIdString(getEnvironment().getJobID(), iterationId,
      getEnvironment().getTaskInfo().getIndexOfThisSubtask());
  final long iterationWaitTime = getConfiguration().getIterationWaitTime();
  LOG.info("Iteration tail {} trying to acquire feedback queue under {}", getName(), brokerID);
  @SuppressWarnings("unchecked")
  BlockingQueue<StreamRecord<IN>> dataChannel =
      (BlockingQueue<StreamRecord<IN>>) BlockingQueueBroker.INSTANCE.get(brokerID);
  LOG.info("Iteration tail {} acquired feedback queue {}", getName(), brokerID);
  this.headOperator = new RecordPusher<>();
  this.headOperator.setup(this, getConfiguration(), new IterationTailOutput<>(dataChannel, iterationWaitTime));
  // call super.init() last because that needs this.headOperator to be set up
  super.init();
}
origin: apache/flink

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

getEnvironment().getTaskInfo().getIndexOfThisSubtask());
origin: apache/flink

when(mockTaskInfo.getIndexOfThisSubtask()).thenReturn(0);
Environment mockEnvironment = new MockEnvironmentBuilder().build();
origin: apache/flink

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

int numKeyGroups = getEnvironment().getTaskInfo().getMaxNumberOfParallelSubtasks();
int numSubtasks = getEnvironment().getTaskInfo().getNumberOfParallelSubtasks();
int subtaskIndex = getEnvironment().getTaskInfo().getIndexOfThisSubtask();
origin: com.alibaba.blink/flink-core

@Override
public int getIndexOfThisSubtask() {
  return taskInfo.getIndexOfThisSubtask();
}
origin: org.apache.flink/flink-core

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

/**
 * Returns the index of this subtask in the subtask group.
 * 
 * @return the index of this subtask in the subtask group
 */
public int getIndexInSubtaskGroup() {
  return this.environment.getTaskInfo().getIndexOfThisSubtask();
}
origin: org.apache.flink/flink-runtime_2.11

/**
 * Returns the index of this subtask in the subtask group.
 *
 * @return the index of this subtask in the subtask group
 */
public int getIndexInSubtaskGroup() {
  return this.environment.getTaskInfo().getIndexOfThisSubtask();
}
origin: org.apache.flink/flink-runtime

/**
 * Returns the index of this subtask in the subtask group.
 *
 * @return the index of this subtask in the subtask group
 */
public int getIndexInSubtaskGroup() {
  return this.environment.getTaskInfo().getIndexOfThisSubtask();
}
origin: com.alibaba.blink/flink-runtime

/**
 * Returns the index of this subtask in the subtask group.
 * 
 * @return the index of this subtask in the subtask group
 */
public int getIndexInSubtaskGroup() {
  return this.environment.getTaskInfo().getIndexOfThisSubtask();
}
origin: org.apache.flink/flink-streaming-java_2.10

private String createOperatorIdentifier(StreamOperator<?> operator, int vertexId) {
  return operator.getClass().getSimpleName() +
      "_" + vertexId +
      "_" + getEnvironment().getTaskInfo().getIndexOfThisSubtask();
}
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

public String brokerKey() {
  if (brokerKey == null) {
    int iterationId = config.getIterationId();
    brokerKey = getEnvironment().getJobID().toString() + '#' + iterationId + '#' +
        getEnvironment().getTaskInfo().getIndexOfThisSubtask();
  }
  return brokerKey;
}
origin: org.apache.flink/flink-runtime

public String brokerKey() {
  if (brokerKey == null) {
    int iterationId = config.getIterationId();
    brokerKey = getEnvironment().getJobID().toString() + '#' + iterationId + '#' +
        getEnvironment().getTaskInfo().getIndexOfThisSubtask();
  }
  return brokerKey;
}
origin: org.apache.flink/flink-runtime_2.11

public String brokerKey() {
  if (brokerKey == null) {
    int iterationId = config.getIterationId();
    brokerKey = getEnvironment().getJobID().toString() + '#' + iterationId + '#' +
        getEnvironment().getTaskInfo().getIndexOfThisSubtask();
  }
  return brokerKey;
}
origin: com.alibaba.blink/flink-runtime

public String brokerKey() {
  if (brokerKey == null) {
    int iterationId = config.getIterationId();
    brokerKey = getEnvironment().getJobID().toString() + '#' + iterationId + '#' +
        getEnvironment().getTaskInfo().getIndexOfThisSubtask();
  }
  return brokerKey;
}
org.apache.flink.api.commonTaskInfogetIndexOfThisSubtask

Javadoc

Gets the number of this parallel subtask. The numbering starts from 0 and goes up to parallelism-1 (parallelism as returned by #getNumberOfParallelSubtasks()).

Popular methods of TaskInfo

  • getNumberOfParallelSubtasks
    Gets the parallelism with which the parallel task runs.
  • 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 post requests using okhttp
  • onCreateOptionsMenu (Activity)
  • startActivity (Activity)
  • addToBackStack (FragmentTransaction)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • JFileChooser (javax.swing)
  • Best IntelliJ 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