You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eagle.apache.org by qi...@apache.org on 2016/10/19 03:19:05 UTC

[06/28] incubator-eagle git commit: EAGLE-327: Fix topologyOperation start exception: java.lang.ClassCastException

EAGLE-327: Fix topologyOperation start exception: java.lang.ClassCastException

https://issues.apache.org/jira/browse/EAGLE-327

Author: Zhao, Qingwen <qi...@ebay.com>
Reviewer: Wu, Michael
Closes #218


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

Branch: refs/heads/master
Commit: f51474dee0c6ab40b4df965871b5d723c06f84a3
Parents: 5a5a17c
Author: Zhao, Qingwen <qi...@ebay.com>
Authored: Mon Jun 6 10:25:05 2016 +0800
Committer: Zhao, Qingwen <qi...@ebay.com>
Committed: Mon Jun 6 10:25:05 2016 +0800

----------------------------------------------------------------------
 .../apache/eagle/alert/executor/AlertExecutorCreationUtils.java  | 2 +-
 .../eagle/datastream/core/StreamParallelismConfigExpansion.scala | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/f51474de/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutorCreationUtils.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutorCreationUtils.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutorCreationUtils.java
index 8ab290e..8377267 100644
--- a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutorCreationUtils.java
+++ b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutorCreationUtils.java
@@ -81,7 +81,7 @@ public class AlertExecutorCreationUtils {
             if(alertExecutorConfigs !=null && alertExecutorConfigs.containsKey(alertExecutorId)) {
                 Map<String, Object> alertExecutorConfig = (Map<String, Object>) alertExecutorConfigs.get(alertExecutorId).unwrapped();
                 int parts = 0;
-                if(alertExecutorConfig.containsKey("parallelism")) parts = (int) (alertExecutorConfig.get("parallelism"));
+                if(alertExecutorConfig.containsKey("parallelism")) parts = Integer.parseInt(alertExecutorConfig.get("parallelism").toString());
                 numPartitions = parts == 0 ? 1 : parts;
                 if(alertExecutorConfig.containsKey("partitioner")) partitionerCls = (String) alertExecutorConfig.get("partitioner");
             }

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/f51474de/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamParallelismConfigExpansion.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamParallelismConfigExpansion.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamParallelismConfigExpansion.scala
index 8699da6..7ac9ff5 100644
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamParallelismConfigExpansion.scala
+++ b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamParallelismConfigExpansion.scala
@@ -19,7 +19,7 @@ package org.apache.eagle.datastream.core
 
 import java.util.regex.Pattern
 
-import com.typesafe.config.{Config, ConfigObject, ConfigValue}
+import com.typesafe.config.{Config, ConfigObject}
 import org.jgrapht.experimental.dag.DirectedAcyclicGraph
 import org.slf4j.LoggerFactory
 
@@ -48,7 +48,7 @@ case class StreamParallelismConfigExpansion(config: Config) extends StreamDAGExp
     if(config.hasPath("envContextConfig.parallelismConfig")) {
       val parallelismConfig: ConfigObject = config.getObject("envContextConfig.parallelismConfig")
       parallelismConfig.asScala.toMap map {
-        case (name, value) => (Pattern.compile(name), value.asInstanceOf[ConfigValue].unwrapped().asInstanceOf[Int])
+        case (name, value) => (Pattern.compile(name), Integer.parseInt(value.unwrapped().toString))
       }
     }else{
       Map[Pattern,Int]()