@Override public int getNumberOfParallelSubtasks() { return taskInfo.getNumberOfParallelSubtasks(); }
operatorClassName, taskInfo.getIndexOfThisSubtask(), taskInfo.getNumberOfParallelSubtasks());
taskInfo.getNumberOfParallelSubtasks(), taskInfo.getIndexOfThisSubtask());
int numSubtasks = getEnvironment().getTaskInfo().getNumberOfParallelSubtasks(); int subtaskIndex = getEnvironment().getTaskInfo().getIndexOfThisSubtask();
@Override public int getNumberOfParallelSubtasks() { return taskInfo.getNumberOfParallelSubtasks(); }
@Override public int getNumberOfParallelSubtasks() { return taskInfo.getNumberOfParallelSubtasks(); }
/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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() + ')'; }
/** * 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() + ')'; }
/** * 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() + ')'; }
/** * 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() + ')'; }
operatorClassName, taskInfo.getIndexOfThisSubtask(), taskInfo.getNumberOfParallelSubtasks());
operatorClassName, taskInfo.getIndexOfThisSubtask(), taskInfo.getNumberOfParallelSubtasks());
format.open(this.getEnvironment().getTaskInfo().getIndexOfThisSubtask(), this.getEnvironment().getTaskInfo().getNumberOfParallelSubtasks());
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); } }
taskInfo.getNumberOfParallelSubtasks(), taskInfo.getIndexOfThisSubtask());
taskInfo.getNumberOfParallelSubtasks(), taskInfo.getIndexOfThisSubtask());