You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mrunit.apache.org by "JenWang (JIRA)" <ji...@apache.org> on 2011/05/22 13:47:47 UTC

[jira] [Created] (MRUNIT-12) Support MultipleOutputs test, load dataset from text,and some usefull annotation

Support MultipleOutputs test, load dataset from text,and some usefull annotation
--------------------------------------------------------------------------------

                 Key: MRUNIT-12
                 URL: https://issues.apache.org/jira/browse/MRUNIT-12
             Project: MRUnit
          Issue Type: New Feature
            Reporter: JenWang


example:

public void testReduce () {
  List<TimeInfo> values = new ArrayList<TimeInfo>();
  values.add(new TimeInfo(1, 3));
  values.add(new TimeInfo(2, 5));
  values.add(new TimeInfo(3, 7));
  reduceDriver.withReducer(reducer)
          .withInput(new Text("444"), values)
          . withMutiOutput ("somePrefix"+444%8,new Text("444"),new LongWritable(2))
          .runTest();
}
 
load test data from text and use annotation:
 
@RunWith(MRUnitJunit4TestClassRunner.class)
public class XXXMRUseAnnotationTest {
  @MapInputSet
  @MapReduce(mapper = Map.class, reducer = Reduce.class)
  private MapReduceDriver<LongWritable, Text, Text, TimeInfo, Text, LongWritable> mrDriver;

  @Test
  @MapInputSet("ConsignTimeMRUseAnnotationTest.txt")
  public void testMapReduce_3record_1user() {
       mrDriver. withMutiOutput ("somePrefix"+444%8,new Text("444"),new LongWritable(2))
                    .runTest();
   }
}

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

[jira] [Closed] (MRUNIT-12) Support MultipleOutputs test, load dataset from text,and some usefull annotation

Posted by "Jim Donofrio (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MRUNIT-12?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jim Donofrio closed MRUNIT-12.
------------------------------

       Resolution: Duplicate
    Fix Version/s:     (was: 1.0.0)

duplicate of MRUNIT-13
                
