Return-Path: X-Original-To: apmail-flink-issues-archive@minotaur.apache.org Delivered-To: apmail-flink-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 035E217941 for ; Mon, 11 May 2015 20:27:00 +0000 (UTC) Received: (qmail 74642 invoked by uid 500); 11 May 2015 20:26:59 -0000 Delivered-To: apmail-flink-issues-archive@flink.apache.org Received: (qmail 74595 invoked by uid 500); 11 May 2015 20:26:59 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 74585 invoked by uid 99); 11 May 2015 20:26:59 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 May 2015 20:26:59 +0000 Date: Mon, 11 May 2015 20:26:59 +0000 (UTC) From: "Stephan Ewen (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (FLINK-1672) Refactor task registration/unregistration MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FLINK-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stephan Ewen resolved FLINK-1672. --------------------------------- Resolution: Fixed Fix Version/s: 0.9 Assignee: Stephan Ewen Implemented in 8e61301452218e6d279b013beb7bbd02a7c2e3f9 > Refactor task registration/unregistration > ----------------------------------------- > > Key: FLINK-1672 > URL: https://issues.apache.org/jira/browse/FLINK-1672 > Project: Flink > Issue Type: Improvement > Components: Distributed Runtime > Reporter: Ufuk Celebi > Assignee: Stephan Ewen > Fix For: 0.9 > > > h4. Current control flow for task registrations > # JM submits a TaskDeploymentDescriptor to a TM > ## TM registers the required JAR files with the LibraryCacheManager and returns the user code class loader > ## TM creates a Task instance and registers the task in the runningTasks map > ## TM creates a TaskInputSplitProvider > ## TM creates a RuntimeEnvironment and sets it as the environment for the task > ## TM registers the task with the network environment > ## TM sends async msg to profiler to monitor tasks > ## TM creates temporary files in file cache > ## TM tries to start the task > If any operation >= 1.2 fails: > * TM calls task.failExternally() > * TM removes temporary files from file cache > * TM unregisters the task from the network environment > * TM sends async msg to profiler to unmonitor tasks > * TM calls unregisterMemoryManager on task > If 1.1 fails, only unregister from LibraryCacheManager. > h4. RuntimeEnvironment, Task, TaskManager separation > The RuntimeEnvironment has references to certain components of the task manager like memory manager, which are accecssed from the task. Furthermore it implements Runnable, and creates the executing task Thread. The Task instance essentially wraps the RuntimeEnvironment and allows asynchronous state management of the task (RUNNING, FINISHED, etc.). > The way that the state updates affect the task is not that obvious: state changes trigger messages to the TM, which for final states further trigger a msg to unregister the task. The way that tasks are unregistered again depends on the state of the task. > ---- > I would propose to refactor this to make the way the state handling/registration/unregistration is handled is more transparent. -- This message was sent by Atlassian JIRA (v6.3.4#6332)