Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-8985

Add namespace declarations in .proto files for languages other than java

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.2-alpha
    • Fix Version/s: 2.0.3-alpha
    • Component/s: ha, ipc
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Currently .proto files use java_package to specify java packages in proto files, but namespace are not specified for other languages such as cpp, this causes name collision in cpp. we can add namespace declarations to avoid this.

      In Java, the package specifier is used as the Java package, unless you explicitly provide a option java_package in your .proto file. So the original java package will not be affected.

      About namespace name, how about "hadoop.common"(hadoop::common in cpp) for all common sub-project proto files, and "hadoop.hdfs"(hadoop::hdfs in cpp) for all hdfs sub-project proto files?

        Attachments

        1. HADOOP-8985-add-namespace.patch
          5 kB
          Binglin Chang

          Issue Links

            Activity

              People

              • Assignee:
                decster Binglin Chang
                Reporter:
                decster Binglin Chang
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: