hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom White (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-7323) Add capability to resolve compression codec based on codec name
Date Wed, 01 Jun 2011 21:38:47 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-7323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042454#comment-13042454
] 

Tom White commented on HADOOP-7323:
-----------------------------------

Thinking about this more, overloading getCodecByClassName() may be misleading, so it might
be better to add a new method called getCodecByName() which returns codecs based on class
name or alias. There are only a couple of callers of getCodecByClassName() (in HDFS) so it
doesn't make much difference in terms of changing code to use the new method.

To take advantage of the new method expressions of the form

{code}
conf.getClassByName(name).asSubclass(CompressionCodec.class)
{code}

should be replaced with

{code}
CompressionCodecFactory.getCodecByName(name)
{code}

This mainly applies in the MapReduce project.

We should also add a getCodecClassByName() method at the same time, since sometimes only the
class is needed.

> Add capability to resolve compression codec based on codec name
> ---------------------------------------------------------------
>
>                 Key: HADOOP-7323
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7323
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: io
>    Affects Versions: 0.21.0
>            Reporter: Alejandro Abdelnur
>            Assignee: Alejandro Abdelnur
>             Fix For: 0.22.0
>
>         Attachments: HADOOP-7323.patch, HADOOP-7323b.patch
>
>
> When setting up a compression codec in an MR job the full class name of the codec must
be used.
> To ease usability, compression codecs should be resolved by their codec name (ie 'gzip',
'deflate', 'zlib', 'bzip2') instead their full codec class name.
> Besides easy of use for Hadoop users who would use the codec alias instead the full codec
class name, it could simplify how HBase resolves loads the codecs.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message