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 9827D200B97 for ; Sun, 25 Sep 2016 07:08:30 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 96A05160ADF; Sun, 25 Sep 2016 05:08:30 +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 A911A160AD1 for ; Sun, 25 Sep 2016 07:08:29 +0200 (CEST) Received: (qmail 26693 invoked by uid 500); 25 Sep 2016 05:08:28 -0000 Mailing-List: contact reviews-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@impala.incubator.apache.org Received: (qmail 26682 invoked by uid 99); 25 Sep 2016 05:08:28 -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, 25 Sep 2016 05:08:28 +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 1A4A0180516 for ; Sun, 25 Sep 2016 05:08:28 +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-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id pnVCLqsctbsQ for ; Sun, 25 Sep 2016 05:08:25 +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-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 0807F60CF1 for ; Sun, 25 Sep 2016 05:08:24 +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 u8P58Nk5004238; Sun, 25 Sep 2016 05:08:23 GMT Message-Id: <201609250508.u8P58Nk5004238@ip-10-146-233-104.ec2.internal> Date: Sun, 25 Sep 2016 05:08:23 +0000 From: "Henry Robinson (Code Review)" To: Marcel Kornacker , impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Alex Behm , Dan Hecht , Mostafa Mokhtar , Lars Volker , Matthew Jacobs Reply-To: henry@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: 667f456e8704c8faeb4e77855d4c7200f9465d13 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, 25 Sep 2016 05:08:30 -0000 Henry Robinson has posted comments on this change. Change subject: IMPALA-3902: Scheduler improvements for running multiple fragment instances on a single backend ...................................................................... Patch Set 14: (15 comments) I think it would be good to have Alex review Frontend.java again - he said it looked good overall in PS3 so hopefully there won't be many comments. http://gerrit.cloudera.org:8080/#/c/4054/12/be/src/scheduling/query-resource-mgr.cc File be/src/scheduling/query-resource-mgr.cc: Line 1: // Licensed to the Apache Software Foundation (ASF) under one Remove this file. http://gerrit.cloudera.org:8080/#/c/4054/12/be/src/scheduling/query-resource-mgr.h File be/src/scheduling/query-resource-mgr.h: Line 1: // Licensed to the Apache Software Foundation (ASF) under one Did your rebase go wrong? This file should be removed. http://gerrit.cloudera.org:8080/#/c/4054/12/be/src/scheduling/query-schedule.cc File be/src/scheduling/query-schedule.cc: PS12, Line 68: if (plan_node_to_fragment_idx_.size() < node.node_id + 1) { : plan_node_to_fragment_idx_.resize(node.node_id + 1); : plan_node_to_plan_node_idx_.resize(node.node_id + 1); : } I think you can find the max node ID in InitMtFragmentExecParams if you also loop over the plan nodes there. That seems better than all this conditional resizing, which is confusing to read. PS12, Line 105: std remove std:: http://gerrit.cloudera.org:8080/#/c/4054/12/be/src/scheduling/query-schedule.h File be/src/scheduling/query-schedule.h: PS12, Line 184: Returns next instance id. Instance ids are consecutive numbers generated from : /// the query id. shouldn't that be the opposite? Start at 0 if there's a coordinator fragment. Might be better reworded as "The coordinator fragment instance, if there is one, has ID 0, all other fragment instances start from 1." PS12, Line 278: what's 'static info'? http://gerrit.cloudera.org:8080/#/c/4054/14/be/src/service/fragment-mgr.cc File be/src/service/fragment-mgr.cc: PS14, Line 23: #include not needed (see below), remove PS14, Line 42: << hex << exec_params.fragment_instance_ctx.fragment_instance_id << dec use PrintId(). http://gerrit.cloudera.org:8080/#/c/4054/14/be/src/service/impala-server.cc File be/src/service/impala-server.cc: Line 848: random_generator uuid_generator; remove this line PS14, Line 1080: << hex << params.fragment_instance_id Use PrintId() here instead of hex / dec. http://gerrit.cloudera.org:8080/#/c/4054/14/be/src/service/query-exec-state.cc File be/src/service/query-exec-state.cc: Line 443: Status status = exec_env_->scheduler()->Schedule(schedule_.get()); Leave a TODO to simplify this as discussed. http://gerrit.cloudera.org:8080/#/c/4054/14/be/src/service/query-options.cc File be/src/service/query-options.cc: Line 398: case TImpalaQueryOptions::MT_DOP: { When the patch that added MT_NUM_CORES was committed, I asked to consider a mechanism for hiding query options. DId that come to anything? It's unfortunate that we're going to commit a query option that (AFAICT) will break clients if it's turned on. http://gerrit.cloudera.org:8080/#/c/4054/14/be/src/util/container-util.h File be/src/util/container-util.h: PS14, Line 79: V* FindOrInsert(std::unordered_map* m, const K& key, const V& default_val) { : typename std::unordered_map::iterator it = m->find(key); : if (it == m->end()) { : it = m->insert(std::make_pair(key, default_val)).first; : } : return &it->second; : } : : template : V* FindOrInsert(boost::unordered_map* m, const K& key, const V& default_val) { : typename boost::unordered_map::iterator it = m->find(key); : if (it == m->end()) { : it = m->insert(std::make_pair(key, default_val)).first; : } : return &it->second; : } Just add the map type as a template parameter and remove the other versions of this. http://gerrit.cloudera.org:8080/#/c/4054/14/common/thrift/ImpalaInternalService.thrift File common/thrift/ImpalaInternalService.thrift: PS14, Line 185: backend so this is independent of the number of fragment instances for that query on that backend? PS14, Line 333: nd the id of the first fragment instance (the coordinator instance) : // are identical. isn't this true now only if there is a coordinator fragment? Reword to make that clearer - looks like first fragment instance is always 0 regardless of whether there is coord fragment. -- 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: 14 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Marcel Kornacker Gerrit-Reviewer: Alex Behm Gerrit-Reviewer: Dan Hecht Gerrit-Reviewer: Henry Robinson Gerrit-Reviewer: Internal Jenkins Gerrit-Reviewer: Lars Volker Gerrit-Reviewer: Marcel Kornacker Gerrit-Reviewer: Matthew Jacobs Gerrit-Reviewer: Mostafa Mokhtar Gerrit-HasComments: Yes