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

Gera Shegalov commented on MAPREDUCE-6174:
------------------------------------------

Thanks for 004, [~eepayne]!
Few suggestions:
- We can move setting conf and merger from constructors for OnDisk and InMem to 
IFileWrappedMapOutput via super  
- We can remove unused parameters {{reduceId}} and {{mapOutputFile}} from the 
OnDiskMapOutput constructors.

I am not sure the new test contributes a lot to code coverage. I think it's not 
necessary. Instead, in that same TestFetcher we can refer to special classes by 
the the base class. For example we can replace declarations:
{code}
-    InMemoryMapOutput<Text, Text> immo = mock(InMemoryMapOutput.class);
+    IFileWrappedMapOutput<Text, Text> immo = mock(InMemoryMapOutput.class);
{code}

and 

{code}
-    OnDiskMapOutput<Text,Text> odmo = new OnDiskMapOutput<Text,Text>(map1ID,
-        id, mm, 100L, job, mof, fetcher, true, fs, onDiskMapOutputPath);
+    IFileWrappedMapOutput<Text,Text> odmo =
+        new OnDiskMapOutput<Text,Text>(map1ID, mm, 100L, job, fetcher, true, 
fs,
+            onDiskMapOutputPath);
 
{code}

throughout TestFetcher.



> Combine common stream code into parent class for InMemoryMapOutput and 
> OnDiskMapOutput.
> ---------------------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-6174
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-6174
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: mrv2
>    Affects Versions: 3.0.0, 2.6.0
>            Reporter: Eric Payne
>            Assignee: Eric Payne
>              Labels: BB2015-05-RFC
>         Attachments: MAPREDUCE-6174.002.patch, MAPREDUCE-6174.003.patch, 
> MAPREDUCE-6174.004.patch, MAPREDUCE-6174.v1.txt
>
>
> Per MAPREDUCE-6166, both InMemoryMapOutput and OnDiskMapOutput will be doing 
> similar things with regards to IFile streams.
> In order to make it explicit that InMemoryMapOutput and OnDiskMapOutput are 
> different from 3rd-party implementations, this JIRA will make them subclass a 
> common class (see 
> https://issues.apache.org/jira/browse/MAPREDUCE-6166?focusedCommentId=14223368&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14223368)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to