Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-4866

Protocol buffer support cannot compile under C

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.1.0-beta, 3.0.0-alpha1
    • Fix Version/s: 2.1.0-beta
    • Component/s: namenode
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Incompatible change, Reviewed
    • Release Note:
      Hide
      The Protocol Buffers definition of the inter-namenode protocol required a change for compatibility with compiled C clients. This is a backwards-incompatible change. A namenode prior to this change will not be able to communicate with a namenode after this change.
      Show
      The Protocol Buffers definition of the inter-namenode protocol required a change for compatibility with compiled C clients. This is a backwards-incompatible change. A namenode prior to this change will not be able to communicate with a namenode after this change.

      Description

      When compiling Hadoop's .proto descriptions for use in C, an error occurs because one of the RPC's in NamenodeProtocol.proto is named "register". This name is a reserved word in languages such as C. When using the Java and C++ languages, the name is hidden inside a class and therefore doesn't cause an error. Unfortunately, that is not the case in non-class languages such as C.

      Note: generating the C translation of the .proto files requires installation of the protobuf-c package from google:

      http://code.google.com/p/protobuf-c/

        Attachments

        1. HDFS-4866.002.patch
          6 kB
          Arpit Agarwal
        2. HDFS-4866.branch-2.001.patch
          6 kB
          Arpit Agarwal
        3. HDFS-4866.trunk.001.patch
          7 kB
          Arpit Agarwal
        4. NamenodeProtocol.pb-c.c
          79 kB
          Ralph Castain
        5. NamenodeProtocol.pb-c.h
          46 kB
          Ralph Castain
        6. pcreate.pl
          8 kB
          Ralph Castain
        7. pcreate.pl
          6 kB
          Ralph Castain

        Issue Links

          Activity

            People

            • Assignee:
              arp Arpit Agarwal
              Reporter:
              rhc Ralph Castain

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment