-
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.
Merge pull request #9 from atrostan/coord/partition-global
Coord/partition global
- Loading branch information
Showing
34 changed files
with
1,573 additions
and
518 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
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,3 @@ | ||
addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.2") | ||
|
||
libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.11.3" |
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 |
---|---|---|
|
@@ -16,7 +16,7 @@ akka { | |
"akka:https://[email protected]:25251", | ||
# "akka:https://[email protected]:25252" | ||
] | ||
min-nr-of-members = 4 | ||
min-nr-of-members = 1 | ||
role { | ||
shard.min-nr-of-members = 4 | ||
} | ||
|
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 |
---|---|---|
@@ -1,31 +1,25 @@ | ||
log4j.logger.com.preprocessing.edgeList=WARN, LOG_FILE | ||
|
||
log4j.rootCategory=INFO, LOG_FILE | ||
|
||
log4j.appender.LOG_FILE = org.apache.log4j.RollingFileAppender | ||
log4j.appender.LOG_FILE=org.apache.log4j.RollingFileAppender | ||
log4j.appender.LOG_FILE.MaxBackupIndex=5 | ||
log4j.appender.LOG_FILE.MaxFileSize=1MB | ||
log4j.appender.LOG_FILE.File = ./logs/spark/spark_application.log | ||
log4j.appender.LOG_FILE.Append = false | ||
log4j.appender.LOG_FILE.layout = org.apache.log4j.PatternLayout | ||
log4j.appender.LOG_FILE.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} %c{1} [%p] %m%n | ||
|
||
log4j.appender.LOG_FILE.File=./logs/spark/spark_application.log | ||
log4j.appender.LOG_FILE.Append=false | ||
log4j.appender.LOG_FILE.layout=org.apache.log4j.PatternLayout | ||
log4j.appender.LOG_FILE.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %c{1} [%p] %m%n | ||
# Set the default spark-shell log level to WARN. When running the spark-shell, the | ||
# log level for this class is used to overwrite the root logger's log level, so that | ||
# the user can have different defaults for the shell and regular Spark apps. | ||
log4j.logger.org.apache.spark.repl.Main=WARN | ||
|
||
# Settings to quiet third party logs that are too verbose | ||
log4j.logger.org.sparkproject.jetty=WARN | ||
log4j.logger.org.sparkproject.jetty.util.component.AbstractLifeCycle=ERROR | ||
log4j.logger.org.apache.spark.repl.SparkIMain$exprTyper=INFO | ||
log4j.logger.org.apache.spark.repl.SparkILoop$SparkILoopInterpreter=INFO | ||
|
||
# SPARK-9183: Settings to avoid annoying messages when looking up nonexistent UDFs | ||
# in SparkSQL with Hive support | ||
log4j.logger.org.apache.hadoop.hive.metastore.RetryingHMSHandler=FATAL | ||
log4j.logger.org.apache.hadoop.hive.ql.exec.FunctionRegistry=ERROR | ||
|
||
# Parquet related logging | ||
log4j.logger.org.apache.parquet.CorruptStatistics=ERROR | ||
log4j.logger.parquet.CorruptStatistics=ERROR |
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
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 |
---|---|---|
@@ -1,8 +1,7 @@ | ||
package com | ||
|
||
/** | ||
* Marker trait to tell Akka to serialize messages into CBOR using Jackson for sending over the network | ||
* See tmpapplication.conf where it is bound to a serializer. | ||
* For more details see the docs https://doc.akka.io/docs/akka/2.6/serialization-jackson.html | ||
*/ | ||
/** Marker trait to tell Akka to serialize messages into CBOR using Jackson for sending over the | ||
* network See tmpapplication.conf where it is bound to a serializer. For more details see the docs | ||
* https://doc.akka.io/docs/akka/2.6/serialization-jackson.html | ||
*/ | ||
trait CborSerializable |
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,28 @@ | ||
package com | ||
import akka.actor.typed | ||
import akka.actor.typed.ActorRefResolver | ||
import akka.actor.typed.scaladsl.adapter._ | ||
import akka.serialization.Serialization | ||
import scalapb.TypeMapper | ||
|
||
import java.nio.charset.StandardCharsets.UTF_8 | ||
|
||
// argh | ||
// https://github.com/akka/akka/issues/27975 | ||
// https://discuss.lightbend.com/t/akka-typed-serialization/4336/10 | ||
// https://stackoverflow.com/questions/57427953/in-akka-typed-how-to-deserialize-a-serialized-actorref-without-its-actorsystem | ||
object Conversion { | ||
type ActorRef[-T] = typed.ActorRef[T] // importable via Conversion._ | ||
|
||
lazy val resolver: ActorRefResolver = ActorRefResolver { | ||
Serialization.getCurrentTransportInformation().system.toTyped | ||
} | ||
|
||
implicit def mapper[T]: TypeMapper[String, ActorRef[T]] = | ||
TypeMapper[String, ActorRef[T]](resolver.resolveActorRef)(serialize) | ||
|
||
def deserialize[T](str: String) = resolver.resolveActorRef[T](str) | ||
def serialize[T](ref: ActorRef[T]) = | ||
new String(resolver.toSerializationFormat(ref).getBytes(UTF_8), UTF_8) | ||
|
||
} |
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,33 @@ | ||
package com | ||
|
||
import akka.actor.typed.ActorRef | ||
import akka.cluster.Member | ||
import com.cluster.graph.{EntityManager, GlobalCoordinator, PartitionCoordinator} | ||
import com.preprocessing.partitioning.oneDim.Mirror | ||
|
||
/** Store all global type aliases here (typedefs) | ||
*/ | ||
object Typedefs { | ||
|
||
// the address of a PartitionCoordinator | ||
type PCRef = ActorRef[PartitionCoordinator.Command] | ||
|
||
// the address of the GlobalCoordinator | ||
type GCRef = ActorRef[GlobalCoordinator.Command] | ||
type EMRef = ActorRef[EntityManager.Command] | ||
// empty at vertex id i, if no vertex mirror exists in partition | ||
// otherwise, contains reference to vertex mirror | ||
// TODO; optimization; a bitSet to indicate existence of mirror in partition | ||
type MirrorMap = collection.mutable.Map[Int, Mirror] | ||
type MemberSet = collection.mutable.Set[Member] | ||
|
||
object MirrorMap { | ||
def empty: MirrorMap = collection.mutable.Map.empty | ||
def apply(ms: (Int, Mirror)*): MirrorMap = collection.mutable.Map(ms: _*) | ||
} | ||
|
||
object MemberSet { | ||
def empty: MemberSet = collection.mutable.Set.empty | ||
def apply(ms: (Member)*): MemberSet = collection.mutable.Set(ms: _*) | ||
} | ||
} |
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,16 @@ | ||
package com | ||
|
||
import akka.actor.typed.{ActorRef, ActorRefResolver} | ||
|
||
import java.nio.charset.StandardCharsets | ||
|
||
object Util { | ||
def serializeActorRef(resolver: ActorRefResolver, ref: ActorRef[_]): String = { | ||
val serializedActorRef: Array[Byte] = | ||
resolver.toSerializationFormat(ref).getBytes(StandardCharsets.UTF_8) | ||
new String(serializedActorRef, StandardCharsets.UTF_8) | ||
} | ||
// def deserializeActorRef(resolver: ActorRefResolver, str: String, T: type): ActorRef[Any] = { | ||
// resolver.resolveActorRef[SomeType.type](str) | ||
// } | ||
} |
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
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
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
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
Oops, something went wrong.