}
this.splitter = splitter;
- this.outputfile = new String("/home/jzhou/mapreduce/output.dat");
+ this.outputfile = new String("/scratch/mapreduce_java/output.dat");
this.partial = false;
}
}
public void addInterOutput(String interoutput) {
- int start = interoutput.indexOf('_');
+ int start = interoutput.lastindexOf('_');
int end = interoutput.indexOf('.');
- int index = Integer.parseInt(interoutput.substring(start + 1, end));
+ int index = Integer.parseInt(interoutput.subString(start + 1, end));
//System.printString(interoutput.subString(start + 1, end) + "\n");
if(interoutputs[index] == null) {
interoutputs[index] = new Vector();
//try{
FileInputStream iStream = new FileInputStream(file);
FileOutputStream oStream = new FileOutputStream(outputfile, true);
- byte[] b = new byte[1024 * 100];
+ byte[] b = new byte[1024 * 10];
int length = iStream.read(b);
if(length < 0) {
System./*out.println*/printString("Error! Can not read from intermediate output file from reduce worker: " + file + "\n");