error handling
This commit is contained in:
+18
-5
@@ -130,8 +130,8 @@ public class MultiThreadTreeLoader {
|
|||||||
scan.getResult().parallelStream()
|
scan.getResult().parallelStream()
|
||||||
.forEach(m -> coreCompare(m, inputPath, jedisPool));
|
.forEach(m -> coreCompare(m, inputPath, jedisPool));
|
||||||
|
|
||||||
jedis.select(0);
|
// jedis.select(0);
|
||||||
jedis.flushDB();
|
// jedis.flushDB();
|
||||||
|
|
||||||
jedis.save();
|
jedis.save();
|
||||||
|
|
||||||
@@ -155,7 +155,7 @@ public class MultiThreadTreeLoader {
|
|||||||
|
|
||||||
|
|
||||||
String[] split = name.split("_");
|
String[] split = name.split("_");
|
||||||
log.info("Starting in coreLoop");
|
|
||||||
|
|
||||||
String i = split[1];
|
String i = split[1];
|
||||||
String j = split[2];
|
String j = split[2];
|
||||||
@@ -177,7 +177,7 @@ public class MultiThreadTreeLoader {
|
|||||||
secondValue = inputPath + secondValueSplit[1];
|
secondValue = inputPath + secondValueSplit[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
ITree oldTree = getSimpliedTree(firstValue);
|
ITree oldTree = getSimpliedTree(firstValue);
|
||||||
|
|
||||||
ITree newTree = getSimpliedTree(secondValue);
|
ITree newTree = getSimpliedTree(secondValue);
|
||||||
@@ -185,6 +185,7 @@ public class MultiThreadTreeLoader {
|
|||||||
Matcher m = Matchers.getInstance().getMatcher(oldTree, newTree);
|
Matcher m = Matchers.getInstance().getMatcher(oldTree, newTree);
|
||||||
m.match();
|
m.match();
|
||||||
|
|
||||||
|
|
||||||
ActionGenerator ag = new ActionGenerator(oldTree, newTree, m.getMappings());
|
ActionGenerator ag = new ActionGenerator(oldTree, newTree, m.getMappings());
|
||||||
ag.generate();
|
ag.generate();
|
||||||
List<Action> actions = ag.getActions();
|
List<Action> actions = ag.getActions();
|
||||||
@@ -208,9 +209,21 @@ public class MultiThreadTreeLoader {
|
|||||||
jedis.select(1);
|
jedis.select(1);
|
||||||
jedis.set(matchKey, result);
|
jedis.set(matchKey, result);
|
||||||
}
|
}
|
||||||
|
jedis.select(0);
|
||||||
|
String pairKey = "pair_" + (String.valueOf(i)) + "_" + String.valueOf(j);
|
||||||
|
jedis.del(pairKey);
|
||||||
|
|
||||||
|
// log.info("Completed " + resultKey);
|
||||||
|
|
||||||
|
}catch (Exception e){
|
||||||
|
log.error(e.toString() + " {}",(name));
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
log.info("Completed " + resultKey);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user