From mapreduce-issues-return-91631-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Wed Apr 25 00:44:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id DB92F180679 for ; Wed, 25 Apr 2018 00:44:04 +0200 (CEST) Received: (qmail 16362 invoked by uid 500); 24 Apr 2018 22:44:03 -0000 Mailing-List: contact mapreduce-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list mapreduce-issues@hadoop.apache.org Received: (qmail 16351 invoked by uid 99); 24 Apr 2018 22:44:03 -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; Tue, 24 Apr 2018 22:44:03 +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 776A11802DB for ; Tue, 24 Apr 2018 22:44:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] 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 aUCnbS-ekgjw for ; Tue, 24 Apr 2018 22:44:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 3583B5F3CE for ; Tue, 24 Apr 2018 22:44:02 +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 36210E1212 for ; Tue, 24 Apr 2018 22:44:01 +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 80A55241C8 for ; Tue, 24 Apr 2018 22:44:00 +0000 (UTC) Date: Tue, 24 Apr 2018 22:44:00 +0000 (UTC) From: "Sergey Shelukhin (JIRA)" To: mapreduce-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (MAPREDUCE-7086) FileInputFormat recursive=false fails instead of ignoring the directories. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MAPREDUCE-7086?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergey Shelukhin updated MAPREDUCE-7086: ---------------------------------------- Attachment: (was: MAPREDUCE-7086.01.patch) > FileInputFormat recursive=3Dfalse fails instead of ignoring the directori= es. > -------------------------------------------------------------------------= - > > Key: MAPREDUCE-7086 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-7086 > Project: Hadoop Map/Reduce > Issue Type: Bug > Reporter: Sergey Shelukhin > Assignee: Sergey Shelukhin > Priority: Major > Attachments: HADOOP-15403.patch, MAPREDUCE-7086.patch > > > We are trying to create a split in Hive that will only read files in a di= rectory and not subdirectories. > That fails with the below error. > Given how this error comes about (two pieces of code interact, one explic= itly adding directories to results without failing, and one failing on any = directories in results), this seems like a bug. > {noformat} > Caused by: java.io.IOException: Not a file: file:/,...warehouse/simple_to= _mm_text/delta_0000001_0000001_0000 > =09at org.apache.hadoop.mapred.FileInputFormat.getSplits(FileInputFormat.= java:329) ~[hadoop-mapreduce-client-core-3.1.0.jar:?] > =09at org.apache.hadoop.hive.ql.io.HiveInputFormat.addSplitsForGroup(Hive= InputFormat.java:553) ~[hive-exec-3.1.0-SNAPSHOT.jar:3.1.0-SNAPSHOT] > =09at org.apache.hadoop.hive.ql.io.HiveInputFormat.getSplits(HiveInputFor= mat.java:754) ~[hive-exec-3.1.0-SNAPSHOT.jar:3.1.0-SNAPSHOT] > =09at org.apache.hadoop.hive.ql.exec.tez.HiveSplitGenerator.initialize(Hi= veSplitGenerator.java:203) ~[hive-exec-3.1.0-SNAPSHOT.jar:3.1.0-SNAPSHOT] > {noformat} > This code, when recursion is disabled, adds directories to results=20 > {noformat}=20 > if (recursive && stat.isDirectory()) { > =E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82= =E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82result.dirsNeedingRec= ursiveCalls.add(stat); > =E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82= =E2=80=82=E2=80=82=E2=80=82=E2=80=82} else { > =E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82= =E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82result.locatedFileSta= tuses.add(stat); > =E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82= =E2=80=82=E2=80=82=E2=80=82=E2=80=82} > {noformat}=20 > However the getSplits code after that computes the size like this > {noformat} > long totalSize =3D 0;=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80= =82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82= =E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2= =80=82=E2=80=82=E2=80=82=E2=80=82 // compute total size > =E2=80=82=E2=80=82=E2=80=82=E2=80=82for (FileStatus file: files) {=E2=80= =82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82= =E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82// check we = have valid files > =E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82if (file.isDirector= y()) { > =E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82t= hrow new IOException("Not a file: "+ file.getPath()); > =E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82} > =E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82totalSize +=3D > {noformat} > which would always fail combined with the above code. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: mapreduce-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: mapreduce-issues-help@hadoop.apache.org