Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-7434

Use generics appropriately in RPCEngine and reduce casts, with fixing a related bug of breaking thread-safety in HConnectionManager

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.95.1
    • None
    • None

    Description

      In RpcEngine,

        VersionedProtocol getProxy(Class<? extends VersionedProtocol> protocol, ...)
      

      should be

        <T extends VersionedProtocol> T getProxy(Class<T> protocol, ...)
      

      Also, while removing casts I encountered a bug of the method HConnectionManager.HConnectionImplementation.getProtocol() using broken logic just like double-checked locking for HashMap.

      Attachments

        1. HBASE-7434-V3.patch
          15 kB
          Hiroshi Ikeda
        2. HBASE-7434-V2.patch
          29 kB
          Hiroshi Ikeda
        3. HBASE-7434.patch
          29 kB
          Hiroshi Ikeda

        Activity

          People

            ikeda Hiroshi Ikeda
            ikeda Hiroshi Ikeda
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: