Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 101EA200BBE for ; Fri, 11 Nov 2016 13:21:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 0ED5C160B01; Fri, 11 Nov 2016 12:21:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 5E768160AE4 for ; Fri, 11 Nov 2016 13:20:59 +0100 (CET) Received: (qmail 773 invoked by uid 500); 11 Nov 2016 12:20:58 -0000 Mailing-List: contact issues-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list issues@ambari.apache.org Received: (qmail 761 invoked by uid 99); 11 Nov 2016 12:20:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Nov 2016 12:20:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 574CC2C4C70 for ; Fri, 11 Nov 2016 12:20:58 +0000 (UTC) Date: Fri, 11 Nov 2016 12:20:58 +0000 (UTC) From: "Doroszlai, Attila (JIRA)" To: issues@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMBARI-18569) Execute topology tasks in parallel by hosts MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 11 Nov 2016 12:21:00 -0000 [ https://issues.apache.org/jira/browse/AMBARI-18569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15656948#comment-15656948 ] Doroszlai, Attila commented on AMBARI-18569: -------------------------------------------- [Unit test failure|https://builds.apache.org/job/Ambari-trunk-Commit/5989/testReport/] in {{ServicePropertiesTest.validatePropertySchemaOfServiceXMLs}} is unrelated to this change. > Execute topology tasks in parallel by hosts > ------------------------------------------- > > Key: AMBARI-18569 > URL: https://issues.apache.org/jira/browse/AMBARI-18569 > Project: Ambari > Issue Type: Task > Components: ambari-server > Affects Versions: 2.4.0 > Reporter: Doroszlai, Attila > Assignee: Doroszlai, Attila > Fix For: 3.0.0, 2.5.0 > > Attachments: AMBARI-18569-branch-2.5.patch, AMBARI-18569.patch > > > Currently when a cluster is created using Blueprints, {{PersistHostResourcesTask}}, {{RegisterWithConfigGroupTask}}, {{InstallHostTask}} and {{StartHostTask}} topology tasks are created in this order for each host. These tasks are then executed by a single-threaded executor {{TopologyManager.executor}} as hosts are being assigned to the cluster. > Since {{TopologyManager}} is singleton, this leads to sequential execution of topology tasks on a single thread. The execution of the each individual topology task involves db operations under the hood. If for any reason there is some latency introduced by the db operations (e.g. the db server is remote instead of local) than this latency builds up a considerable delay if there are many hosts to execute topology tasks for. Executing the topology tasks in parallel would reduce the delay in this case. > Topology tasks for a host must be executed in order, but tasks that belong to different hosts can be executed concurrently. E.g. the {{PersistHostResourcesTask}}, {{RegisterWithConfigGroupTask}}, {{InstallHostTask}} and {{StartHostTask}} topology tasks would be executed sequentially by one thread for host1 and by another thread for host2. -- This message was sent by Atlassian JIRA (v6.3.4#6332)