You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hadoop.apache.org by Huanchen Zhang <ia...@gmail.com> on 2012/09/19 08:31:55 UTC

Read bzip2 file

Hello,

I have bzip2 files as the input of mapper. How to set the configuration and job.setInputFormatClass for bzip2 files ?

Thank you.

Huanchen


Re: Read bzip2 file

Posted by TianYi Zhu <ti...@facilitatedigital.com>.
org.apache.hadoop.io.compress.BZip2Codec

On Wed, Sep 19, 2012 at 4:31 PM, Huanchen Zhang <ia...@gmail.com>wrote:

> Hello,
>
> I have bzip2 files as the input of mapper. How to set the configuration
> and job.setInputFormatClass for bzip2 files ?
>
> Thank you.
>
> Huanchen
>
>

Re: Read bzip2 file

Posted by Huanchen Zhang <ia...@gmail.com>.
Hi Harsh,

Thank you ! It works.

Huanchen

On Sep 19, 2012, at 2:53 AM, Harsh J wrote:

> Hi Huanchen,
> 
> If your files have the .bz2 extension, then using TextInputFormat will
> automatically detect them and uncompress when reading.
> 
> On Wed, Sep 19, 2012 at 12:01 PM, Huanchen Zhang <ia...@gmail.com> wrote:
>> Hello,
>> 
>> I have bzip2 files as the input of mapper. How to set the configuration and job.setInputFormatClass for bzip2 files ?
>> 
>> Thank you.
>> 
>> Huanchen
>> 
> 
> 
> 
> -- 
> Harsh J


Re: Read bzip2 file

Posted by Huanchen Zhang <ia...@gmail.com>.
Hi Harsh,

Thank you ! It works.

Huanchen

On Sep 19, 2012, at 2:53 AM, Harsh J wrote:

> Hi Huanchen,
> 
> If your files have the .bz2 extension, then using TextInputFormat will
> automatically detect them and uncompress when reading.
> 
> On Wed, Sep 19, 2012 at 12:01 PM, Huanchen Zhang <ia...@gmail.com> wrote:
>> Hello,
>> 
>> I have bzip2 files as the input of mapper. How to set the configuration and job.setInputFormatClass for bzip2 files ?
>> 
>> Thank you.
>> 
>> Huanchen
>> 
> 
> 
> 
> -- 
> Harsh J


Re: Read bzip2 file

Posted by Huanchen Zhang <ia...@gmail.com>.
Hi Harsh,

Thank you ! It works.

Huanchen

On Sep 19, 2012, at 2:53 AM, Harsh J wrote:

> Hi Huanchen,
> 
> If your files have the .bz2 extension, then using TextInputFormat will
> automatically detect them and uncompress when reading.
> 
> On Wed, Sep 19, 2012 at 12:01 PM, Huanchen Zhang <ia...@gmail.com> wrote:
>> Hello,
>> 
>> I have bzip2 files as the input of mapper. How to set the configuration and job.setInputFormatClass for bzip2 files ?
>> 
>> Thank you.
>> 
>> Huanchen
>> 
> 
> 
> 
> -- 
> Harsh J


Re: Read bzip2 file

Posted by Huanchen Zhang <ia...@gmail.com>.
Hi Harsh,

Thank you ! It works.

Huanchen

On Sep 19, 2012, at 2:53 AM, Harsh J wrote:

> Hi Huanchen,
> 
> If your files have the .bz2 extension, then using TextInputFormat will
> automatically detect them and uncompress when reading.
> 
> On Wed, Sep 19, 2012 at 12:01 PM, Huanchen Zhang <ia...@gmail.com> wrote:
>> Hello,
>> 
>> I have bzip2 files as the input of mapper. How to set the configuration and job.setInputFormatClass for bzip2 files ?
>> 
>> Thank you.
>> 
>> Huanchen
>> 
> 
> 
> 
> -- 
> Harsh J


Re: Read bzip2 file

Posted by Harsh J <ha...@cloudera.com>.
Hi Huanchen,

If your files have the .bz2 extension, then using TextInputFormat will
automatically detect them and uncompress when reading.

On Wed, Sep 19, 2012 at 12:01 PM, Huanchen Zhang <ia...@gmail.com> wrote:
> Hello,
>
> I have bzip2 files as the input of mapper. How to set the configuration and job.setInputFormatClass for bzip2 files ?
>
> Thank you.
>
> Huanchen
>



-- 
Harsh J

Re: Read bzip2 file

Posted by TianYi Zhu <ti...@facilitatedigital.com>.
org.apache.hadoop.io.compress.BZip2Codec

On Wed, Sep 19, 2012 at 4:31 PM, Huanchen Zhang <ia...@gmail.com>wrote:

> Hello,
>
> I have bzip2 files as the input of mapper. How to set the configuration
> and job.setInputFormatClass for bzip2 files ?
>
> Thank you.
>
> Huanchen
>
>

Re: Read bzip2 file

Posted by Harsh J <ha...@cloudera.com>.
Hi Huanchen,

If your files have the .bz2 extension, then using TextInputFormat will
automatically detect them and uncompress when reading.

On Wed, Sep 19, 2012 at 12:01 PM, Huanchen Zhang <ia...@gmail.com> wrote:
> Hello,
>
> I have bzip2 files as the input of mapper. How to set the configuration and job.setInputFormatClass for bzip2 files ?
>
> Thank you.
>
> Huanchen
>



-- 
Harsh J

Re: Read bzip2 file

Posted by TianYi Zhu <ti...@facilitatedigital.com>.
org.apache.hadoop.io.compress.BZip2Codec

On Wed, Sep 19, 2012 at 4:31 PM, Huanchen Zhang <ia...@gmail.com>wrote:

> Hello,
>
> I have bzip2 files as the input of mapper. How to set the configuration
> and job.setInputFormatClass for bzip2 files ?
>
> Thank you.
>
> Huanchen
>
>

Re: Read bzip2 file

Posted by Harsh J <ha...@cloudera.com>.
Hi Huanchen,

If your files have the .bz2 extension, then using TextInputFormat will
automatically detect them and uncompress when reading.

On Wed, Sep 19, 2012 at 12:01 PM, Huanchen Zhang <ia...@gmail.com> wrote:
> Hello,
>
> I have bzip2 files as the input of mapper. How to set the configuration and job.setInputFormatClass for bzip2 files ?
>
> Thank you.
>
> Huanchen
>



-- 
Harsh J

Re: Read bzip2 file

Posted by TianYi Zhu <ti...@facilitatedigital.com>.
org.apache.hadoop.io.compress.BZip2Codec

On Wed, Sep 19, 2012 at 4:31 PM, Huanchen Zhang <ia...@gmail.com>wrote:

> Hello,
>
> I have bzip2 files as the input of mapper. How to set the configuration
> and job.setInputFormatClass for bzip2 files ?
>
> Thank you.
>
> Huanchen
>
>

Re: Read bzip2 file

Posted by Harsh J <ha...@cloudera.com>.
Hi Huanchen,

If your files have the .bz2 extension, then using TextInputFormat will
automatically detect them and uncompress when reading.

On Wed, Sep 19, 2012 at 12:01 PM, Huanchen Zhang <ia...@gmail.com> wrote:
> Hello,
>
> I have bzip2 files as the input of mapper. How to set the configuration and job.setInputFormatClass for bzip2 files ?
>
> Thank you.
>
> Huanchen
>



-- 
Harsh J