Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-14032 [libhdfs++] Phase 2 improvements
  3. HDFS-10380

libhdfs++: Get rid of socket template parameter in RpcConnection

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • hdfs-client
    • None

    Description

      RpcConnection is always templated on asio::ip::tcp::socket except for in rpc_engine_test.cc. My understanding is the original reason for using this as a template parameter was to be able to use trait injection in gmock tests.

      This is useful for testing but makes debugging a lot more tricky due to the extra stuff that shows up on the stack. Heavily templated code also tends to produce very unhelpful compile errors e.g. when a missing semicolon in a templated class turns into pages of errors coming out of stuff that depended on the instantiation.

      This sort of work was already accomplished elsewhere by HDFS-9144, it looks like RpcConnection was one of the few areas they were left in place.

      Attachments

        1. HDFS-10380.HDFS-8707.000.patch
          11 kB
          James Clampffer

        Activity

          People

            James C James Clampffer
            James Clampffer James Clampffer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: