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 A5BF9200B75 for ; Sun, 21 Aug 2016 03:08:18 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A427D160ABE; Sun, 21 Aug 2016 01:08:18 +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 E5809160ABB for ; Sun, 21 Aug 2016 03:08:17 +0200 (CEST) Received: (qmail 85994 invoked by uid 500); 21 Aug 2016 01:08:17 -0000 Mailing-List: contact dev-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@impala.incubator.apache.org Delivered-To: mailing list dev@impala.incubator.apache.org Received: (qmail 85979 invoked by uid 99); 21 Aug 2016 01:08:16 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Aug 2016 01:08:16 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 3F0E91804AF for ; Sun, 21 Aug 2016 01:08:16 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.362 X-Spam-Level: X-Spam-Status: No, score=0.362 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id isHItKZ0H337 for ; Sun, 21 Aug 2016 01:08:14 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 0177C5FC39 for ; Sun, 21 Aug 2016 01:08:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id u7L186qD012935; Sun, 21 Aug 2016 01:08:06 GMT Message-Id: <201608210108.u7L186qD012935@ip-10-146-233-104.ec2.internal> Date: Sun, 21 Aug 2016 01:08:06 +0000 From: "Alex Behm (Code Review)" To: Marcel Kornacker , impala-cr@cloudera.com, dev@impala.incubator.apache.org Reply-To: alex.behm@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-3902=3A_Scheduler_improvements_for_running_multiple_fragment_instances_on_a_single_backend=0A?= X-Gerrit-Change-Id: I240445199e22f009f4e72fdb8754eb8d77e3d680 X-Gerrit-ChangeURL: X-Gerrit-Commit: 4fef6731ca7f0677693ab6b271370d35f7c3a7af In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.12.2 archived-at: Sun, 21 Aug 2016 01:08:18 -0000 Alex Behm has posted comments on this change. Change subject: IMPALA-3902: Scheduler improvements for running multiple fragment instances on a single backend ...................................................................... Patch Set 3: (5 comments) Had a pass over the FE. Looks good overall, just had some ideas for factoring out common code. http://gerrit.cloudera.org:8080/#/c/4054/3/fe/src/main/java/com/cloudera/impala/common/TreeNode.java File fe/src/main/java/com/cloudera/impala/common/TreeNode.java: Line 63: protected >void getNodesPreOrderAux(ArrayList result) { space before void http://gerrit.cloudera.org:8080/#/c/4054/3/fe/src/main/java/com/cloudera/impala/service/Frontend.java File fe/src/main/java/com/cloudera/impala/service/Frontend.java: Line 964: planner.computeResourceReqs(fragments, true, queryExecRequest); This function assumes that the entire query is captured by the given fragments, so it won't work for the MT case. It will set an 'arbitrary' resource estimate in queryExecRequest based on the planRoot that was processed last. I'd suggest setting dummy values in mtCreateExecRequest() and adding a TODO to fix it. Line 981: * Create a populated TQueryExecRequest, corresponding to the supplied TQueryCtx, fix comment: input is a planner Line 998: TExplainLevel explainLevel = TExplainLevel.EXTENDED; The explain level setting is somewhat subtle, maybe factor out that part. For example, move the code into planner.getExplainString() and don't pass in a level. or add a Planner.getEffectiveExplainLevel() that contains this logic Line 1042: for (int idx = 0; idx < fragments.size(); ++idx) { factor our the common code between createExecRequest() and createPlanExecInfo() It looks like the differences are mostly due to the different type of 'result', but that can probably be factored out by passing collection references to the new helper function, and then setting those in the caller's result. For example, void helper(List dest_fragment_idx, Map> per_node_scan_ranges); then at the caller: List dest_fragment_idx; Map per_node_scan_ranges; helper(dest_fragment_idx, per_node_scan_ranges); result.setDest_fragment_idx(dest_fragment_idx); result.setPer_node_scan_ranges(per_node_scan_ranges); -- To view, visit http://gerrit.cloudera.org:8080/4054 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I240445199e22f009f4e72fdb8754eb8d77e3d680 Gerrit-PatchSet: 3 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Marcel Kornacker Gerrit-Reviewer: Alex Behm Gerrit-HasComments: Yes