Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 957D68DE4 for ; Thu, 18 Aug 2011 23:03:51 +0000 (UTC) Received: (qmail 68824 invoked by uid 500); 18 Aug 2011 22:53:59 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 68789 invoked by uid 500); 18 Aug 2011 22:53:58 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 68748 invoked by uid 99); 18 Aug 2011 22:53:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Aug 2011 22:53:56 +0000 X-ASF-Spam-Status: No, hits=1.6 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of driver13@gmail.com designates 209.85.215.48 as permitted sender) Received: from [209.85.215.48] (HELO mail-ew0-f48.google.com) (209.85.215.48) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Aug 2011 22:53:50 +0000 Received: by ewy22 with SMTP id 22so1457818ewy.35 for ; Thu, 18 Aug 2011 15:53:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=wVrx+LI+2Wo7XXgtnO+b5SW41lSndaOFozMg0NPfyck=; b=xkmcFI4oKt6L5QfSUuFH6eZQzU4dwoDTNXLMsnkISiUqfUAWc9mcdj8owrsCK2Yi3j GJS07LVii7pyujke+/KojAF3uVlBxg++/975TQhHD2xvJL00+4vEkT+hNmKpkQx6kdCY nTaCPTluQWJNsoiGXaUWfgzIAihWPUWjU2HZY= MIME-Version: 1.0 Received: by 10.14.148.17 with SMTP id u17mr482455eej.243.1313708008463; Thu, 18 Aug 2011 15:53:28 -0700 (PDT) Received: by 10.14.47.11 with HTTP; Thu, 18 Aug 2011 15:53:28 -0700 (PDT) Date: Thu, 18 Aug 2011 15:53:28 -0700 Message-ID: Subject: Ignore subdirectories when querying external table From: Dave To: user@hive.apache.org Content-Type: multipart/alternative; boundary=bcaec5299ba92edb8e04aacf7b16 --bcaec5299ba92edb8e04aacf7b16 Content-Type: text/plain; charset=ISO-8859-1 Hi, I have a partitioned external table in Hive, and in the partition directories there are other subdirectories that are not related to the table itself. Hive seems to want to scan those directories, as I am getting an error message when trying to do a SELECT on the table: Failed with exception java.io.IOException:java.io.IOException: Not a file: hdfs://path/to/partition/path/to/subdir Also, it seems to ignore directories prefixed by an underscore (_directory). I am using hive 0.7.1 on Hadoop 0.20.2. Is there a way to force Hive to ignore all subdirectories in external tables and only look at files? Thanks in advance, -Dave --bcaec5299ba92edb8e04aacf7b16 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,

I have a partitioned external table in Hive, and in = the partition directories there are other subdirectories that are not relat= ed to the table itself. Hive seems to want to scan those directories, as I = am getting an error message when trying to do a SELECT on the table:

Failed with exception java.io.IOException:java.io.IOExc= eption: Not a file: hdfs://path/to/partition/path/to/subdir

<= /div>
Also, it seems to ignore directories prefixed by an underscore (_= directory).

I am using hive 0.7.1 on Hadoop 0.20.2.

<= /div>
Is there a way to force Hive to ignore all subdirectories in exte= rnal tables and only look at files?

Thanks in adva= nce,
-Dave
--bcaec5299ba92edb8e04aacf7b16--