You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iota.apache.org by to...@apache.org on 2016/07/08 01:06:39 UTC

[2/4] incubator-iota git commit: Adding new Fey configuration for auto scale

Adding new Fey configuration for auto scale

-  messages-per-resize: Volume of message to trigger resize
- changing _ to - in log-appender.


Project: http://git-wip-us.apache.org/repos/asf/incubator-iota/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-iota/commit/bc44acb2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-iota/tree/bc44acb2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-iota/diff/bc44acb2

Branch: refs/heads/master
Commit: bc44acb259563778a7f435146b47f2de9399a1b3
Parents: 1fb9c1c
Author: Barbara Gomes <ba...@gmail.com>
Authored: Thu Jul 7 17:37:44 2016 -0700
Committer: Barbara Gomes <ba...@gmail.com>
Committed: Thu Jul 7 17:37:44 2016 -0700

----------------------------------------------------------------------
 fey-core/src/main/resources/application.conf               | 8 +++++++-
 fey-core/src/main/scala/org/apache/iota/fey/Ensemble.scala | 4 +++-
 fey-core/src/main/scala/org/apache/iota/fey/Utils.scala    | 4 +++-
 3 files changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/bc44acb2/fey-core/src/main/resources/application.conf
----------------------------------------------------------------------
diff --git a/fey-core/src/main/resources/application.conf b/fey-core/src/main/resources/application.conf
index 28992f4..437c245 100644
--- a/fey-core/src/main/resources/application.conf
+++ b/fey-core/src/main/resources/application.conf
@@ -54,7 +54,13 @@ fey-global-configuration{
   // FILE -> Appends log the a rolling file at ~/.fey/logs/fey_core.log
   // STDOUT -> Appends log to STDOUT
   // FILE_STDOUT -> Appends log to STDOUT as well as to FILE
-  log_appender = "STDOUT"
+  log-appender = "STDOUT"
+
+  //Router configuration when using auto scaling
+  auto-scale{
+    //volume of messages to trigger resize
+    messages-per-resize = 500
+  }
 
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/bc44acb2/fey-core/src/main/scala/org/apache/iota/fey/Ensemble.scala
----------------------------------------------------------------------
diff --git a/fey-core/src/main/scala/org/apache/iota/fey/Ensemble.scala b/fey-core/src/main/scala/org/apache/iota/fey/Ensemble.scala
index 4e651d4..b4553aa 100644
--- a/fey-core/src/main/scala/org/apache/iota/fey/Ensemble.scala
+++ b/fey-core/src/main/scala/org/apache/iota/fey/Ensemble.scala
@@ -164,8 +164,10 @@ protected class Ensemble(val orchestrationID: String,
 
         var actor:ActorRef = null
         if(performerInfo.autoScale > 0) {
-          val resizer = DefaultResizer(lowerBound = 1, upperBound = performerInfo.autoScale, messagesPerResize = 200, backoffThreshold = 0.4)
+          val resizer = DefaultResizer(lowerBound = 1, upperBound = performerInfo.autoScale,
+            messagesPerResize = CONFIG.MESSAGES_PER_RESIZE, backoffThreshold = 0.4)
           val smallestMailBox = SmallestMailboxPool(1, Some(resizer))
+
           actor = context.actorOf(
             smallestMailBox.props(Props(clazz,
               performerInfo.parameters, performerInfo.backoff, connections, performerInfo.schedule, orchestrationName, orchestrationID, true)),

http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/bc44acb2/fey-core/src/main/scala/org/apache/iota/fey/Utils.scala
----------------------------------------------------------------------
diff --git a/fey-core/src/main/scala/org/apache/iota/fey/Utils.scala b/fey-core/src/main/scala/org/apache/iota/fey/Utils.scala
index dab47bd..4307143 100644
--- a/fey-core/src/main/scala/org/apache/iota/fey/Utils.scala
+++ b/fey-core/src/main/scala/org/apache/iota/fey/Utils.scala
@@ -191,6 +191,7 @@ object CONFIG{
   var CHEKPOINT_ENABLED = true
   var LOG_LEVEL = ""
   var LOG_APPENDER = ""
+  var MESSAGES_PER_RESIZE = 500
 
   def loadUserConfiguration(path: String) = {
 
@@ -210,7 +211,8 @@ object CONFIG{
       JAR_REPOSITORY = app.getString("jar-repository")
       CHEKPOINT_ENABLED = app.getBoolean("enable-checkpoint")
       LOG_LEVEL = app.getString("log-level").toUpperCase()
-      LOG_APPENDER = app.getString("log_appender").toUpperCase()
+      LOG_APPENDER = app.getString("log-appender").toUpperCase()
+      MESSAGES_PER_RESIZE = app.getInt("auto-scale.messages-per-resize")
 
     setLogbackConfiguration()
   }