Return-Path: X-Original-To: apmail-hive-issues-archive@minotaur.apache.org Delivered-To: apmail-hive-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F217C19FE2 for ; Tue, 19 Apr 2016 20:47:26 +0000 (UTC) Received: (qmail 38051 invoked by uid 500); 19 Apr 2016 20:47:26 -0000 Delivered-To: apmail-hive-issues-archive@hive.apache.org Received: (qmail 37885 invoked by uid 500); 19 Apr 2016 20:47:26 -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 37675 invoked by uid 99); 19 Apr 2016 20:47:26 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Apr 2016 20:47:26 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id B948F2C1F5D for ; Tue, 19 Apr 2016 20:47:25 +0000 (UTC) Date: Tue, 19 Apr 2016 20:47:25 +0000 (UTC) From: "Chaoyu Tang (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-13509) HCatalog getSplits should ignore the partition with invalid path MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-13509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15248591#comment-15248591 ] Chaoyu Tang commented on HIVE-13509: ------------------------------------ [~szehon] [~mithun], could you review the patch, it has a new property hcat.input.ignore.invalid.path for the backwards compatibility. Thanks. > HCatalog getSplits should ignore the partition with invalid path > ---------------------------------------------------------------- > > Key: HIVE-13509 > URL: https://issues.apache.org/jira/browse/HIVE-13509 > Project: Hive > Issue Type: Improvement > Components: HCatalog > Reporter: Chaoyu Tang > Assignee: Chaoyu Tang > Attachments: HIVE-13509.1.patch, HIVE-13509.patch > > > It is quite common that there is the discrepancy between partition directory and its HMS metadata, simply because the directory could be added/deleted externally using hdfs shell command. Technically it should be fixed by MSCK and alter table .. add/drop command etc, but sometimes it might not be practical especially in a multi-tenant env. This discrepancy does not cause any problem to Hive, Hive returns no rows for a partition with an invalid (e.g. non-existing) path, but it fails the Pig load with HCatLoader, because the HCatBaseInputFormat getSplits throws an error when getting a split for a non-existing path. The error message might looks like: > {code} > Caused by: org.apache.hadoop.mapred.InvalidInputException: Input path does not exist: hdfs://xyz.com:8020/user/hive/warehouse/xyz/date=2016-01-01/country=BR > at org.apache.hadoop.mapred.FileInputFormat.singleThreadedListStatus(FileInputFormat.java:287) > at org.apache.hadoop.mapred.FileInputFormat.listStatus(FileInputFormat.java:229) > at org.apache.hadoop.mapred.FileInputFormat.getSplits(FileInputFormat.java:315) > at org.apache.hive.hcatalog.mapreduce.HCatBaseInputFormat.getSplits(HCatBaseInputFormat.java:162) > at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigInputFormat.getSplits(PigInputFormat.java:274) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)