diff --git a/SPARK_README.txt b/SPARK_README.txt index 9bbf29c09e..7798d33721 100644 --- a/SPARK_README.txt +++ b/SPARK_README.txt @@ -1,8 +1,10 @@ Spork currently requires you to build Spark separately and publish it to your -local ivy cache. You can do this as follows: +local ivy cache. It relies on the "dev" branch of Spark. You can check this +out and publish it to your local Ivy as follows: git clone git://github.com/mesos/spark.git cd spark +git checkout -b dev --track origin/dev sbt/sbt publish-local Then build Spork using ant jar as usual. diff --git a/build.xml b/build.xml index 81e891de98..201b021665 100644 --- a/build.xml +++ b/build.xml @@ -700,10 +700,19 @@ + + + + + + + + + @@ -796,10 +805,19 @@ + + + + + + + + + diff --git a/ivy.xml b/ivy.xml index 58698981ee..c84b433469 100644 --- a/ivy.xml +++ b/ivy.xml @@ -237,7 +237,7 @@ - + diff --git a/lib/spark/reference.conf b/lib/spark/reference.conf new file mode 100644 index 0000000000..2bc5f81c34 --- /dev/null +++ b/lib/spark/reference.conf @@ -0,0 +1,462 @@ +#################################### +# Akka Actor Reference Config File # +#################################### + +# This is the reference config file that contains all the default settings. +# Make your edits/overrides in your application.conf. + +akka { + # Akka version, checked against the runtime version of Akka. + version = "2.0.2" + + # Home directory of Akka, modules in the deploy directory will be loaded + home = "" + + # Event handlers to register at boot time (Logging$DefaultLogger logs to STDOUT) + event-handlers = ["akka.event.Logging$DefaultLogger"] + + # Event handlers are created and registered synchronously during ActorSystem + # start-up, and since they are actors, this timeout is used to bound the + # waiting time + event-handler-startup-timeout = 5s + + # Log level used by the configured loggers (see "event-handlers") as soon + # as they have been started; before that, see "stdout-loglevel" + # Options: ERROR, WARNING, INFO, DEBUG + loglevel = "INFO" + + # Log level for the very basic logger activated during AkkaApplication startup + # Options: ERROR, WARNING, INFO, DEBUG + stdout-loglevel = "WARNING" + + # Log the complete configuration at INFO level when the actor system is started. + # This is useful when you are uncertain of what configuration is used. + log-config-on-start = off + + # List FQCN of extensions which shall be loaded at actor system startup. + # Should be on the format: 'extensions = ["foo", "bar"]' etc. + # See the Akka Documentation for more info about Extensions + extensions = [] + + # Toggles whether the threads created by this ActorSystem should be daemons or not + daemonic = off + + # JVM shutdown, System.exit(-1), in case of a fatal error, such as OutOfMemoryError + jvm-exit-on-fatal-error = on + + actor { + + provider = "akka.actor.LocalActorRefProvider" + + # Timeout for ActorSystem.actorOf + creation-timeout = 20s + + # frequency with which stopping actors are prodded in case they had to be + # removed from their parents + reaper-interval = 5s + + # Serializes and deserializes (non-primitive) messages to ensure immutability, + # this is only intended for testing. + serialize-messages = off + + # Serializes and deserializes creators (in Props) to ensure that they can be sent over the network, + # this is only intended for testing. + serialize-creators = off + + typed { + # Default timeout for typed actor methods with non-void return type + timeout = 5s + } + + deployment { + + # deployment id pattern - on the format: /parent/child etc. + default { + + # routing (load-balance) scheme to use + # available: "from-code", "round-robin", "random", "smallest-mailbox", "scatter-gather", "broadcast" + # or: Fully qualified class name of the router class. + # The router class must extend akka.routing.CustomRouterConfig and and have constructor + # with com.typesafe.config.Config parameter. + # default is "from-code"; + # Whether or not an actor is transformed to a Router is decided in code only (Props.withRouter). + # The type of router can be overridden in the configuration; specifying "from-code" means + # that the values specified in the code shall be used. + # In case of routing, the actors to be routed to can be specified + # in several ways: + # - nr-of-instances: will create that many children + # - routees.paths: will look the paths up using actorFor and route to + # them, i.e. will not create children + # - resizer: dynamically resizable number of routees as specified in resizer below + router = "from-code" + + # number of children to create in case of a non-direct router; this setting + # is ignored if routees.paths is given + nr-of-instances = 1 + + # within is the timeout used for routers containing future calls + within = 5 seconds + + routees { + # Alternatively to giving nr-of-instances you can specify the full + # paths of those actors which should be routed to. This setting takes + # precedence over nr-of-instances + paths = [] + } + + # Routers with dynamically resizable number of routees; this feature is enabled + # by including (parts of) this section in the deployment + resizer { + + # The fewest number of routees the router should ever have. + lower-bound = 1 + + # The most number of routees the router should ever have. + # Must be greater than or equal to lower-bound. + upper-bound = 10 + + # Threshold to evaluate if routee is considered to be busy (under pressure). + # Implementation depends on this value (default is 1). + # 0: number of routees currently processing a message. + # 1: number of routees currently processing a message has + # some messages in mailbox. + # > 1: number of routees with at least the configured pressure-threshold + # messages in their mailbox. Note that estimating mailbox size of + # default UnboundedMailbox is O(N) operation. + pressure-threshold = 1 + + # Percentage to increase capacity whenever all routees are busy. + # For example, 0.2 would increase 20% (rounded up), i.e. if current + # capacity is 6 it will request an increase of 2 more routees. + rampup-rate = 0.2 + + # Minimum fraction of busy routees before backing off. + # For example, if this is 0.3, then we'll remove some routees only when + # less than 30% of routees are busy, i.e. if current capacity is 10 and + # 3 are busy then the capacity is unchanged, but if 2 or less are busy + # the capacity is decreased. + # Use 0.0 or negative to avoid removal of routees. + backoff-threshold = 0.3 + + # Fraction of routees to be removed when the resizer reaches the + # backoffThreshold. + # For example, 0.1 would decrease 10% (rounded up), i.e. if current + # capacity is 9 it will request an decrease of 1 routee. + backoff-rate = 0.1 + + # When the resizer reduce the capacity the abandoned routee actors are stopped + # with PoisonPill after this delay. The reason for the delay is to give concurrent + # messages a chance to be placed in mailbox before sending PoisonPill. + # Use 0s to skip delay. + stop-delay = 1s + + # Number of messages between resize operation. + # Use 1 to resize before each message. + messages-per-resize = 10 + } + } + } + + default-dispatcher { + # Must be one of the following + # Dispatcher, (BalancingDispatcher, only valid when all actors using it are of + # the same type), PinnedDispatcher, or a FQCN to a class inheriting + # MessageDispatcherConfigurator with a constructor with + # com.typesafe.config.Config parameter and akka.dispatch.DispatcherPrerequisites + # parameters. + # PinnedDispatcher must be used toghether with executor=thread-pool-executor. + type = "Dispatcher" + + # Which kind of ExecutorService to use for this dispatcher + # Valid options: + # "fork-join-executor" requires a "fork-join-executor" section + # "thread-pool-executor" requires a "thread-pool-executor" section + # or + # A FQCN of a class extending ExecutorServiceConfigurator + executor = "fork-join-executor" + + # This will be used if you have set "executor = "fork-join-executor"" + fork-join-executor { + # Min number of threads to cap factor-based parallelism number to + parallelism-min = 8 + + # Parallelism (threads) ... ceil(available processors * factor) + parallelism-factor = 3.0 + + # Max number of threads to cap factor-based parallelism number to + parallelism-max = 64 + } + + # This will be used if you have set "executor = "thread-pool-executor"" + thread-pool-executor { + # Keep alive time for threads + keep-alive-time = 60s + + # Min number of threads to cap factor-based core number to + core-pool-size-min = 8 + + # No of core threads ... ceil(available processors * factor) + core-pool-size-factor = 3.0 + + # Max number of threads to cap factor-based number to + core-pool-size-max = 64 + + # Hint: max-pool-size is only used for bounded task queues + # minimum number of threads to cap factor-based max number to + max-pool-size-min = 8 + + # Max no of threads ... ceil(available processors * factor) + max-pool-size-factor = 3.0 + + # Max number of threads to cap factor-based max number to + max-pool-size-max = 64 + + # Specifies the bounded capacity of the task queue (< 1 == unbounded) + task-queue-size = -1 + + # Specifies which type of task queue will be used, can be "array" or + # "linked" (default) + task-queue-type = "linked" + + # Allow core threads to time out + allow-core-timeout = on + } + + # How long time the dispatcher will wait for new actors until it shuts down + shutdown-timeout = 1s + + # Throughput defines the number of messages that are processed in a batch + # before the thread is returned to the pool. Set to 1 for as fair as possible. + throughput = 5 + + # Throughput deadline for Dispatcher, set to 0 or negative for no deadline + throughput-deadline-time = 0ms + + # If negative (or zero) then an unbounded mailbox is used (default) + # If positive then a bounded mailbox is used and the capacity is set using the + # property + # NOTE: setting a mailbox to 'blocking' can be a bit dangerous, could lead to + # deadlock, use with care + # The following mailbox-push-timeout-time is only used for type=Dispatcher and + # only if mailbox-capacity > 0 + mailbox-capacity = -1 + + # Specifies the timeout to add a new message to a mailbox that is full - + # negative number means infinite timeout. It is only used for type=Dispatcher + # and only if mailbox-capacity > 0 + mailbox-push-timeout-time = 10s + + # FQCN of the MailboxType, if not specified the default bounded or unbounded + # mailbox is used. The Class of the FQCN must have a constructor with + # (akka.actor.ActorSystem.Settings, com.typesafe.config.Config) parameters. + mailbox-type = "" + + # For BalancingDispatcher: If the balancing dispatcher should attempt to + # schedule idle actors using the same dispatcher when a message comes in, + # and the dispatchers ExecutorService is not fully busy already. + attempt-teamwork = on + + # For Actor with Stash: The default capacity of the stash. + # If negative (or zero) then an unbounded stash is used (default) + # If positive then a bounded stash is used and the capacity is set using the + # property + stash-capacity = -1 + } + + debug { + # enable function of Actor.loggable(), which is to log any received message at + # DEBUG level, see the “Testing Actor Systems” section of the Akka Documentation + # at http://akka.io/docs + receive = off + + # enable DEBUG logging of all AutoReceiveMessages (Kill, PoisonPill and the like) + autoreceive = off + + # enable DEBUG logging of actor lifecycle changes + lifecycle = off + + # enable DEBUG logging of all LoggingFSMs for events, transitions and timers + fsm = off + + # enable DEBUG logging of subscription changes on the eventStream + event-stream = off + } + + # Entries for pluggable serializers and their bindings. + serializers { + java = "akka.serialization.JavaSerializer" + } + + # Class to Serializer binding. You only need to specify the name of an interface + # or abstract base class of the messages. In case of ambiguity it is using the + # most specific configured class, or giving a warning and choosing the “first” one. + # + # To disable one of the default serializers, assign its class to "none", like + # "java.io.Serializable" = none + serialization-bindings { + "java.io.Serializable" = java + } + } + + # Used to set the behavior of the scheduler. + # Changing the default values may change the system behavior drastically so make sure + # you know what you're doing! See the Scheduler section of the Akka documentation for more details. + scheduler { + # The HashedWheelTimer (HWT) implementation from Netty is used as the default scheduler + # in the system. + # HWT does not execute the scheduled tasks on exact time. + # It will, on every tick, check if there are any tasks behind the schedule and execute them. + # You can increase or decrease the accuracy of the execution timing by specifying smaller + # or larger tick duration. + # If you are scheduling a lot of tasks you should consider increasing the ticks per wheel. + # For more information see: http://www.jboss.org/netty/ + tick-duration = 100ms + ticks-per-wheel = 512 + } + + actor { + + serializers { + proto = "akka.serialization.ProtobufSerializer" + } + + + serialization-bindings { + # Since com.google.protobuf.Message does not extend Serializable but GeneratedMessage + # does, need to use the more specific one here in order to avoid ambiguity + "com.google.protobuf.GeneratedMessage" = proto + } + + deployment { + + default { + + # if this is set to a valid remote address, the named actor will be deployed + # at that node e.g. "akka://sys@host:port" + remote = "" + + target { + + # A list of hostnames and ports for instantiating the children of a + # non-direct router + # The format should be on "akka://sys@host:port", where: + # - sys is the remote actor system name + # - hostname can be either hostname or IP address the remote actor + # should connect to + # - port should be the port for the remote server on the other node + # The number of actor instances to be spawned is still taken from the + # nr-of-instances setting as for local routers; the instances will be + # distributed round-robin among the given nodes. + nodes = [] + + } + } + } + } + + remote { + + # Which implementation of akka.remote.RemoteTransport to use + # default is a TCP-based remote transport based on Netty + transport = "akka.remote.netty.NettyRemoteTransport" + + # Enable untrusted mode for full security of server managed actors, allows + # untrusted clients to connect. + untrusted-mode = off + + # Timeout for ACK of cluster operations, like checking actor out etc. + remote-daemon-ack-timeout = 30s + + # If this is "on", Akka will log all inbound messages at DEBUG level, if off then they are not logged + log-received-messages = off + + # If this is "on", Akka will log all outbound messages at DEBUG level, if off then they are not logged + log-sent-messages = off + + # Each property is annotated with (I) or (O) or (I&O), where I stands for “inbound” and O for “outbound” connections. + # The NettyRemoteTransport always starts the server role to allow inbound connections, and it starts + # active client connections whenever sending to a destination which is not yet connected; if configured + # it reuses inbound connections for replies, which is called a passive client connection (i.e. from server + # to client). + netty { + + # (O) In case of increased latency / overflow how long should we wait (blocking the sender) + # until we deem the send to be cancelled? + # 0 means "never backoff", any positive number will indicate time to block at most. + backoff-timeout = 0ms + + # (I&O) Generate your own with '$AKKA_HOME/scripts/generate_config_with_secure_cookie.sh' + # or using 'akka.util.Crypt.generateSecureCookie' + secure-cookie = "" + + # (I) Should the remote server require that its peers share the same secure-cookie + # (defined in the 'remote' section)? + require-cookie = off + + # (I) Reuse inbound connections for outbound messages + use-passive-connections = on + + # (I) The hostname or ip to bind the remoting to, + # InetAddress.getLocalHost.getHostAddress is used if empty + hostname = "" + + # (I) The default remote server port clients should connect to. + # Default is 2552 (AKKA), use 0 if you want a random available port + port = 2552 + + # (O) The address of a local network interface (IP Address) to bind to when creating + # outbound connections. Set to "" or "auto" for automatic selection of local address. + outbound-local-address = "auto" + + # (I&O) Increase this if you want to be able to send messages with large payloads + message-frame-size = 1 MiB + + # (O) Timeout duration + connection-timeout = 120s + + # (I) Sets the size of the connection backlog + backlog = 4096 + + # (I) Length in akka.time-unit how long core threads will be kept alive if idling + execution-pool-keepalive = 60s + + # (I) Size of the core pool of the remote execution unit + execution-pool-size = 4 + + # (I) Maximum channel size, 0 for off + max-channel-memory-size = 0b + + # (I) Maximum total size of all channels, 0 for off + max-total-memory-size = 0b + + # (O) Time between reconnect attempts for active clients + reconnect-delay = 5s + + # (O) Read inactivity period (lowest resolution is seconds) + # after which active client connection is shutdown; + # will be re-established in case of new communication requests. + # A value of 0 will turn this feature off + read-timeout = 0s + + # (O) Write inactivity period (lowest resolution is seconds) + # after which a heartbeat is sent across the wire. + # A value of 0 will turn this feature off + write-timeout = 10s + + # (O) Inactivity period of both reads and writes (lowest resolution is seconds) + # after which active client connection is shutdown; + # will be re-established in case of new communication requests + # A value of 0 will turn this feature off + all-timeout = 0s + + # (O) Maximum time window that a client should try to reconnect for + reconnection-time-window = 600s + } + + # The dispatcher used for the system actor "network-event-sender" + network-event-sender-dispatcher { + executor = thread-pool-executor + type = PinnedDispatcher + } + } +}