Make the java version and two Bristlecone versions be able to run in parellel
[IRC.git] / Robust / src / Benchmarks / MapReduce / Java / Master.java
index 92ce404d22240a0632285cf04f038904b6576daa..39ac5cc401dbe6e5bba47782d3b25c6c35f9fe51 100644 (file)
@@ -40,7 +40,7 @@ public class Master {
        }
 
        this.splitter = splitter;
-       this.outputfile = new String("/home/jzhou/mapreduce/output.dat");
+       this.outputfile = new String("/scratch/mapreduce_java/output.dat");
 
        this.partial = false;
     }
@@ -98,9 +98,9 @@ public class Master {
     }
 
     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();
@@ -140,7 +140,7 @@ public class Master {
        //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");