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 D9C80200C2B for ; Thu, 2 Mar 2017 23:54:50 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id D86D1160B6F; Thu, 2 Mar 2017 22:54:50 +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 2D26F160B6A for ; Thu, 2 Mar 2017 23:54:50 +0100 (CET) Received: (qmail 90100 invoked by uid 500); 2 Mar 2017 22:54:49 -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 90091 invoked by uid 99); 2 Mar 2017 22:54:49 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Mar 2017 22:54:49 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id CF062C028C for ; Thu, 2 Mar 2017 22:54:48 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -2.347 X-Spam-Level: X-Spam-Status: No, score=-2.347 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-2.999, SPF_NEUTRAL=0.652] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 7y6r5g6qjK-U for ; Thu, 2 Mar 2017 22:54:48 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 5A77B5FBC0 for ; Thu, 2 Mar 2017 22:54:47 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 4DFC8E0652 for ; Thu, 2 Mar 2017 22:54:46 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id AEACC24160 for ; Thu, 2 Mar 2017 22:54:45 +0000 (UTC) Date: Thu, 2 Mar 2017 22:54:45 +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] [Commented] (HIVE-16024) MSCK Repair Requires nonstrict hive.mapred.mode MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 02 Mar 2017 22:54:51 -0000 [ https://issues.apache.org/jira/browse/HIVE-16024?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1589= 3193#comment-15893193 ]=20 Sergio Pe=C3=B1a commented on HIVE-16024: ------------------------------------ [~zsombor.klara] I took a look at the code again, and I think there might be a OOM problem e= ven if we fetch all partitions in batches (using PartitionIterable) when th= e strict mode is used. Here's the piece of code: {noformat} void checkTable(Table table, PartitionIterable parts, boolean findUnknownPartitions, CheckResult result) throws IOException= , HiveException { ... Set partPaths =3D new HashSet(); ... for (Partition partition : parts) { ... if (!fs.exists(partPath)) { PartitionResult pr =3D new PartitionResult(); pr.setPartitionName(partition.getName()); pr.setTableName(partition.getTable().getTableName()); result.getPartitionsNotOnFs().add(pr); } for (int i =3D 0; i < partition.getSpec().size(); i++) { partPaths.add(partPath.makeQualified(fs)); partPath =3D partPath.getParent(); } } ... {noformat} My concern is that when running MSCK with million of partitions (fetched in= batches), and none of the partitions exist on the filesystem, then the abo= ve code will add each partition name on the CheckResult object and partitio= n locations on the partPaths temporary. There's no statistics, but still a = concern about OOM. Should we refactor that code instead for handling partit= ions in batches on MSCK better? > MSCK Repair Requires nonstrict hive.mapred.mode > ----------------------------------------------- > > Key: HIVE-16024 > URL: https://issues.apache.org/jira/browse/HIVE-16024 > Project: Hive > Issue Type: Bug > Components: Metastore > Affects Versions: 2.2.0 > Reporter: Barna Zsombor Klara > Assignee: Barna Zsombor Klara > Attachments: HIVE-16024.01.patch, HIVE-16024.02.patch, HIVE-16024= .03.patch, HIVE-16024.04.patch > > > MSCK repair fails when hive.mapred.mode is set to strict > HIVE-13788 modified the way we read up partitions for a table to improve = performance. Unfortunately it is using PartitionPruner to load the partitio= ns which in turn is checking hive.mapred.mode. > The previous code did not check hive.mapred.mode. -- This message was sent by Atlassian JIRA (v6.3.15#6346)