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

Compatibility Docs should clarify the policy for what takes precedence when a conflict is found

    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.7.2
    • Fix Version/s: 3.0.0
    • Component/s: documentation
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      The Compatibility Docs (https://hadoop.apache.org/docs/r2.7.1/hadoop-project-dist/hadoop-common/Compatibility.html#Java_API) list the policies for Private, Public, not annotated, etc Classes and members, but it doesn't say what happens when there's a conflict. We should try obviously try to avoid this situation, but it would be good to explicitly state what takes precedence.

      As an example, until YARN-3225 made it consistent, RefreshNodesRequest looked like this:

      @Private
      @Stable
      public abstract class RefreshNodesRequest {
        @Public
        @Stable
        public static RefreshNodesRequest newInstance() {
          RefreshNodesRequest request = Records.newRecord(RefreshNodesRequest.class);
          return request;
        }
      }
      

      Note that the class is marked @Private, but the method is marked @Public.

      In this example, I'd say that the class level should have priority.

        Attachments

        1. HADOOP-13493.001.patch
          2 kB
          Daniel Templeton
        2. HADOOP-13493.002.patch
          3 kB
          Daniel Templeton

          Activity

            People

            • Assignee:
              templedf Daniel Templeton
              Reporter:
              rkanter Robert Kanter
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: