launcher
This commit is contained in:
@@ -93,7 +93,7 @@ public class AkkaTreeLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// public static void main(String[] args) {
|
// public static void main(String[] args) {
|
||||||
public static void main(String inputPath,String portInner,String serverWait,String dbDir,String chunkName,String numOfWorkers,String port){
|
public static void main(String portInner,String serverWait,String dbDir,String chunkName,String port){
|
||||||
|
|
||||||
// String inputPath;
|
// String inputPath;
|
||||||
//// String outputPath;
|
//// String outputPath;
|
||||||
@@ -134,7 +134,7 @@ public class AkkaTreeLoader {
|
|||||||
// numOfWorkers = "1";
|
// numOfWorkers = "1";
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
String parameters = String.format("\nInput path %s \nportInner %s \nserverWait %s \nchunkName %s \nnumOfWorks %s \ndbDir %s",inputPath,portInner,serverWait,chunkName,numOfWorkers,dbDir);
|
String parameters = String.format("\nportInner %s \nserverWait %s \nchunkName %s \ndbDir %s",portInner,serverWait,chunkName,dbDir);
|
||||||
log.info(parameters);
|
log.info(parameters);
|
||||||
|
|
||||||
// if (option.equals("CALC")) {
|
// if (option.equals("CALC")) {
|
||||||
@@ -142,34 +142,34 @@ public class AkkaTreeLoader {
|
|||||||
// log.info("Calculate pairs done");
|
// log.info("Calculate pairs done");
|
||||||
// }else {
|
// }else {
|
||||||
String cmd = "bash "+dbDir + "/" + "startServer.sh" +" %s %s %s";
|
String cmd = "bash "+dbDir + "/" + "startServer.sh" +" %s %s %s";
|
||||||
cmd = String.format(cmd, dbDir,"dumps.rdb",Integer.valueOf(port));
|
String cmd1 = String.format(cmd, dbDir,"dumps.rdb",Integer.valueOf(port));
|
||||||
loadRedis(cmd,serverWait);
|
loadRedis(cmd1,serverWait);
|
||||||
|
|
||||||
String cmdInner = "bash "+dbDir + "/" + "startServer.sh" +" %s %s %s";
|
String cmdInner = "bash "+dbDir + "/" + "startServer.sh" +" %s %s %s";
|
||||||
cmd = String.format(cmdInner, dbDir,chunkName,Integer.valueOf(portInner));
|
String cmd2 = String.format(cmdInner, dbDir,chunkName,Integer.valueOf(portInner));
|
||||||
loadRedis(cmd,serverWait);
|
loadRedis(cmd2,serverWait);
|
||||||
|
|
||||||
JedisPool outerPool = new JedisPool(poolConfig, "127.0.0.1",Integer.valueOf(port),20000000);
|
JedisPool outerPool = new JedisPool(poolConfig, "127.0.0.1",Integer.valueOf(port),20000000);
|
||||||
JedisPool innerPool = new JedisPool(poolConfig, "127.0.0.1",Integer.valueOf(portInner),20000000);
|
JedisPool innerPool = new JedisPool(poolConfig, "127.0.0.1",Integer.valueOf(portInner),20000000);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
comparePairs(inputPath, innerPool,outerPool, serverWait,chunkName,dbDir,numOfWorkers);
|
comparePairs(innerPool,outerPool);
|
||||||
|
|
||||||
String stopServer = "bash "+dbDir + "/" + "stopServer.sh" +" %s";
|
String stopServer = "bash "+dbDir + "/" + "stopServer.sh" +" %s";
|
||||||
stopServer = String.format(stopServer,Integer.valueOf(portInner));
|
String stopServer1 = String.format(stopServer,Integer.valueOf(portInner));
|
||||||
loadRedis(stopServer,serverWait);
|
loadRedis(stopServer1,serverWait);
|
||||||
|
|
||||||
stopServer = "bash "+dbDir + "/" + "stopServer.sh" +" %s";
|
stopServer = "bash "+dbDir + "/" + "stopServer.sh" +" %s";
|
||||||
stopServer = String.format(stopServer,Integer.valueOf(port));
|
String stopServer2 = String.format(stopServer,Integer.valueOf(port));
|
||||||
loadRedis(stopServer,serverWait);
|
loadRedis(stopServer2,serverWait);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void comparePairs(String inputPath, JedisPool innerPool,JedisPool outerPool,String serverWait,String chunkName, String dbDir,String numOfWorkers){
|
public static void comparePairs(JedisPool innerPool,JedisPool outerPool){
|
||||||
|
|
||||||
|
|
||||||
ScanResult<String> scan;
|
ScanResult<String> scan;
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ public class Launcher {
|
|||||||
chunkName = args[4];
|
chunkName = args[4];
|
||||||
numOfWorkers = args[5];
|
numOfWorkers = args[5];
|
||||||
dbDir = args[6];
|
dbDir = args[6];
|
||||||
port = args[6];
|
port = args[7];
|
||||||
outputPath = args[7];
|
outputPath = args[8];
|
||||||
} else {
|
} else {
|
||||||
inputPath = "/Users/anilkoyuncu/bugStudy/dataset/pairs";
|
inputPath = "/Users/anilkoyuncu/bugStudy/dataset/pairs";
|
||||||
portInner = "6380";
|
portInner = "6380";
|
||||||
@@ -53,7 +53,7 @@ public class Launcher {
|
|||||||
case "IMPORTPAIRS":
|
case "IMPORTPAIRS":
|
||||||
ImportPairs2DB.main(inputPath,portInner,serverWait,dbDir,chunkName,numOfWorkers);
|
ImportPairs2DB.main(inputPath,portInner,serverWait,dbDir,chunkName,numOfWorkers);
|
||||||
case "AKKA":
|
case "AKKA":
|
||||||
AkkaTreeLoader.main(inputPath,portInner,serverWait,dbDir,chunkName,numOfWorkers,port);
|
AkkaTreeLoader.main(portInner,serverWait,dbDir,chunkName,port);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user