> Support MultipleOutputs test, load dataset from text,and some usefull annotation
> --------------------------------------------------------------------------------
>
>                 Key: MRUNIT-12
>                 URL: https://issues.apache.org/jira/browse/MRUNIT-12
>             Project: MRUnit
>          Issue Type: New Feature
>    Affects Versions: 0.5.0
>            Reporter: JenWang
>            Assignee: E. Sammer
>         Attachments: mrunit_enhance.zip, mrunit_enhance2.zip
>
>
> Some time we need to test reduce/mapreduce which used MultipleOutputs to output,mrunit not support this yet.so, I writed some code support this; 
> improvement which make mrunit nicer to use:load test dataset from text and some usefull annotation
> example:
> public void testReduce () {
>   List<TimeInfo> values = new ArrayList<TimeInfo>();
>   values.add(new TimeInfo(1, 3));
>   values.add(new TimeInfo(2, 5));
>   values.add(new TimeInfo(3, 7));
>   reduceDriver.withReducer(reducer)
>           .withInput(new Text("444"), values)
>           . withMutiOutput ("somePrefix"+444%8,new Text("444"),new LongWritable(2))
>           .runTest();
> }
>  
> load test data from text and use annotation:
>  
> @RunWith(MRUnitJunit4TestClassRunner.class)
> public class XXXMRUseAnnotationTest {
>   @MapInputSet
>   @MapReduce(mapper = Map.class, reducer = Reduce.class)
>   private MapReduceDriver<LongWritable, Text, Text, TimeInfo, Text, LongWritable> mrDriver;
>   @Test
>   @MapInputSet("ConsignTimeMRUseAnnotationTest.txt")
>   public void testMapReduce_3record_1user() {
>        mrDriver. withMutiOutput ("somePrefix"+444%8,new Text("444"),new LongWritable(2))
>                     .runTest();
>    }
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (MRUNIT-12) Support MultipleOutputs test, load dataset from text,and some usefull annotation

Posted by "JenWang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MRUNIT-12?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

JenWang updated MRUNIT-12:
--------------------------

    Description: 
Some time we need to test reduce/mapreduce which used MultipleOutputs to output,mrunit not support this yet.so, I writed some code support this; 
improvement which make mrunit nicer to use:load test dataset from text and some usefull annotation

example:

public void testReduce () {
  List<TimeInfo> values = new ArrayList<TimeInfo>();
  values.add(new TimeInfo(1, 3));
  values.add(new TimeInfo(2, 5));
  values.add(new TimeInfo(3, 7));
  reduceDriver.withReducer(reducer)
          .withInput(new Text("444"), values)
          . withMutiOutput ("somePrefix"+444%8,new Text("444"),new LongWritable(2))
          .runTest();
}
 
load test data from text and use annotation:
 
@RunWith(MRUnitJunit4TestClassRunner.class)
public class XXXMRUseAnnotationTest {
  @MapInputSet
  @MapReduce(mapper = Map.class, reducer = Reduce.class)
  private MapReduceDriver<LongWritable, Text, Text, TimeInfo, Text, LongWritable> mrDriver;

  @Test
  @MapInputSet("ConsignTimeMRUseAnnotationTest.txt")
  public void testMapReduce_3record_1user() {
       mrDriver. withMutiOutput ("somePrefix"+444%8,new Text("444"),new LongWritable(2))
                    .runTest();
   }
}

  was:
example:

public void testReduce () {
  List<TimeInfo> values = new ArrayList<TimeInfo>();
  values.add(new TimeInfo(1, 3));
  values.add(new TimeInfo(2, 5));
  values.add(new TimeInfo(3, 7));
  reduceDriver.withReducer(reducer)
          .withInput(new Text("444"), values)
          . withMutiOutput ("somePrefix"+444%8,new Text("444"),new LongWritable(2))
          .runTest();
}
 
load test data from text and use annotation:
 
@RunWith(MRUnitJunit4TestClassRunner.class)
public class XXXMRUseAnnotationTest {
  @MapInputSet
  @MapReduce(mapper = Map.class, reducer = Reduce.class)
  private MapReduceDriver<LongWritable, Text, Text, TimeInfo, Text, LongWritable> mrDriver;

  @Test
  @MapInputSet("ConsignTimeMRUseAnnotationTest.txt")
  public void testMapReduce_3record_1user() {
       mrDriver. withMutiOutput ("somePrefix"+444%8,new Text("444"),new LongWritable(2))
                    .runTest();
   }
}


> Support MultipleOutputs test, load dataset from text,and some usefull annotation
> --------------------------------------------------------------------------------
>
>                 Key: MRUNIT-12
>                 URL: https://issues.apache.org/jira/browse/MRUNIT-12
>             Project: MRUnit
>          Issue Type: New Feature
>            Reporter: JenWang
>         Attachments: mrunit_enhance.zip
>
>
> Some time we need to test reduce/mapreduce which used MultipleOutputs to output,mrunit not support this yet.so, I writed some code support this; 
> improvement which make mrunit nicer to use:load test dataset from text and some usefull annotation
> example:
> public void testReduce () {
>   List<TimeInfo> values = new ArrayList<TimeInfo>();
>   values.add(new TimeInfo(1, 3));
>   values.add(new TimeInfo(2, 5));
>   values.add(new TimeInfo(3, 7));
>   reduceDriver.withReducer(reducer)
>           .withInput(new Text("444"), values)
>           . withMutiOutput ("somePrefix"+444%8,new Text("444"),new LongWritable(2))
>           .runTest();
> }
>  
> load test data from text and use annotation:
>  
> @RunWith(MRUnitJunit4TestClassRunner.class)
> public class XXXMRUseAnnotationTest {
>   @MapInputSet
>   @MapReduce(mapper = Map.class, reducer = Reduce.class)
>   private MapReduceDriver<LongWritable, Text, Text, TimeInfo, Text, LongWritable> mrDriver;
>   @Test
>   @MapInputSet("ConsignTimeMRUseAnnotationTest.txt")
>   public void testMapReduce_3record_1user() {
>        mrDriver. withMutiOutput ("somePrefix"+444%8,new Text("444"),new LongWritable(2))
>                     .runTest();
>    }
> }

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

[jira] [Reopened] (MRUNIT-12) Support MultipleOutputs test, load dataset from text,and some usefull annotation

Posted by "E. Sammer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MRUNIT-12?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

E. Sammer reopened MRUNIT-12:
-----------------------------

      Assignee: E. Sammer

Assigning to myself so we can track the patch.

> Support MultipleOutputs test, load dataset from text,and some usefull annotation
> --------------------------------------------------------------------------------
>
>                 Key: MRUNIT-12
>                 URL: https://issues.apache.org/jira/browse/MRUNIT-12
>             Project: MRUnit
>          Issue Type: New Feature
>            Reporter: JenWang
>            Assignee: E. Sammer
>         Attachments: mrunit_enhance.zip
>
>
> Some time we need to test reduce/mapreduce which used MultipleOutputs to output,mrunit not support this yet.so, I writed some code support this; 
> improvement which make mrunit nicer to use:load test dataset from text and some usefull annotation
> example:
> public void testReduce () {
>   List<TimeInfo> values = new ArrayList<TimeInfo>();
>   values.add(new TimeInfo(1, 3));
>   values.add(new TimeInfo(2, 5));
>   values.add(new TimeInfo(3, 7));
>   reduceDriver.withReducer(reducer)
>           .withInput(new Text("444"), values)
>           . withMutiOutput ("somePrefix"+444%8,new Text("444"),new LongWritable(2))
>           .runTest();
> }
>  
> load test data from text and use annotation:
>  
> @RunWith(MRUnitJunit4TestClassRunner.class)
> public class XXXMRUseAnnotationTest {
>   @MapInputSet
>   @MapReduce(mapper = Map.class, reducer = Reduce.class)
>   private MapReduceDriver<LongWritable, Text, Text, TimeInfo, Text, LongWritable> mrDriver;
>   @Test
>   @MapInputSet("ConsignTimeMRUseAnnotationTest.txt")
>   public void testMapReduce_3record_1user() {
>        mrDriver. withMutiOutput ("somePrefix"+444%8,new Text("444"),new LongWritable(2))
>                     .runTest();
>    }
> }

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

[jira] [Updated] (MRUNIT-12) Support MultipleOutputs test, load dataset from text,and some usefull annotation

Posted by "Brock Noland (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MRUNIT-12?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brock Noland updated MRUNIT-12:
-------------------------------

    Fix Version/s:     (was: 0.8.0)
                   1.0.0
    
> Support MultipleOutputs test, load dataset from text,and some usefull annotation
> --------------------------------------------------------------------------------
>
>                 Key: MRUNIT-12
>                 URL: https://issues.apache.org/jira/browse/MRUNIT-12
>             Project: MRUnit
>          Issue Type: New Feature
>    Affects Versions: 0.5.0
>            Reporter: JenWang
>            Assignee: E. Sammer
>             Fix For: 1.0.0
>
>         Attachments: mrunit_enhance.zip, mrunit_enhance2.zip
>
>
> Some time we need to test reduce/mapreduce which used MultipleOutputs to output,mrunit not support this yet.so, I writed some code support this; 
> improvement which make mrunit nicer to use:load test dataset from text and some usefull annotation
> example:
> public void testReduce () {
>   List<TimeInfo> values = new ArrayList<TimeInfo>();
>   values.add(new TimeInfo(1, 3));
>   values.add(new TimeInfo(2, 5));
>   values.add(new TimeInfo(3, 7));
>   reduceDriver.withReducer(reducer)
>           .withInput(new Text("444"), values)
>           . withMutiOutput ("somePrefix"+444%8,new Text("444"),new LongWritable(2))
>           .runTest();
> }
>  
> load test data from text and use annotation:
>  
> @RunWith(MRUnitJunit4TestClassRunner.class)
> public class XXXMRUseAnnotationTest {
>   @MapInputSet
>   @MapReduce(mapper = Map.class, reducer = Reduce.class)
>   private MapReduceDriver<LongWritable, Text, Text, TimeInfo, Text, LongWritable> mrDriver;
>   @Test
>   @MapInputSet("ConsignTimeMRUseAnnotationTest.txt")
>   public void testMapReduce_3record_1user() {
>        mrDriver. withMutiOutput ("somePrefix"+444%8,new Text("444"),new LongWritable(2))
>                     .runTest();
>    }
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (MRUNIT-12) Support MultipleOutputs test, load dataset from text,and some usefull annotation

Posted by "JenWang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MRUNIT-12?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

JenWang updated MRUNIT-12:
--------------------------

    Attachment: mrunit_enhance2.zip

ok,i reupload it

> Support MultipleOutputs test, load dataset from text,and some usefull annotation
> --------------------------------------------------------------------------------
>
>                 Key: MRUNIT-12
>                 URL: https://issues.apache.org/jira/browse/MRUNIT-12
>             Project: MRUnit
>          Issue Type: New Feature
>    Affects Versions: 0.5.0
>            Reporter: JenWang
>            Assignee: E. Sammer
>             Fix For: 0.5.0
>
>         Attachments: mrunit_enhance.zip, mrunit_enhance2.zip
>
>
> Some time we need to test reduce/mapreduce which used MultipleOutputs to output,mrunit not support this yet.so, I writed some code support this; 
> improvement which make mrunit nicer to use:load test dataset from text and some usefull annotation
> example:
> public void testReduce () {
>   List<TimeInfo> values = new ArrayList<TimeInfo>();
>   values.add(new TimeInfo(1, 3));
>   values.add(new TimeInfo(2, 5));
>   values.add(new TimeInfo(3, 7));
>   reduceDriver.withReducer(reducer)
>           .withInput(new Text("444"), values)
>           . withMutiOutput ("somePrefix"+444%8,new Text("444"),new LongWritable(2))
>           .runTest();
> }
>  
> load test data from text and use annotation:
>  
> @RunWith(MRUnitJunit4TestClassRunner.class)
> public class XXXMRUseAnnotationTest {
>   @MapInputSet
>   @MapReduce(mapper = Map.class, reducer = Reduce.class)
>   private MapReduceDriver<LongWritable, Text, Text, TimeInfo, Text, LongWritable> mrDriver;
>   @Test
>   @MapInputSet("ConsignTimeMRUseAnnotationTest.txt")
>   public void testMapReduce_3record_1user() {
>        mrDriver. withMutiOutput ("somePrefix"+444%8,new Text("444"),new LongWritable(2))
>                     .runTest();
>    }
> }

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

[jira] [Updated] (MRUNIT-12) Support MultipleOutputs test, load dataset from text,and some usefull annotation

Posted by "E. Sammer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MRUNIT-12?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

E. Sammer updated MRUNIT-12:
----------------------------

    Fix Version/s:     (was: 0.5.0)
                   0.8.0

> Support MultipleOutputs test, load dataset from text,and some usefull annotation
> --------------------------------------------------------------------------------
>
>                 Key: MRUNIT-12
>                 URL: https://issues.apache.org/jira/browse/MRUNIT-12
>             Project: MRUnit
>          Issue Type: New Feature
>    Affects Versions: 0.5.0
>            Reporter: JenWang
>            Assignee: E. Sammer
>             Fix For: 0.8.0
>
>         Attachments: mrunit_enhance.zip, mrunit_enhance2.zip
>
>
> Some time we need to test reduce/mapreduce which used MultipleOutputs to output,mrunit not support this yet.so, I writed some code support this; 
> improvement which make mrunit nicer to use:load test dataset from text and some usefull annotation
> example:
> public void testReduce () {
>   List<TimeInfo> values = new ArrayList<TimeInfo>();
>   values.add(new TimeInfo(1, 3));
>   values.add(new TimeInfo(2, 5));
>   values.add(new TimeInfo(3, 7));
>   reduceDriver.withReducer(reducer)
>           .withInput(new Text("444"), values)
>           . withMutiOutput ("somePrefix"+444%8,new Text("444"),new LongWritable(2))
>           .runTest();
> }
>  
> load test data from text and use annotation:
>  
> @RunWith(MRUnitJunit4TestClassRunner.class)
> public class XXXMRUseAnnotationTest {
>   @MapInputSet
>   @MapReduce(mapper = Map.class, reducer = Reduce.class)
>   private MapReduceDriver<LongWritable, Text, Text, TimeInfo, Text, LongWritable> mrDriver;
>   @Test
>   @MapInputSet("ConsignTimeMRUseAnnotationTest.txt")
>   public void testMapReduce_3record_1user() {
>        mrDriver. withMutiOutput ("somePrefix"+444%8,new Text("444"),new LongWritable(2))
>                     .runTest();
>    }
> }

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

[jira] [Updated] (MRUNIT-12) Support MultipleOutputs test, load dataset from text,and some usefull annotation

Posted by "E. Sammer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MRUNIT-12?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

E. Sammer updated MRUNIT-12:
----------------------------

    Affects Version/s: 0.5.0
        Fix Version/s: 0.5.0

Marking this for the 0.5.0 release.

> Support MultipleOutputs test, load dataset from text,and some usefull annotation
> --------------------------------------------------------------------------------
>
>                 Key: MRUNIT-12
>                 URL: https://issues.apache.org/jira/browse/MRUNIT-12
>             Project: MRUnit
>          Issue Type: New Feature
>    Affects Versions: 0.5.0
>            Reporter: JenWang
>            Assignee: E. Sammer
>             Fix For: 0.5.0
>
>         Attachments: mrunit_enhance.zip
>
>
> Some time we need to test reduce/mapreduce which used MultipleOutputs to output,mrunit not support this yet.so, I writed some code support this; 
> improvement which make mrunit nicer to use:load test dataset from text and some usefull annotation
> example:
> public void testReduce () {
>   List<TimeInfo> values = new ArrayList<TimeInfo>();
>   values.add(new TimeInfo(1, 3));
>   values.add(new TimeInfo(2, 5));
>   values.add(new TimeInfo(3, 7));
>   reduceDriver.withReducer(reducer)
>           .withInput(new Text("444"), values)
>           . withMutiOutput ("somePrefix"+444%8,new Text("444"),new LongWritable(2))
>           .runTest();
> }
>  
> load test data from text and use annotation:
>  
> @RunWith(MRUnitJunit4TestClassRunner.class)
> public class XXXMRUseAnnotationTest {
>   @MapInputSet
>   @MapReduce(mapper = Map.class, reducer = Reduce.class)
>   private MapReduceDriver<LongWritable, Text, Text, TimeInfo, Text, LongWritable> mrDriver;
>   @Test
>   @MapInputSet("ConsignTimeMRUseAnnotationTest.txt")
>   public void testMapReduce_3record_1user() {
>        mrDriver. withMutiOutput ("somePrefix"+444%8,new Text("444"),new LongWritable(2))
>                     .runTest();
>    }
> }

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

[jira] [Commented] (MRUNIT-12) Support MultipleOutputs test, load dataset from text,and some usefull annotation

Posted by "E. Sammer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MRUNIT-12?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13039379#comment-13039379 ] 

E. Sammer commented on MRUNIT-12:
---------------------------------

Jen:

I haven't yet looked at the patch (on purpose) because you haven't granted the ASF a license. This would prevent us from including the code in mrunit. If you'd like to contribute the code, please reupload the patch(es) with the checkbox labeled "Grant license to ASF for inclusion in ASF works (as per the Apache License ยง5)" checked.

Thanks!

> Support MultipleOutputs test, load dataset from text,and some usefull annotation
> --------------------------------------------------------------------------------
>
>                 Key: MRUNIT-12
>                 URL: https://issues.apache.org/jira/browse/MRUNIT-12
>             Project: MRUnit
>          Issue Type: New Feature
>    Affects Versions: 0.5.0
>            Reporter: JenWang
>            Assignee: E. Sammer
>             Fix For: 0.5.0
>
>         Attachments: mrunit_enhance.zip
>
>
> Some time we need to test reduce/mapreduce which used MultipleOutputs to output,mrunit not support this yet.so, I writed some code support this; 
> improvement which make mrunit nicer to use:load test dataset from text and some usefull annotation
> example:
> public void testReduce () {
>   List<TimeInfo> values = new ArrayList<TimeInfo>();
>   values.add(new TimeInfo(1, 3));
>   values.add(new TimeInfo(2, 5));
>   values.add(new TimeInfo(3, 7));
>   reduceDriver.withReducer(reducer)
>           .withInput(new Text("444"), values)
>           . withMutiOutput ("somePrefix"+444%8,new Text("444"),new LongWritable(2))
>           .runTest();
> }
>  
> load test data from text and use annotation:
>  
> @RunWith(MRUnitJunit4TestClassRunner.class)
> public class XXXMRUseAnnotationTest {
>   @MapInputSet
>   @MapReduce(mapper = Map.class, reducer = Reduce.class)
>   private MapReduceDriver<LongWritable, Text, Text, TimeInfo, Text, LongWritable> mrDriver;
>   @Test
>   @MapInputSet("ConsignTimeMRUseAnnotationTest.txt")
>   public void testMapReduce_3record_1user() {
>        mrDriver. withMutiOutput ("somePrefix"+444%8,new Text("444"),new LongWritable(2))
>                     .runTest();
>    }
> }

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

[jira] [Updated] (MRUNIT-12) Support MultipleOutputs test, load dataset from text,and some usefull annotation

Posted by "JenWang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MRUNIT-12?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

JenWang updated MRUNIT-12:
--------------------------

    Attachment: mrunit_enhance.zip

the code resolve this issues

> Support MultipleOutputs test, load dataset from text,and some usefull annotation
> --------------------------------------------------------------------------------
>
>                 Key: MRUNIT-12
>                 URL: https://issues.apache.org/jira/browse/MRUNIT-12
>             Project: MRUnit
>          Issue Type: New Feature
>            Reporter: JenWang
>         Attachments: mrunit_enhance.zip
>
>
> example:
> public void testReduce () {
>   List<TimeInfo> values = new ArrayList<TimeInfo>();
>   values.add(new TimeInfo(1, 3));
>   values.add(new TimeInfo(2, 5));
>   values.add(new TimeInfo(3, 7));
>   reduceDriver.withReducer(reducer)
>           .withInput(new Text("444"), values)
>           . withMutiOutput ("somePrefix"+444%8,new Text("444"),new LongWritable(2))
>           .runTest();
> }
>  
> load test data from text and use annotation:
>  
> @RunWith(MRUnitJunit4TestClassRunner.class)
> public class XXXMRUseAnnotationTest {
>   @MapInputSet
>   @MapReduce(mapper = Map.class, reducer = Reduce.class)
>   private MapReduceDriver<LongWritable, Text, Text, TimeInfo, Text, LongWritable> mrDriver;
>   @Test
>   @MapInputSet("ConsignTimeMRUseAnnotationTest.txt")
>   public void testMapReduce_3record_1user() {
>        mrDriver. withMutiOutput ("somePrefix"+444%8,new Text("444"),new LongWritable(2))
>                     .runTest();
>    }
> }

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

[jira] [Resolved] (MRUNIT-12) Support MultipleOutputs test, load dataset from text,and some usefull annotation

Posted by "JenWang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MRUNIT-12?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

JenWang resolved MRUNIT-12.
---------------------------

    Resolution: Fixed

I have writed code to support this

> Support MultipleOutputs test, load dataset from text,and some usefull annotation
> --------------------------------------------------------------------------------
>
>                 Key: MRUNIT-12
>                 URL: https://issues.apache.org/jira/browse/MRUNIT-12
>             Project: MRUnit
>          Issue Type: New Feature
>            Reporter: JenWang
>
> example:
> public void testReduce () {
>   List<TimeInfo> values = new ArrayList<TimeInfo>();
>   values.add(new TimeInfo(1, 3));
>   values.add(new TimeInfo(2, 5));
>   values.add(new TimeInfo(3, 7));
>   reduceDriver.withReducer(reducer)
>           .withInput(new Text("444"), values)
>           . withMutiOutput ("somePrefix"+444%8,new Text("444"),new LongWritable(2))
>           .runTest();
> }
>  
> load test data from text and use annotation:
>  
> @RunWith(MRUnitJunit4TestClassRunner.class)
> public class XXXMRUseAnnotationTest {
>   @MapInputSet
>   @MapReduce(mapper = Map.class, reducer = Reduce.class)
>   private MapReduceDriver<LongWritable, Text, Text, TimeInfo, Text, LongWritable> mrDriver;
>   @Test
>   @MapInputSet("ConsignTimeMRUseAnnotationTest.txt")
>   public void testMapReduce_3record_1user() {
>        mrDriver. withMutiOutput ("somePrefix"+444%8,new Text("444"),new LongWritable(2))
>                     .runTest();
>    }
> }

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