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 0D4474D8B for ; Fri, 8 Jul 2011 01:18:02 +0000 (UTC) Received: (qmail 74485 invoked by uid 500); 8 Jul 2011 01:18:01 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 74410 invoked by uid 500); 8 Jul 2011 01:18:00 -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 74402 invoked by uid 99); 8 Jul 2011 01:18:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jul 2011 01:18:00 +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 (nike.apache.org: domain of aaron.sun82@gmail.com designates 209.85.214.176 as permitted sender) Received: from [209.85.214.176] (HELO mail-iw0-f176.google.com) (209.85.214.176) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jul 2011 01:17:53 +0000 Received: by iwi5 with SMTP id 5so2071399iwi.35 for ; Thu, 07 Jul 2011 18:17:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=D4YEM5cjk+I47llbxK/YWlKWaA5tnn48aAMvFswWDYo=; b=gZyMhI85Z3/4DfQd0YPBMNBpqBY9pDUGDXuuINwRuJ1rgUCVdQuOJN3mR2NwoUZ738 nEYN+T4wgs78lEQcvx8cvGUTThvyY3gAQZFfAU5TdHWCXLH46bpK1JCaraJ3I8S4M8ek oYgpn97AxyCMAXRLCSngDqeHs9ERA8QaXlnkI= MIME-Version: 1.0 Received: by 10.42.172.74 with SMTP id m10mr351153icz.89.1310087852570; Thu, 07 Jul 2011 18:17:32 -0700 (PDT) Received: by 10.42.221.198 with HTTP; Thu, 7 Jul 2011 18:17:32 -0700 (PDT) In-Reply-To: References: <4E14DDC9.9050504@hotmail.com> Date: Thu, 7 Jul 2011 18:17:32 -0700 Message-ID: Subject: Re: Lzo compression on Hive table From: Aaron Sun To: user@hive.apache.org Content-Type: multipart/alternative; boundary=90e6ba6e865613b81804a78499df X-Virus-Checked: Checked by ClamAV on apache.org --90e6ba6e865613b81804a78499df Content-Type: text/plain; charset=UTF-8 You can use this one STORED AS INPUTFORMAT "com.hadoop.mapred.DeprecatedLzoTextInputFormat" OUTPUTFORMAT "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat" On Thu, Jul 7, 2011 at 6:06 PM, wrote: > Hi there, > I got my hadoop all setup writing out sequence file with LZO compression. > Using the following: > mapred.output.compress=true > mapred.output.compression.codec=com.hadoop.compression.lzo.LzoCodec > > How do I define my table so it will write out compressed data and be able > to read in compressed data during my Hive queries? > > CREATE EXTERNAL TABLE foo ( > columnA string, > columnB string ) > PARTITIONED BY (date string) > ROW FORMAT DELIMITED FIELDS TERMINATED BY "\t" > LOCATION '/path/to/hive/tables/foo'; > > Thanks, > Jon > > This message is for the designated recipient only and may contain > privileged, proprietary, or otherwise private information. If you have > received it in error, please notify the sender immediately and delete the > original. Any other use of the email by you is prohibited. > --90e6ba6e865613b81804a78499df Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
You can use this one
=C2=A0
STORED AS INPUTFORMAT "com.hadoop.mapred.DeprecatedLzoTextInputFo= rmat"
OUTPUTFORMAT "org.apache.hadoop.hive.ql.io.HiveIgnoreKey= TextOutputFormat"


On Thu, Jul 7, 2011 at 6:06 PM, <jonathan.hwang@accent= ure.com> wrote:
Hi there,
I got my hadoop all= setup writing out sequence file with LZO compression. =C2=A0Using the foll= owing:
mapred.output.compress=3Dtrue
mapred.output.compression.codec=3Dcom.hado= op.compression.lzo.LzoCodec

How do I define my table so it will writ= e out compressed data and be able to read in compressed data during my Hive= queries?

CREATE EXTERNAL TABLE foo (
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 columnA string,
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 columnB string = )
=C2=A0 =C2=A0 =C2=A0 PARTITIONED BY (date string)
=C2=A0 =C2=A0 =C2= =A0 ROW FORMAT DELIMITED FIELDS TERMINATED BY "\t"
=C2=A0 =C2=A0 =C2=A0 LOCATION '/path/to/hive/tables/foo';

Th= anks,
Jon

This message is for the designated recipient only and m= ay contain privileged, proprietary, or otherwise private information. =C2= =A0If you have received it in error, please notify the sender immediately a= nd delete the original. =C2=A0Any other use of the email by you is prohibit= ed.

--90e6ba6e865613b81804a78499df--