-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[STORM-3702] Change thrift exception classes to contain getMessage() method #3337
base: master
Are you sure you want to change the base?
Conversation
5d0cc69
to
a46c9cb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would prefer someone with more thrift knowledge to look at this as well, but I like this change. Please file a JIRA to follow through on removing the deprecated Wrapped exceptions.
Since it is possible to break backwards compatibility, I am more conservative on this and would like more tests to be done. (1) Did we get a chance to test with old clients? For (3-4), my question is more like: if there is any case like these cases. I am currently not sure. Thanks |
(1) No new tests have been added. I can do a more comprehensive search of get_msg() usage and see if something was overlooked - especially python code that may not cause compile or test error without proper code coverage. |
(1) For old clients, I am thinking of users using old storm client to submit topologies to upgraded cluster. (2) For old python code, I am thinking of
This can't be tested on unit tests. (3) By server-side plugin, I meant plugins that storm users can implement for their cluster, for example, (4) The topology code depends on Theoretically (3-4) could happen. But what I am currently not sure is that if anyone would implement a server-side plugin that invokes I am more confident with it if we can do comprehensive tests first. But this is not urgent. And I will also try to find some time to do some tests too. Thanks |
Thanks for the explanation. Only way to check item (4) is to do a "binary" check on the topology jar to test for incompatible use (i.e. use of these specific exception.get_msg() call. I need to think about how to do this properly. |
|
@bipinprasad As discussed, I feel all the thrift API methods thould wrap these exception under |
Another question I have related to python is since this PR separates out storm_exception/*.py, will code like splitsentence.py https://github.com/apache/storm/blob/master/examples/storm-starter/multilang/resources/splitsentence.py#L16 work if it tries to access these exception classes? Does it need to import storm_exception explicitly? (I see it |
I would like to learn more about this approach. The current way of passing an exact exception class (like NotAliveException) seems fine with me |
Indeed. Good point. Ideally python import should remain unchanged - i.e. just single import. |
…t to generate camel case methods.
…een fixed to generate getMessage() method.
# Conflicts: # storm-client/src/jvm/org/apache/storm/generated/AlreadyAliveException.java # storm-client/src/jvm/org/apache/storm/generated/AuthorizationException.java # storm-client/src/jvm/org/apache/storm/generated/HBAuthorizationException.java # storm-client/src/jvm/org/apache/storm/generated/HBExecutionException.java # storm-client/src/jvm/org/apache/storm/generated/IllegalStateException.java # storm-client/src/jvm/org/apache/storm/generated/InvalidTopologyException.java # storm-client/src/jvm/org/apache/storm/generated/KeyAlreadyExistsException.java # storm-client/src/jvm/org/apache/storm/generated/KeyNotFoundException.java # storm-client/src/jvm/org/apache/storm/generated/NotAliveException.java # storm-client/src/py/storm/ttypes.py
What is the purpose of the change
*Make TException classes consistent with Exception class and eventually remove Wrapped exception classes.
How was the change tested
Recompile and run tests