hadoop??mysql???????????(1)
???????????? ???????[ 2016/2/3 10:50:14 ] ????????????? MySQL
????DBMapper??:
package com.simope.mr.db;
import java.io.IOException;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapred.MapReduceBase;
import org.apache.hadoop.mapred.Mapper;
import org.apache.hadoop.mapred.OutputCollector;
import org.apache.hadoop.mapred.Reporter;
public class DBMapper extends MapReduceBase implements
Mapper<LongWritable?? TeacherRecord?? LongWritable?? Text> {
public void map(LongWritable key?? TeacherRecord value??
OutputCollector<LongWritable?? Text> collector?? Reporter reporter)
throws IOException {
collector.collect(new LongWritable(value.id)??
new Text(value.toString()));
}
}
????DBReducer??
package com.simope.mr.db;
import java.io.IOException;
import java.util.Iterator;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapred.MapReduceBase;
import org.apache.hadoop.mapred.OutputCollector;
import org.apache.hadoop.mapred.Reducer;
import org.apache.hadoop.mapred.Reporter;
public class DBReducer extends MapReduceBase implements Reducer<LongWritable?? Text?? StudentRecord?? Text>{
@Override
public void reduce(LongWritable key?? Iterator<Text> values??
OutputCollector<StudentRecord?? Text> output?? Reporter reporter)
throws IOException {
String[] InfoArr = values.next().toString().split(" ");
StudentRecord s = new StudentRecord();
// t.id = Integer.parseInt(InfoArr[0]); //id????????
s.name = InfoArr[0];
s.age = Integer.parseInt(InfoArr[1]);
s.departmentID = Integer.parseInt(InfoArr[2]);
output.collect(s?? new Text(s.name));
}
}
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
???mysql?????????????mysql????? distinct?÷?MySQL?н???????????з??Mysql?????????MySQL Cluster??δ????????????????ν?MySQL??????????300???????MySQL???Uber???????????????????MySql SQL??????????MySQL?????????????????λЧ?????SQL???Java???????:?????MySQL???????linux?°??mysql????MySQL ???????????????????binlog??MySQL????????????Щ??????MySQL???????Mysql???????JDBC?????mysql?????
???·???
??????????????????
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 ??????