storm-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Joseph Evans (JIRA)" <>
Subject [jira] [Commented] (STORM-173) use "-c " command to define Number config value will generate ClassCastException
Date Wed, 05 Feb 2014 16:02:10 GMT


Robert Joseph Evans commented on STORM-173:

The issue is that command line arguments are always written as strings.  Not numbers, not
lists, not maps.  I remember a pull request or issue on github to try and fix this, but I
cannot find it now.  Essentially in the code that parsed the command line options it looked
to see if the value looked like a number, and if it did, it converted it to a number and stored
it in the config.  There was also some code for lists and things too.

> use "-c " command to define Number config value will generate ClassCastException
> --------------------------------------------------------------------------------
>                 Key: STORM-173
>                 URL:
>             Project: Apache Storm (Incubating)
>          Issue Type: Bug
>            Reporter: caofangkun
>            Priority: Minor
> storm -c topology.workers=3 -c storm.zookeeper.root=/storm/cluster001 jar ./storm-starter-0.0.1-SNAPSHOT.jar
storm.starter.WordCountTopology2 WordCountTopology2
> Will generate SerConf like this :
> Submitting topology WordCountTopology2 in distributed mode with conf {"storm.zookeeper.root":"\/storm\/cluster001","topology.workers":"3","topology.debug":true}
> but "topology.workers":"3" is wrong and should be "topology.workers":3
> And can find errors in $STOMR_HOME/logs/nimbus.log as following:
> 2013-12-10 11:18:44 o.a.t.s.TNonblockingServer [ERROR] Unexpected exception while invoking!
> java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number
> at backtype.storm.thrift$mk_plain_component_common.doInvoke(thrift.clj:93) ~[storm-core-0.9.0-rc2.jar:na]
> at clojure.lang.RestFn.invoke( ~[clojure-1.4.0.jar:na]
> at backtype.storm.thrift$mk_bolt_spec_STAR_.doInvoke(thrift.clj:158) ~[storm-core-0.9.0-rc2.jar:na]
> at clojure.lang.RestFn.invoke( ~[clojure-1.4.0.jar:na]
> at backtype.storm.daemon.common$add_acker_BANG_.invoke(common.clj:183) ~[storm-core-0.9.0-rc2.jar:na]
> at backtype.storm.daemon.common$system_topology_BANG_.invoke(common.clj:280) ~[storm-core-0.9.0-rc2.jar:na]
> at backtype.storm.daemon.nimbus$fn__5822$exec_fn__1273__auto__$reify__5835.submitTopologyWithOpts(nimbus.clj:931)
> at backtype.storm.daemon.nimbus$fn__5822$exec_fn__1273__auto__$reify__5835.submitTopology(nimbus.clj:949)
> at backtype.storm.generated.Nimbus$Processor$submitTopology.getResult(
> at backtype.storm.generated.Nimbus$Processor$submitTopology.getResult(
> at org.apache.thrift7.ProcessFunction.process( ~[libthrift7-0.7.0-2.jar:0.7.0-2]
> at org.apache.thrift7.TBaseProcessor.process( ~[libthrift7-0.7.0-2.jar:0.7.0-2]
> at org.apache.thrift7.server.TNonblockingServer$FrameBuffer.invoke(
> at org.apache.thrift7.server.THsHaServer$ [libthrift7-0.7.0-2.jar:0.7.0-2]
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
> at java.util.concurrent.ThreadPoolExecutor$ [na:1.6.0_37]
> at [na:1.6.0_37]

This message was sent by Atlassian JIRA

View raw message