l
This commit is contained in:
@@ -114,7 +114,8 @@ public class CalculatePairs {
|
|||||||
// outStream.close();
|
// outStream.close();
|
||||||
int fileCounter = 0;
|
int fileCounter = 0;
|
||||||
FileChannel rwChannel = new RandomAccessFile(outputPath + "/" +pjName +String.valueOf(fileCounter)+".txt", "rw").getChannel();
|
FileChannel rwChannel = new RandomAccessFile(outputPath + "/" +pjName +String.valueOf(fileCounter)+".txt", "rw").getChannel();
|
||||||
ByteBuffer wrBuf = rwChannel.map(FileChannel.MapMode.READ_WRITE, 0, Integer.MAX_VALUE);
|
int maxSize = 500*500000;
|
||||||
|
ByteBuffer wrBuf = rwChannel.map(FileChannel.MapMode.READ_WRITE, 0, maxSize);
|
||||||
|
|
||||||
|
|
||||||
for (int i = 0; i < result.size(); i++) {
|
for (int i = 0; i < result.size(); i++) {
|
||||||
@@ -130,7 +131,7 @@ public class CalculatePairs {
|
|||||||
log.info("Next pair dump");
|
log.info("Next pair dump");
|
||||||
fileCounter++;
|
fileCounter++;
|
||||||
rwChannel = new RandomAccessFile(outputPath+"/" +pjName+String.valueOf(fileCounter)+".txt", "rw").getChannel();
|
rwChannel = new RandomAccessFile(outputPath+"/" +pjName+String.valueOf(fileCounter)+".txt", "rw").getChannel();
|
||||||
wrBuf = rwChannel.map(FileChannel.MapMode.READ_WRITE, 0, Integer.MAX_VALUE);
|
wrBuf = rwChannel.map(FileChannel.MapMode.READ_WRITE, 0, maxSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -71,12 +71,14 @@ public class ImportPairs2DB {
|
|||||||
log.info(cmd);
|
log.info(cmd);
|
||||||
cs.runShell(cmd);
|
cs.runShell(cmd);
|
||||||
|
|
||||||
|
String stopServer = "bash "+dbDir + "/" + "stopServer.sh" +" %s";
|
||||||
|
String stopServer2 = String.format(stopServer,portInt);
|
||||||
|
cs.runShell(stopServer2,serverWait);
|
||||||
|
|
||||||
portInt++;
|
portInt++;
|
||||||
|
|
||||||
|
|
||||||
String stopServer = "bash "+dbDir + "/" + "stopServer.sh" +" %s";
|
|
||||||
String stopServer2 = String.format(stopServer,Integer.valueOf(portInner));
|
|
||||||
cs.runShell(stopServer2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ public class Launcher {
|
|||||||
String datasetPath;
|
String datasetPath;
|
||||||
String pjName;
|
String pjName;
|
||||||
String pythonPath;
|
String pythonPath;
|
||||||
|
String dbNo;
|
||||||
if (args.length > 0) {
|
if (args.length > 0) {
|
||||||
jobType = args[0];
|
jobType = args[0];
|
||||||
portInner = args[1];
|
portInner = args[1];
|
||||||
@@ -38,6 +39,7 @@ public class Launcher {
|
|||||||
pythonPath = args[5];
|
pythonPath = args[5];
|
||||||
datasetPath = args[6];
|
datasetPath = args[6];
|
||||||
pjName = args[7];
|
pjName = args[7];
|
||||||
|
dbNo = args[8];
|
||||||
// gumInput = args[1];
|
// gumInput = args[1];
|
||||||
// chunkName = args[4];
|
// chunkName = args[4];
|
||||||
// dbDir = args[6];
|
// dbDir = args[6];
|
||||||
@@ -48,11 +50,11 @@ public class Launcher {
|
|||||||
// inputPath = "/Users/anilkoyuncu/bugStudy/dataset/pairs";
|
// inputPath = "/Users/anilkoyuncu/bugStudy/dataset/pairs";
|
||||||
// gumInput = "/Users/anilkoyuncu/bugStudy/dataset/Defects4J/";
|
// gumInput = "/Users/anilkoyuncu/bugStudy/dataset/Defects4J/";
|
||||||
portInner = "6380";
|
portInner = "6380";
|
||||||
serverWait = "5000";
|
serverWait = "50000";
|
||||||
// chunkName = "Bug13April.txt.csv.rdb";
|
// chunkName = "Bug13April.txt.csv.rdb";
|
||||||
// dbDir = "/Users/anilkoyuncu/bugStudy/dataset/redis";
|
// dbDir = "/Users/anilkoyuncu/bugStudy/dataset/redis";
|
||||||
numOfWorkers = "10";
|
numOfWorkers = "10";
|
||||||
jobType = "AKKA";
|
jobType = "IMPORTPAIRS";
|
||||||
port = "6399";
|
port = "6399";
|
||||||
pythonPath = "/Users/anilkoyuncu/bugStudy/code/python";
|
pythonPath = "/Users/anilkoyuncu/bugStudy/code/python";
|
||||||
// pairsPath = "/Users/anilkoyuncu/bugStudy/dataset/pairsImportDefects4J";
|
// pairsPath = "/Users/anilkoyuncu/bugStudy/dataset/pairsImportDefects4J";
|
||||||
@@ -61,6 +63,7 @@ public class Launcher {
|
|||||||
// dumpsName = "dumps-Bug13April.rdb";
|
// dumpsName = "dumps-Bug13April.rdb";
|
||||||
datasetPath = "/Users/anilkoyuncu/bugStudy/dataset";
|
datasetPath = "/Users/anilkoyuncu/bugStudy/dataset";
|
||||||
pjName = "allDataset";
|
pjName = "allDataset";
|
||||||
|
dbNo = "0";
|
||||||
}
|
}
|
||||||
gumInput = datasetPath +"/"+pjName+"/";
|
gumInput = datasetPath +"/"+pjName+"/";
|
||||||
gumOutput = datasetPath + "/GumTreeOutput" + pjName;
|
gumOutput = datasetPath + "/GumTreeOutput" + pjName;
|
||||||
@@ -108,10 +111,10 @@ public class Launcher {
|
|||||||
break;
|
break;
|
||||||
case "AKKA":
|
case "AKKA":
|
||||||
|
|
||||||
AkkaTreeLoader.main(portInner, serverWait, dbDir, pjName +"INS"+".txt.csv.rdb" , port, "INS"+dumpsName);
|
AkkaTreeLoader.main(portInner, serverWait, dbDir, pjName +"INS"+dbNo+".txt.csv.rdb" , port, "INS"+dumpsName);
|
||||||
AkkaTreeLoader.main(portInner, serverWait, dbDir, pjName +"DEL"+".txt.csv.rdb", port, "DEL"+dumpsName);
|
AkkaTreeLoader.main(portInner, serverWait, dbDir, pjName +"DEL"+dbNo+".txt.csv.rdb", port, "DEL"+dumpsName);
|
||||||
AkkaTreeLoader.main(portInner, serverWait, dbDir, pjName +"UPD"+".txt.csv.rdb", port, "UPD"+dumpsName);
|
AkkaTreeLoader.main(portInner, serverWait, dbDir, pjName +"UPD"+dbNo+".txt.csv.rdb", port, "UPD"+dumpsName);
|
||||||
AkkaTreeLoader.main(portInner, serverWait, dbDir, pjName +"MOV"+".txt.csv.rdb", port, "MOV"+dumpsName);
|
AkkaTreeLoader.main(portInner, serverWait, dbDir, pjName +"MOV"+dbNo+".txt.csv.rdb", port, "MOV"+dumpsName);
|
||||||
break;
|
break;
|
||||||
case "L1DB":
|
case "L1DB":
|
||||||
CallShell cs1 =new CallShell();
|
CallShell cs1 =new CallShell();
|
||||||
|
|||||||
Reference in New Issue
Block a user