Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-3702

Change thrift exception classes to contain getMessage() method

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: In Progress
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.1.0
    • Fix Version/s: None
    • Component/s: storm-client
    • Labels:
      None

      Description

      Thrift classes are currently being generated without camel casing for method names. And the exception classes have a member variable called "msg". This generates, get_msg() and set_msg() method names. Since this class extends java Exception class, when an TException is thrown, the getMessage() method returns null and cannot be relied upon.

      To get around this problem with getMessage() method, storm code has Wrapper classes, eg WrappedNotAliveException with a getMessage() method that return wraps get_msg() method in base class.

      Proposed Change:

      • Change the TException classes to rename member variable and generate camel cased class so that getMessage() is generated
      • Limit the change to specific TException classes only to avoid large change
      • Deprecate Wrapped classes

        Attachments

          Activity

            People

            • Assignee:
              bipinprasad Bipin Prasad
              Reporter:
              bipinprasad Bipin Prasad
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h 40m
                2h 40m