Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-5345

Allow the ServerContext to be Unwrapped Programmatically

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      From Apache Hive:

              public void deleteContext(ServerContext serverContext, TProtocol input, TProtocol output) {
                ...
                ThriftCLIServerContext context = (ThriftCLIServerContext) serverContext;
      }
      

      This proposed change allows for a cleaner approach:

              public void deleteContext(ServerContext serverContext, TProtocol input, TProtocol output) {
                ...
                ThriftCLIServerContext context = serverContext.unwrap(ThriftCLIServerContext.class);
      }
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            belugabehr David Mollitor
            belugabehr David Mollitor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

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

                Slack

                  Issue deployment