[
https://issues.apache.org/jira/browse/STORM-1842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15285785#comment-15285785
]
Barry Hart commented on STORM-1842:
-----------------------------------
Error message from generated Python:
{noformat}
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/vagrant/petrel/petrel/cmdline.py", line 12, in <module>
from .package import build_jar
File "/vagrant/petrel/petrel/package.py", line 13, in <module>
from topologybuilder import TopologyBuilder
File "/vagrant/petrel/petrel/topologybuilder.py", line 6, in <module>
from petrel.generated.storm.ttypes import ComponentCommon, Grouping,
NullStruct, GlobalStreamId
File "/vagrant/petrel/petrel/generated/storm/ttypes.py", line 10080, in
<module>
class HBMessageData:
File "/vagrant/petrel/petrel/generated/storm/ttypes.py", line 10094, in
HBMessageData
(2, TType.STRUCT, 'pulse', (HBPulse, HBPulse.thrift_spec), None, ), # 2
NameError: name 'HBPulse' is not defined
{noformat}
> Forward references in storm.thrift cause tooling issues
> -------------------------------------------------------
>
> Key: STORM-1842
> URL: https://issues.apache.org/jira/browse/STORM-1842
> Project: Apache Storm
> Issue Type: Bug
> Components: storm-core
> Affects Versions: 1.0.0
> Reporter: Barry Hart
> Priority: Critical
>
> In recent versions of Storm (starting with version 1.0.0, I believe),
> storm.thrift uses several types before they are declared:
> * HBPulse
> * HBRecords
> * HBNodes
> These types are used in the definition of HBMessageData.
> This causes issues with downstream tools. For example, generating Python
> wrappers for the Storm Thrift types creates a module that will not import
> successfully.
> Would it be possible to reorder this code to define the types before using
> them? This appears to be a simple change.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)