@Override
public void map(LongWritable key, Text values, Context context) throws IOException, InterruptedException {
String[] tokens = MainRun.DELIMITER.split(values.toString());
if (flag.equals("m1")) {
for (int i = 1; i <= rowNum; i++) {
Text k = new Text(rowIndexA + "," + i);
for (int j = 1; j <= tokens.length; j++) {
Text v = new Text("A:" + j + "," + tokens[j - 1]);
context.write(k, v);
System.out.println(k.toString() + " " + v.toString());
}
}
rowIndexA++;
} else if (flag.equals("m2")) {
for (int i = 1; i <= tokens.length; i++) {
for (int j = 1; j <= colNum; j++) {
Text k = new Text(i + "," + j);
Text v = new Text("B:" + rowIndexB + "," + tokens[j - 1]);
context.write(k, v);
System.out.println(k.toString() + " " + v.toString());
}
}
rowIndexB++;
}