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/11/29 23:29:22 UTC
[23/31] incubator-iota git commit: Corrected Ensemble.scala according
to the comments
Corrected Ensemble.scala according to the comments
Project: http://git-wip-us.apache.org/repos/asf/incubator-iota/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-iota/commit/a91998f4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-iota/tree/a91998f4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-iota/diff/a91998f4
Branch: refs/heads/master
Commit: a91998f4ef27de320dd1844aa85cb555678cd76b
Parents: d4a151a
Author: Shivansh <sh...@gmail.com>
Authored: Tue Nov 15 06:27:55 2016 +0530
Committer: Shivansh <sh...@gmail.com>
Committed: Tue Nov 15 06:27:55 2016 +0530
----------------------------------------------------------------------
.../src/main/scala/org/apache/iota/fey/Ensemble.scala | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/a91998f4/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 0e075e3..4db5f98 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
@@ -163,21 +163,21 @@ protected class Ensemble(val orchestrationID: String,
*/
private def createFeyActor(performerID: String, connectionIDs: Array[String], tmpActors:HashMap[String, ActorRef]):(String, ActorRef) = {
if(!tmpActors.contains(performerID)){
- val performerInfo = performers_metadata.getOrElse(performerID, null)
- if (Option(performerInfo).isDefined) {
+ val performerInfo = performers_metadata.get(performerID)
+ if (performerInfo.isDefined) {
val connections: Map[String, ActorRef] = connectionIDs.map(connID => {
createFeyActor(connID, connectors.getOrElse(connID,Array.empty),tmpActors)
}).toMap
var actor: ActorRef = null
- val actorProps = getPerformer(performerInfo, connections)
- if(performerInfo.autoScale) {
+ val actorProps = getPerformer(performerInfo.get, connections)
+ if(performerInfo.get.autoScale) {
- val resizer = DefaultResizer(lowerBound = performerInfo.lowerBound, upperBound = performerInfo.upperBound,
- messagesPerResize = CONFIG.MESSAGES_PER_RESIZE, backoffThreshold = performerInfo.backoffThreshold, backoffRate = 0.1)
+ val resizer = DefaultResizer(lowerBound = performerInfo.get.lowerBound, upperBound = performerInfo.get.upperBound,
+ messagesPerResize = CONFIG.MESSAGES_PER_RESIZE, backoffThreshold = performerInfo.get.backoffThreshold, backoffRate = 0.1)
val strategy =
- if(performerInfo.isRoundRobin) {
+ if(performerInfo.get.isRoundRobin) {
log.info(s"Using Round Robin for performer ${performerID}")
RoundRobinPool(1, Some(resizer))
} else {