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

Hong Tang commented on HADOOP-6588:
-----------------------------------

bq. I think the CompressionCodecFactory should cache the codec classes and only 
calls Class.forName(..) at the first time.
I generally do not like singleton caches. And I think caching the factory at 
TextInputFormat level is probably better, as it also saves the cost of creating 
a factory object for each isSplitable call. In fact, the 
o.a.h.mapred.TextInputFormat does exactly that. 

> CompressionCodecFactory throws IllegalArgumentException
> -------------------------------------------------------
>
>                 Key: HADOOP-6588
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6588
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io
>            Reporter: Tsz Wo (Nicholas), SZE
>         Attachments: c6588_20100222.patch
>
>
> WordCount does not run. :(
> {noformat}
> java.lang.IllegalArgumentException: Compression codec 
> com.hadoop.compression.lzo.LzoCodec not found.
>         at 
> org.apache.hadoop.io.compress.CompressionCodecFactory.getCodecClasses(CompressionCodecFactory.java:96)
>         at 
> org.apache.hadoop.io.compress.CompressionCodecFactory.<init>(CompressionCodecFactory.java:134)
>         at 
> org.apache.hadoop.mapreduce.lib.input.TextInputFormat.isSplitable(TextInputFormat.java:46)
>         at 
> org.apache.hadoop.mapreduce.lib.input.FileInputFormat.getSplits(FileInputFormat.java:247)
>         at 
> org.apache.hadoop.mapred.JobClient.writeNewSplits(JobClient.java:886)
>         at 
> org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:780)
>         at org.apache.hadoop.mapreduce.Job.submit(Job.java:444)
>         at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:459)
>         at org.apache.hadoop.examples.WordCount.main(WordCount.java:67)
>         ...
> {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to