Uploaded image for project: 'Avro'
  1. Avro
  2. AVRO-272

Extend RPCContext to include protocol Methods.

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.0
    • Component/s: java
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Since the RPCContext is used to send listeners/plugins handshake and call metadata, it makes sense to include the RPC method in it as well.

      1. AVRO-272.patch.txt
        3 kB
        Philip Zeyliger

        Issue Links

          Activity

          Hide
          philip Philip Zeyliger added a comment -

          Attaching a patch. There's not much here. The two test lines do get invoked (I've set a breakpoint).

          It's possible I'm subverting AVRO-76 a bit. The plugin system seems to have been motivated in passing out of AVRO-band information between client and server. I'm using it to expose AVRO metadata to the client and server.

          (One possible way of exposing client host/port information to the server would be to write a plugin that sticks that information into thread locals, say. We'd still need to share the information between RPCContext and Transceiver, but that doesn't seem too bad.)

          Show
          philip Philip Zeyliger added a comment - Attaching a patch. There's not much here. The two test lines do get invoked (I've set a breakpoint). It's possible I'm subverting AVRO-76 a bit. The plugin system seems to have been motivated in passing out of AVRO-band information between client and server. I'm using it to expose AVRO metadata to the client and server. (One possible way of exposing client host/port information to the server would be to write a plugin that sticks that information into thread locals, say. We'd still need to share the information between RPCContext and Transceiver, but that doesn't seem too bad.)
          Hide
          cutting Doug Cutting added a comment -

          I just committed this.

          I think it might make sense to add a method like:

          public static RPCContext Responder#getContext()

          that can be called within a protocol implementation and retrieves the context from a ThreadLocal.

          Show
          cutting Doug Cutting added a comment - I just committed this. I think it might make sense to add a method like: public static RPCContext Responder#getContext() that can be called within a protocol implementation and retrieves the context from a ThreadLocal.

            People

            • Assignee:
              philip Philip Zeyliger
              Reporter:
              philip Philip Zeyliger
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development