-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5eeef84
Showing
29 changed files
with
218 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
*# | ||
*.iml | ||
*.ipr | ||
*.iws | ||
*.pyc | ||
*.tm.epoch | ||
*.vim | ||
*/project/boot | ||
*/project/build/target | ||
*/project/project.target.config-classes | ||
*-shim.sbt | ||
*~ | ||
.#* | ||
.*.swp | ||
.DS_Store | ||
.cache | ||
.cache | ||
.classpath | ||
.codefellow | ||
.ensime* | ||
.eprj | ||
.history | ||
.idea | ||
.manager | ||
.multi-jvm | ||
.project | ||
.scala_dependencies | ||
.scalastyle | ||
.settings | ||
.tags | ||
.tags_sorted_by_file | ||
.target | ||
.worksheet | ||
Makefile | ||
TAGS | ||
_akka_cluster/ | ||
_dump | ||
_mb | ||
activemq-data | ||
akka-contrib/rst_preprocessed/ | ||
akka-docs/_build/ | ||
akka-docs/exts/ | ||
akka-docs/rst_preprocessed/ | ||
akka-osgi/src/main/resources/*.conf | ||
akka.sublime-project | ||
akka.sublime-workspace | ||
akka.tmproj | ||
beanstalk/ | ||
bin/ | ||
data | ||
deploy/*.jar | ||
etags | ||
lib_managed | ||
logs | ||
manifest.mf | ||
mongoDB/ | ||
multiverse.log | ||
out | ||
project/akka-build.properties | ||
project/boot/* | ||
project/plugins/project | ||
redis/ | ||
reports | ||
run-codefellow | ||
schoir.props | ||
semantic.cache | ||
src_managed | ||
storage | ||
tags | ||
target | ||
tm*.lck | ||
tm*.log | ||
tm.out | ||
worker*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name := """TesiBSPScala""" | ||
|
||
val akkaVersion = "2.3.6" | ||
|
||
fork in run := true | ||
|
||
version := "0.1" | ||
|
||
scalaVersion := "2.11.2" | ||
|
||
resolvers += Resolver.sonatypeRepo("public") | ||
|
||
scalacOptions in Compile ++= Seq("-encoding", "UTF-8", "-target:jvm-1.7", "-deprecation", "-feature", "-unchecked", "-Xlog-reflective-calls", "-Xlint") | ||
|
||
libraryDependencies ++= Seq( | ||
"com.typesafe.akka" %% "akka-cluster" % akkaVersion, | ||
"com.typesafe.akka" %% "akka-contrib" % akkaVersion, | ||
"com.github.scopt" %% "scopt" % "3.2.0", | ||
"org.fusesource" % "sigar" % "1.6.4") | ||
|
||
javaOptions in run ++= Seq( | ||
"-Djava.library.path=./sigar", | ||
"-Xms128m", "-Xmx1024m", | ||
"-Dcom.sun.management.jmxremote.port=9999", | ||
"-Dcom.sun.management.jmxremote.authenticate=false", | ||
"-Dcom.sun.management.jmxremote.ssl=false", | ||
"-XX:+UnlockCommercialFeatures", | ||
"-XX:+FlightRecorder") | ||
|
||
assemblyJarName in assembly := "SDAJClusterNode.jar" | ||
|
||
test in assembly := {} | ||
|
||
mainClass in assembly := Some("it.unipd.trluca.arsort.Main") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.12.0") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sbt.version=0.13.6 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
akka { | ||
|
||
actor.provider = "akka.cluster.ClusterActorRefProvider" | ||
|
||
remote { | ||
log-remote-lifecycle-events = off | ||
netty.tcp { | ||
hostname = "127.0.0.1" | ||
port = 2551 | ||
} | ||
} | ||
|
||
cluster { | ||
seed-nodes = [ | ||
"akka.tcp://[email protected]:2551", | ||
"akka.tcp://[email protected]:2552", | ||
"akka.tcp://[email protected]:2553", | ||
"akka.tcp://[email protected]:2554"] | ||
|
||
auto-down-unreachable-after = 10s | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
akka { | ||
|
||
actor.provider = "akka.cluster.ClusterActorRefProvider" | ||
|
||
remote { | ||
log-remote-lifecycle-events = off | ||
enabled-transports = ["akka.remote.netty.tcp"] | ||
transport = "akka.remote.netty.NettyRemoteTransport" | ||
netty.tcp { | ||
hostname = "192.168.56.11" | ||
port = 2551 | ||
} | ||
} | ||
|
||
cluster { | ||
seed-nodes = [ | ||
// "akka.tcp://[email protected]:2551", | ||
"akka.tcp://[email protected]:2551", | ||
// "akka.tcp://[email protected]:2553", | ||
"akka.tcp://[email protected]:2551"] | ||
|
||
auto-down-unreachable-after = 10s | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package it.unipd.trluca.bsp | ||
|
||
import akka.actor.{ActorSystem, Props} | ||
import com.typesafe.config.ConfigFactory | ||
import scopt.OptionParser | ||
|
||
case class Config(debug:Boolean = false, | ||
clusterSize: Int = -1, | ||
// arraySize: Int = 10, | ||
// valueRange:Int = 10000, | ||
nodes: Seq[String] = Seq()) | ||
|
||
object Main { | ||
def main(args: Array[String]): Unit = { | ||
|
||
val parser = new OptionParser[Config]("scopt") { | ||
head("Distributed-Array Sorting", "1.0") | ||
opt[Unit]('d', "debug") optional() action { (x, c) => | ||
c.copy(debug = true) | ||
} text "Debug" | ||
opt[Int]('c', "cSize") action { (x, c) => | ||
c.copy(clusterSize = x) | ||
} text "Initial Cluster Size" | ||
// opt[Int]('a', "arraySize") action { (x, c) => | ||
// c.copy(arraySize = x) | ||
// } text "Distributed Array Size" | ||
// opt[Int]('r', "valueRange") optional() action { (x, c) => | ||
// c.copy(valueRange = x) | ||
// } text "Values range" | ||
|
||
help("help") text "prints this usage text" | ||
|
||
arg[String]("<host:port>...") unbounded() action { (x, c) => | ||
c.copy(nodes = c.nodes :+ x) } text "Nodes" | ||
} | ||
|
||
parser.parse(args, Config()) map { c => | ||
|
||
c.nodes foreach { h=> | ||
val Array(hostname, port) = h.split(":") | ||
val conf = ConfigFactory.parseString(s"akka.remote.netty.tcp.hostname=$hostname") | ||
.withFallback(ConfigFactory.parseString(s"akka.remote.netty.tcp.port=$port")) | ||
.withFallback( | ||
if(c.debug) | ||
ConfigFactory.load("app_debug") | ||
else | ||
ConfigFactory.load() | ||
) | ||
// val sys = ActorSystem("ClusterSystem", conf) | ||
// sys.actorOf(Props[DistArrayNodeActor], "ablock") | ||
// | ||
// if ((c.debug && port == "2551") || (!c.debug && c.arraySize != -1)) { | ||
// val ep = sys.actorOf(Props[EntryPoint], "ep") | ||
// ep ! SetDistArraySize(c) | ||
// } | ||
} | ||
} //getOrElse {} | ||
|
||
} | ||
} |