config
This commit is contained in:
@@ -9,6 +9,7 @@ import com.github.gumtreediff.matchers.Matcher;
|
||||
import com.github.gumtreediff.matchers.Matchers;
|
||||
import com.github.gumtreediff.tree.ITree;
|
||||
import com.github.gumtreediff.tree.Tree;
|
||||
import com.typesafe.config.ConfigFactory;
|
||||
import edu.lu.uni.serval.FixPattern.utils.ASTNodeMap;
|
||||
import edu.lu.uni.serval.MultipleThreadsParser.*;
|
||||
import edu.lu.uni.serval.gumtree.regroup.HierarchicalActionSet;
|
||||
@@ -189,6 +190,13 @@ public class AkkaTreeLoader {
|
||||
ActorRef parsingActor = null;
|
||||
final WorkMessage msg = new WorkMessage(0, result,innerPort,inputPath,dbDir,serverWait);
|
||||
try {
|
||||
|
||||
|
||||
|
||||
system = ActorSystem.create("my-dispatcher",
|
||||
ConfigFactory.load().getConfig("MyDispatcherExample"));
|
||||
|
||||
|
||||
log.info("Akka begins...");
|
||||
system = ActorSystem.create("Tree-System");
|
||||
parsingActor = system.actorOf(TreeActor.props(Integer.valueOf(numOfWorkers),dbDir,innerPort,serverWait), "tree-actor");
|
||||
|
||||
@@ -2,7 +2,7 @@ package edu.lu.uni.serval.config;
|
||||
|
||||
public class Configuration {
|
||||
|
||||
public static final long SECONDS_TO_WAIT = 90L;
|
||||
public static final long SECONDS_TO_WAIT = 900L;
|
||||
|
||||
// public static String ROOT_PATH = "/Volumes/data/bugStudy/dataset/"; // The root path of all output data.
|
||||
public static String ROOT_PATH = "/Users/anilkoyuncu/bugStudy/dataset/"; // The root path of all output data.
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
MyDispatcherExample{
|
||||
defaultDispatcher {
|
||||
type = Dispatcher
|
||||
executor = "fork-join-executor"
|
||||
fork-join-executor {
|
||||
parallelism-min = 2
|
||||
parallelism-factor = 2.0
|
||||
parallelism-max = 6
|
||||
}
|
||||
}
|
||||
|
||||
defaultDispatcher1 {
|
||||
type = Dispatcher
|
||||
executor = "thread-pool-executor"
|
||||
thread-pool-executor {
|
||||
core-pool-size-min = 1
|
||||
core-pool-size-factor = 2.0
|
||||
core-pool-size-max = 6
|
||||
}
|
||||
}
|
||||
pinnedDispatcher {
|
||||
type = PinnedDispatcher
|
||||
executor = "thread-pool-executor"
|
||||
thread-pool-executor {
|
||||
core-pool-size-min = 2
|
||||
core-pool-size-factor = 2.0
|
||||
core-pool-size-max = 10
|
||||
}
|
||||
throughput = 5
|
||||
}
|
||||
balancingDispatcher {
|
||||
type = BalancingDispatcher
|
||||
executor = "thread-pool-executor"
|
||||
thread-pool-executor {
|
||||
core-pool-size-min = 1
|
||||
core-pool-size-factor = 2.0
|
||||
core-pool-size-max = 2
|
||||
}
|
||||
throughput = 5
|
||||
}
|
||||
balancingDispatcher1 {
|
||||
type = BalancingDispatcher
|
||||
executor = "fork-join-executor"
|
||||
fork-join-executor {
|
||||
parallelism-min = 2
|
||||
parallelism-factor = 2.0
|
||||
parallelism-max = 6
|
||||
}
|
||||
throughput = 5
|
||||
}
|
||||
my-dispatcher {
|
||||
# Dispatcher is the name of the event-based dispatcher
|
||||
type = Dispatcher
|
||||
# What kind of ExecutionService to use
|
||||
executor = "fork-join-executor"
|
||||
# Configuration for the fork join pool
|
||||
fork-join-executor {
|
||||
# Min number of threads to cap factor-based parallelism number to
|
||||
parallelism-min = 2
|
||||
# Parallelism (threads) ... ceil(available processors * factor)
|
||||
parallelism-factor = 2.0
|
||||
# Max number of threads to cap factor-based parallelism number to
|
||||
parallelism-max = 10
|
||||
}
|
||||
# Throughput defines the maximum number of messages to be
|
||||
# processed per actor before the thread jumps to the next actor.
|
||||
# Set to 1 for as fair as possible.
|
||||
throughput = 100
|
||||
}
|
||||
CallingThreadDispatcher {
|
||||
type = akka.testkit.CallingThreadDispatcherConfigurator
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user