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

Billie Rinaldi commented on ACCUMULO-467:
-----------------------------------------

This is why the patch broke the build :
{noformat}
-        return (Mapper.Context) 
MAP_CONTEXT_CONSTRUCTOR.newInstance((Mapper<K1,V1,K2,V2>) 
MAP_CONSTRUCTOR.newInstance(), basis);
+        @SuppressWarnings("unchecked")
+        Mapper<K1,V1,K2,V2>.Context newInstance = 
(Mapper<K1,V1,K2,V2>.Context) 
MAP_CONTEXT_CONSTRUCTOR.newInstance(MAP_CONSTRUCTOR.newInstance(), basis);
+        return newInstance;
       } else {
-        return (Mapper.Context) MAP_CONTEXT_CONSTRUCTOR.newInstance(m, 
tac.getConfiguration(), tac.getTaskAttemptID(), reader, writer, committer, 
reporter,
-            split);
+        @SuppressWarnings("unchecked")
+        Mapper<K1,V1,K2,V2>.Context newInstance = 
(Mapper<K1,V1,K2,V2>.Context) MAP_CONTEXT_CONSTRUCTOR.newInstance(m, 
tac.getConfiguration(),
+            tac.getTaskAttemptID(), reader, writer, committer, reporter, 
split);
+        return newInstance;
{noformat}

If you take a look at the svn log for ContextFactory, you'll see I made the 
same mistake when I first checked it in and fixed it in revision 1229638: 
http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/ContextFactory.java?view=log
                
> Allow the properties for AccumuloFileOutputFormat to be set in a mapreduce job
> ------------------------------------------------------------------------------
>
>                 Key: ACCUMULO-467
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-467
>             Project: Accumulo
>          Issue Type: Improvement
>          Components: client
>    Affects Versions: 1.4.1, 1.3.6, 1.4.0, 1.3.5
>            Reporter: Chris Waring
>            Assignee: Christopher Tubbs
>            Priority: Minor
>              Labels: AccumuloFileOutputFormat,, mapreduce
>             Fix For: 1.5.0
>
>         Attachments: ACCUMULO-467-1.patch
>
>
> Currently there is no way to set any of the configuration options for 
> AccumuloFileOutputFormat in a mapreduce job. Specifically the compression 
> code, file block compression size, and index block compression size to name a 
> few.  Since AccumuloFileOutputFormat calls 
> FileOperations.getInstance.openWriter()  which takes both a Configuration and 
> AccumuloConfiguration one could inside the openWriter function check to see 
> if the parameters are specified in the Configuration object and if not take 
> the default parameters from the AccumuloConfiguration object.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to