Hadoop?????????????ú????MRUnit
???????????? ???????[ 2013/12/11 10:55:14 ] ????????
????ReduceDriver
???????Reduce??????????????????????Reduce?????Map??Combiner?????n???????????????????????
private Reduce reducer;
@Before
public void setUp() {
reducer = new Reduce();
reduceDriver = new ReduceDriver<Text?? TimeInfo?? Text??LongWritable>(reducer);
}
@Test
public void testReduce () {
List<TimeInfo> values = new ArrayList<TimeInfo>();
values.add(new TimeInfo(1?? 3));//???3С?
values.add(new TimeInfo(2?? 5));//???????5С?
values.add(new TimeInfo(3?? 7));//???????7С?
//values???444???????reduce????
//?????????????2С?
reduceDriver.withReducer(reducer)
.withInput(new Text("444")?? values)
.withOutput(new Text("444")??new LongWritable(2))
.runTest();
}
|
????MapReduceDriver
?????????Map??Reduce?????????????
private MapReduceDriver<LongWritable?? Text?? Text?? TimeInfo?? Text?? LongWritable> mrDriver;
private Map mapper;
private Reduce reducer;
@Before
public void setUp() {
mapper = new Map();
reducer = new Reduce();
mrDriver = new MapReduceDriver<LongWritable?? Text?? Text?? TimeInfo?? Text?? LongWritable>(mapper?? reducer);
}
@Test
public void testMapReduce_3record_1user() {
Text mapInputValue1 = new Text("……");
Text mapInputValue2 = new Text("……");
Text mapInputValue3 = new Text("……");
//??????????????????Map????????
//??reduce??????444??????????????2С?.
mrDriver.withInput(null?? mapInputValue1)
.withInput(null?? mapInputValue2)
.withInput(null?? mapInputValue3)
.withOutput(new Text("444")??new LongWritable(2))
.runTest();
}
|
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
iOS???????mocha??chai??sinon??istanbul???????????????????????????????????????д?????Java????????7??????Android?????????Robolectric3.0????(?)???Kiwi?????????????????????????????????Python?????????????????????????????????????Controller????????д?????????10???????????????????Angular????????????Component??Directive??Pipe ???ServiceAndroid????????????????????????????????--Mockito??????iOS UnitTest???????Vue?????????????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????