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 D4B6B200B2D for ; Thu, 16 Jun 2016 18:05:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D35B9160A61; Thu, 16 Jun 2016 16:05:06 +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 318F91602C5 for ; Thu, 16 Jun 2016 18:05:06 +0200 (CEST) Received: (qmail 94250 invoked by uid 500); 16 Jun 2016 16:05:05 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 94226 invoked by uid 99); 16 Jun 2016 16:05:05 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jun 2016 16:05:05 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 433CE2C14F8 for ; Thu, 16 Jun 2016 16:05:05 +0000 (UTC) Date: Thu, 16 Jun 2016 16:05:05 +0000 (UTC) From: =?utf-8?Q?Sergio_Pe=C3=B1a_=28JIRA=29?= To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-13884) Disallow queries fetching more than a configured number of partitions in PartitionPruner MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 16 Jun 2016 16:05:07 -0000 [ https://issues.apache.org/jira/browse/HIVE-13884?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergio Pe=C3=B1a updated HIVE-13884: ------------------------------- Attachment: HIVE-13884.5.patch > Disallow queries fetching more than a configured number of partitions in = PartitionPruner > -------------------------------------------------------------------------= --------------- > > Key: HIVE-13884 > URL: https://issues.apache.org/jira/browse/HIVE-13884 > Project: Hive > Issue Type: Improvement > Reporter: Mohit Sabharwal > Assignee: Sergio Pe=C3=B1a > Attachments: HIVE-13884.1.patch, HIVE-13884.2.patch, HIVE-13884.3= .patch, HIVE-13884.4.patch, HIVE-13884.5.patch > > > Currently the PartitionPruner requests either all partitions or partition= s based on filter expression. In either scenarios, if the number of partiti= ons accessed is large there can be significant memory pressure at the HMS s= erver end. > We already have a config {{hive.limit.query.max.table.partition}} that en= forces limits on number of partitions that may be scanned per operator. But= this check happens after the PartitionPruner has already fetched all parti= tions. > We should add an option at PartitionPruner level to disallow queries that= attempt to access number of partitions beyond a configurable limit. > Note that {{hive.mapred.mode=3Dstrict}} disallow queries without a partit= ion filter in PartitionPruner, but this check accepts any query with a prun= ing condition, even if partitions fetched are large. In multi-tenant enviro= nments, admins could use more control w.r.t. number of partitions allowed b= ased on HMS memory capacity. > One option is to have PartitionPruner first fetch the partition names (in= stead of partition specs) and throw an exception if number of partitions ex= ceeds the configured value. Otherwise, fetch the partition specs. > Looks like the existing {{listPartitionNames}} call could be used if exte= nded to take partition filter expressions like {{getPartitionsByExpr}} call= does. -- This message was sent by Atlassian JIRA (v6.3.4#6332)