This commit is contained in:
Anil Koyuncu
2018-04-15 13:36:01 +02:00
parent ba977655fe
commit 90d6f98620
2 changed files with 32 additions and 27 deletions
@@ -37,30 +37,34 @@ public class TreeLoaderClusterL1 {
private static Logger log = LoggerFactory.getLogger(TreeLoaderClusterL1.class);
public static void main(String[] args){
// public static void main(String[] args){
public static void main(String portInner,String serverWait,String port,String inputPath){
String inputPath;
String outputPath;
String port;
String portInner;
String serverWait;
if (args.length > 0) {
inputPath = args[0];
outputPath = args[1];
port = args[2];
serverWait = args[3];
portInner = args[4];
// String inputPath;
// String outputPath;
// String port;
// String portInner;
// String serverWait;
// if (args.length > 0) {
// inputPath = args[0];
// outputPath = args[1];
// port = args[2];
// serverWait = args[3];
// portInner = args[4];
//
// } else {
//// inputPath = "/Users/anilkoyuncu/bugStudy/dataset/GumTreeOutput2/";
// inputPath = "/Users/anilkoyuncu/bugStudy/dataset/redis";
// outputPath = "/Users/anilkoyuncu/bugStudy/dataset/";
// port = "6379";
// portInner = "6380";
// serverWait = "10000";
//
//
// }
} else {
// inputPath = "/Users/anilkoyuncu/bugStudy/dataset/GumTreeOutput2/";
inputPath = "/Users/anilkoyuncu/bugStudy/dataset/redis";
outputPath = "/Users/anilkoyuncu/bugStudy/dataset/";
port = "6379";
portInner = "6380";
serverWait = "10000";
}
String parameters = String.format("\nInput path %s \nportInner %s \nserverWait %s \nport %s",inputPath,portInner,serverWait,port);
log.info(parameters);
String cmd = "bash "+inputPath + "/" + "startServer.sh" +" %s %s %s";
cmd = String.format(cmd, inputPath,"level1.rdb",Integer.valueOf(port));
@@ -1,9 +1,6 @@
package edu.lu.uni.serval;
import edu.lu.uni.serval.FixPatternParser.cluster.AkkaTreeLoader;
import edu.lu.uni.serval.FixPatternParser.cluster.CalculatePairs;
import edu.lu.uni.serval.FixPatternParser.cluster.ImportPairs2DB;
import edu.lu.uni.serval.FixPatternParser.cluster.StoreFile;
import edu.lu.uni.serval.FixPatternParser.cluster.*;
/**
* Created by anilkoyuncu on 14/04/2018.
@@ -38,7 +35,7 @@ public class Launcher {
chunkName = "dumps.rdb";
dbDir = "/Users/anilkoyuncu/bugStudy/dataset/redis";
numOfWorkers = "1";
jobType = "AKKA";
jobType = "LEVEL1DB";
port = "6399";
outputPath = "/Users/anilkoyuncu/bugStudy/dataset/pairsImport";
}
@@ -54,6 +51,10 @@ public class Launcher {
ImportPairs2DB.main(inputPath,portInner,serverWait,dbDir,chunkName,numOfWorkers);
case "AKKA":
AkkaTreeLoader.main(portInner,serverWait,dbDir,chunkName,port);
case "LEVEL1DB":
TreeLoaderClusterL1.main(portInner,serverWait,port,inputPath);
}
}