Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8F5F1200B16 for ; Mon, 6 Jun 2016 04:27:18 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8DF12160A53; Mon, 6 Jun 2016 02:27:18 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D5A85160A28 for ; Mon, 6 Jun 2016 04:27:17 +0200 (CEST) Received: (qmail 31274 invoked by uid 500); 6 Jun 2016 02:27:17 -0000 Mailing-List: contact commits-help@eagle.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@eagle.incubator.apache.org Delivered-To: mailing list commits@eagle.incubator.apache.org Received: (qmail 31265 invoked by uid 99); 6 Jun 2016 02:27:17 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Jun 2016 02:27:17 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 93C19C1EB4 for ; Mon, 6 Jun 2016 02:27:16 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.646 X-Spam-Level: X-Spam-Status: No, score=-4.646 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id BLxhvfM4tB6G for ; Mon, 6 Jun 2016 02:27:15 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with SMTP id 740F85F487 for ; Mon, 6 Jun 2016 02:27:15 +0000 (UTC) Received: (qmail 31262 invoked by uid 99); 6 Jun 2016 02:27:14 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Jun 2016 02:27:14 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 9BA4CDFD43; Mon, 6 Jun 2016 02:27:14 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: qingwzhao@apache.org To: commits@eagle.incubator.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: incubator-eagle git commit: EAGLE-327: Fix topologyOperation start exception: java.lang.ClassCastException Date: Mon, 6 Jun 2016 02:27:14 +0000 (UTC) archived-at: Mon, 06 Jun 2016 02:27:18 -0000 Repository: incubator-eagle Updated Branches: refs/heads/branch-0.4 5a5a17c3d -> f51474dee EAGLE-327: Fix topologyOperation start exception: java.lang.ClassCastException https://issues.apache.org/jira/browse/EAGLE-327 Author: Zhao, Qingwen 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/branch-0.4 Commit: f51474dee0c6ab40b4df965871b5d723c06f84a3 Parents: 5a5a17c Author: Zhao, Qingwen Authored: Mon Jun 6 10:25:05 2016 +0800 Committer: Zhao, Qingwen 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 alertExecutorConfig = (Map) 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]()