You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Hairong Kuang (JIRA)" <ji...@apache.org> on 2010/10/11 20:31:32 UTC
[jira] Created: (HADOOP-6996) Allow CodecFactory to return a codec
object given a codec' class name
Allow CodecFactory to return a codec object given a codec' class name
---------------------------------------------------------------------
Key: HADOOP-6996
URL: https://issues.apache.org/jira/browse/HADOOP-6996
Project: Hadoop Common
Issue Type: New Feature
Components: io
Affects Versions: 0.22.0
Reporter: Hairong Kuang
Assignee: Hairong Kuang
Fix For: 0.22.0
CodecFactory specify the list of codec that are supported by Hadoop. However, it returns a codec only by a file's name. I would like to make getCodec method to alternatively take a codec's class name.
This is required by HDFS-1435, where
1. it allows an HDFS admin to configure which codec to use to save an image.
2. It stores the codec class name in its on-disk image instead of a file's suffix.
When saving and reading an image, I'd like to get an codec from CodecFactory by its class name.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HADOOP-6996) Allow CodecFactory to return a codec
object given a codec' class name
Posted by "Hairong Kuang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hairong Kuang updated HADOOP-6996:
----------------------------------
Status: Patch Available (was: Open)
> Allow CodecFactory to return a codec object given a codec' class name
> ---------------------------------------------------------------------
>
> Key: HADOOP-6996
> URL: https://issues.apache.org/jira/browse/HADOOP-6996
> Project: Hadoop Common
> Issue Type: New Feature
> Components: io
> Affects Versions: 0.22.0
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Fix For: 0.22.0
>
> Attachments: getCodecByClassName.patch
>
>
> CodecFactory specify the list of codec that are supported by Hadoop. However, it returns a codec only by a file's name. I would like to make getCodec method to alternatively take a codec's class name.
> This is required by HDFS-1435, where
> 1. it allows an HDFS admin to configure which codec to use to save an image.
> 2. It stores the codec class name in its on-disk image instead of a file's suffix.
> When saving and reading an image, I'd like to get an codec from CodecFactory by its class name.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HADOOP-6996) Allow CodecFactory to return a codec
object given a codec' class name
Posted by "Hairong Kuang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hairong Kuang updated HADOOP-6996:
----------------------------------
Attachment: getCodecByClassName1.patch
This patch additionally adds a default constructor to CompressionCodecFactory.
> Allow CodecFactory to return a codec object given a codec' class name
> ---------------------------------------------------------------------
>
> Key: HADOOP-6996
> URL: https://issues.apache.org/jira/browse/HADOOP-6996
> Project: Hadoop Common
> Issue Type: New Feature
> Components: io
> Affects Versions: 0.22.0
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Fix For: 0.22.0
>
> Attachments: getCodecByClassName.patch, getCodecByClassName1.patch
>
>
> CodecFactory specify the list of codec that are supported by Hadoop. However, it returns a codec only by a file's name. I would like to make getCodec method to alternatively take a codec's class name.
> This is required by HDFS-1435, where
> 1. it allows an HDFS admin to configure which codec to use to save an image.
> 2. It stores the codec class name in its on-disk image instead of a file's suffix.
> When saving and reading an image, I'd like to get an codec from CodecFactory by its class name.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HADOOP-6996) Allow CodecFactory to return a codec
object given a codec' class name
Posted by "Hairong Kuang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hairong Kuang updated HADOOP-6996:
----------------------------------
Attachment: (was: getCodecByClassName1.patch)
> Allow CodecFactory to return a codec object given a codec' class name
> ---------------------------------------------------------------------
>
> Key: HADOOP-6996
> URL: https://issues.apache.org/jira/browse/HADOOP-6996
> Project: Hadoop Common
> Issue Type: New Feature
> Components: io
> Affects Versions: 0.22.0
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Fix For: 0.22.0
>
> Attachments: getCodecByClassName.patch
>
>
> CodecFactory specify the list of codec that are supported by Hadoop. However, it returns a codec only by a file's name. I would like to make getCodec method to alternatively take a codec's class name.
> This is required by HDFS-1435, where
> 1. it allows an HDFS admin to configure which codec to use to save an image.
> 2. It stores the codec class name in its on-disk image instead of a file's suffix.
> When saving and reading an image, I'd like to get an codec from CodecFactory by its class name.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-6996) Allow CodecFactory to return a
codec object given a codec' class name
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923979#action_12923979 ]
Hadoop QA commented on HADOOP-6996:
-----------------------------------
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12456881/getCodecByClassName.patch
against trunk revision 1022697.
+1 @author. The patch does not contain any @author tags.
+1 tests included. The patch appears to include 3 new or modified tests.
-1 patch. The patch command could not apply the patch.
Console output: http://hudson.zones.apache.org/hudson/job/PreCommit-HADOOP-Build/2/console
This message is automatically generated.
> Allow CodecFactory to return a codec object given a codec' class name
> ---------------------------------------------------------------------
>
> Key: HADOOP-6996
> URL: https://issues.apache.org/jira/browse/HADOOP-6996
> Project: Hadoop Common
> Issue Type: New Feature
> Components: io
> Affects Versions: 0.22.0
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Fix For: 0.22.0
>
> Attachments: getCodecByClassName.patch
>
>
> CodecFactory specify the list of codec that are supported by Hadoop. However, it returns a codec only by a file's name. I would like to make getCodec method to alternatively take a codec's class name.
> This is required by HDFS-1435, where
> 1. it allows an HDFS admin to configure which codec to use to save an image.
> 2. It stores the codec class name in its on-disk image instead of a file's suffix.
> When saving and reading an image, I'd like to get an codec from CodecFactory by its class name.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-6996) Allow CodecFactory to return a
codec object given a codec' class name
Posted by "dhruba borthakur (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12920096#action_12920096 ]
dhruba borthakur commented on HADOOP-6996:
------------------------------------------
Code looks good. One minor comment:
{code}
public CompressionCodec getCodecByClassName(String classname) {
if (codecsByClassName == null) {
return null;
}
return codecsByClassName.get(classname);
}
{code}
do we really need to check for codecsByClassName == null? I see that it always initialized in the constructor.
> Allow CodecFactory to return a codec object given a codec' class name
> ---------------------------------------------------------------------
>
> Key: HADOOP-6996
> URL: https://issues.apache.org/jira/browse/HADOOP-6996
> Project: Hadoop Common
> Issue Type: New Feature
> Components: io
> Affects Versions: 0.22.0
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Fix For: 0.22.0
>
> Attachments: getCodecByClassName.patch, getCodecByClassName1.patch
>
>
> CodecFactory specify the list of codec that are supported by Hadoop. However, it returns a codec only by a file's name. I would like to make getCodec method to alternatively take a codec's class name.
> This is required by HDFS-1435, where
> 1. it allows an HDFS admin to configure which codec to use to save an image.
> 2. It stores the codec class name in its on-disk image instead of a file's suffix.
> When saving and reading an image, I'd like to get an codec from CodecFactory by its class name.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-6996) Allow CodecFactory to return a
codec object given a codec' class name
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923837#action_12923837 ]
Hudson commented on HADOOP-6996:
--------------------------------
Integrated in Hadoop-Common-trunk #489 (See [https://hudson.apache.org/hudson/job/Hadoop-Common-trunk/489/])
> Allow CodecFactory to return a codec object given a codec' class name
> ---------------------------------------------------------------------
>
> Key: HADOOP-6996
> URL: https://issues.apache.org/jira/browse/HADOOP-6996
> Project: Hadoop Common
> Issue Type: New Feature
> Components: io
> Affects Versions: 0.22.0
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Fix For: 0.22.0
>
> Attachments: getCodecByClassName.patch
>
>
> CodecFactory specify the list of codec that are supported by Hadoop. However, it returns a codec only by a file's name. I would like to make getCodec method to alternatively take a codec's class name.
> This is required by HDFS-1435, where
> 1. it allows an HDFS admin to configure which codec to use to save an image.
> 2. It stores the codec class name in its on-disk image instead of a file's suffix.
> When saving and reading an image, I'd like to get an codec from CodecFactory by its class name.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-6996) Allow CodecFactory to return a
codec object given a codec' class name
Posted by "dhruba borthakur (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12921093#action_12921093 ]
dhruba borthakur commented on HADOOP-6996:
------------------------------------------
+1 looks good to me.
> Allow CodecFactory to return a codec object given a codec' class name
> ---------------------------------------------------------------------
>
> Key: HADOOP-6996
> URL: https://issues.apache.org/jira/browse/HADOOP-6996
> Project: Hadoop Common
> Issue Type: New Feature
> Components: io
> Affects Versions: 0.22.0
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Fix For: 0.22.0
>
> Attachments: getCodecByClassName.patch
>
>
> CodecFactory specify the list of codec that are supported by Hadoop. However, it returns a codec only by a file's name. I would like to make getCodec method to alternatively take a codec's class name.
> This is required by HDFS-1435, where
> 1. it allows an HDFS admin to configure which codec to use to save an image.
> 2. It stores the codec class name in its on-disk image instead of a file's suffix.
> When saving and reading an image, I'd like to get an codec from CodecFactory by its class name.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-6996) Allow CodecFactory to return a
codec object given a codec' class name
Posted by "Hairong Kuang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919970#action_12919970 ]
Hairong Kuang commented on HADOOP-6996:
---------------------------------------
Ran ant patch and test on my dev machine:
[exec] -1 overall.
[exec]
[exec] +1 @author. The patch does not contain any @author tags.
[exec]
[exec] +1 tests included. The patch appears to i
[exec] nclude 3 new or modified tests.
[exec]
[exec] -1 javadoc. The javadoc tool appears to have generated 1 warning messages.
[exec]
[exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings.
[exec]
[exec] +1 findbugs. The patch does not introduce any new Findbugs warnings.
[exec]
[exec] +1 release audit. The applied patch does not increase the total number of release audit warnings.
[exec]
[exec] +1 system tests framework. The patch passed system tests framework compile.
[exec]
BUILD SUCCESSFUL
Total time: 8 minutes 8 seconds
For -1 on java doc, all 6 javadoc warnings seem not related to my patch.
> Allow CodecFactory to return a codec object given a codec' class name
> ---------------------------------------------------------------------
>
> Key: HADOOP-6996
> URL: https://issues.apache.org/jira/browse/HADOOP-6996
> Project: Hadoop Common
> Issue Type: New Feature
> Components: io
> Affects Versions: 0.22.0
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Fix For: 0.22.0
>
> Attachments: getCodecByClassName.patch
>
>
> CodecFactory specify the list of codec that are supported by Hadoop. However, it returns a codec only by a file's name. I would like to make getCodec method to alternatively take a codec's class name.
> This is required by HDFS-1435, where
> 1. it allows an HDFS admin to configure which codec to use to save an image.
> 2. It stores the codec class name in its on-disk image instead of a file's suffix.
> When saving and reading an image, I'd like to get an codec from CodecFactory by its class name.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-6996) Allow CodecFactory to return a
codec object given a codec' class name
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923591#action_12923591 ]
Hudson commented on HADOOP-6996:
--------------------------------
Integrated in Hadoop-Common-trunk-Commit #395 (See [https://hudson.apache.org/hudson/job/Hadoop-Common-trunk-Commit/395/])
> Allow CodecFactory to return a codec object given a codec' class name
> ---------------------------------------------------------------------
>
> Key: HADOOP-6996
> URL: https://issues.apache.org/jira/browse/HADOOP-6996
> Project: Hadoop Common
> Issue Type: New Feature
> Components: io
> Affects Versions: 0.22.0
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Fix For: 0.22.0
>
> Attachments: getCodecByClassName.patch
>
>
> CodecFactory specify the list of codec that are supported by Hadoop. However, it returns a codec only by a file's name. I would like to make getCodec method to alternatively take a codec's class name.
> This is required by HDFS-1435, where
> 1. it allows an HDFS admin to configure which codec to use to save an image.
> 2. It stores the codec class name in its on-disk image instead of a file's suffix.
> When saving and reading an image, I'd like to get an codec from CodecFactory by its class name.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-6996) Allow CodecFactory to return a
codec object given a codec' class name
Posted by "Hairong Kuang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12920254#action_12920254 ]
Hairong Kuang commented on HADOOP-6996:
---------------------------------------
You are right. But before I add the default class constructor, there was a possibility that codecClassName is null. Now I realize that adding the default constructor is an incompatible change. Let me revert this change by deleting the 2nd patch: getCodecByClassName1.patch.
> Allow CodecFactory to return a codec object given a codec' class name
> ---------------------------------------------------------------------
>
> Key: HADOOP-6996
> URL: https://issues.apache.org/jira/browse/HADOOP-6996
> Project: Hadoop Common
> Issue Type: New Feature
> Components: io
> Affects Versions: 0.22.0
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Fix For: 0.22.0
>
> Attachments: getCodecByClassName.patch
>
>
> CodecFactory specify the list of codec that are supported by Hadoop. However, it returns a codec only by a file's name. I would like to make getCodec method to alternatively take a codec's class name.
> This is required by HDFS-1435, where
> 1. it allows an HDFS admin to configure which codec to use to save an image.
> 2. It stores the codec class name in its on-disk image instead of a file's suffix.
> When saving and reading an image, I'd like to get an codec from CodecFactory by its class name.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HADOOP-6996) Allow CodecFactory to return a codec
object given a codec' class name
Posted by "Hairong Kuang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hairong Kuang updated HADOOP-6996:
----------------------------------
Resolution: Fixed
Hadoop Flags: [Reviewed]
Status: Resolved (was: Patch Available)
I've committed this!
> Allow CodecFactory to return a codec object given a codec' class name
> ---------------------------------------------------------------------
>
> Key: HADOOP-6996
> URL: https://issues.apache.org/jira/browse/HADOOP-6996
> Project: Hadoop Common
> Issue Type: New Feature
> Components: io
> Affects Versions: 0.22.0
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Fix For: 0.22.0
>
> Attachments: getCodecByClassName.patch
>
>
> CodecFactory specify the list of codec that are supported by Hadoop. However, it returns a codec only by a file's name. I would like to make getCodec method to alternatively take a codec's class name.
> This is required by HDFS-1435, where
> 1. it allows an HDFS admin to configure which codec to use to save an image.
> 2. It stores the codec class name in its on-disk image instead of a file's suffix.
> When saving and reading an image, I'd like to get an codec from CodecFactory by its class name.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HADOOP-6996) Allow CodecFactory to return a codec
object given a codec' class name
Posted by "Hairong Kuang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hairong Kuang updated HADOOP-6996:
----------------------------------
Attachment: getCodecByClassName.patch
This patch
1. adds a classname to codec map to the CodecFactory;
2. adds a new method getCodecByClassName that returns a codec object given a codec class name;
3. Adds a unit test to test this new method.
> Allow CodecFactory to return a codec object given a codec' class name
> ---------------------------------------------------------------------
>
> Key: HADOOP-6996
> URL: https://issues.apache.org/jira/browse/HADOOP-6996
> Project: Hadoop Common
> Issue Type: New Feature
> Components: io
> Affects Versions: 0.22.0
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Fix For: 0.22.0
>
> Attachments: getCodecByClassName.patch
>
>
> CodecFactory specify the list of codec that are supported by Hadoop. However, it returns a codec only by a file's name. I would like to make getCodec method to alternatively take a codec's class name.
> This is required by HDFS-1435, where
> 1. it allows an HDFS admin to configure which codec to use to save an image.
> 2. It stores the codec class name in its on-disk image instead of a file's suffix.
> When saving and reading an image, I'd like to get an codec from CodecFactory by its class name.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.