• Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: hdfs-client
    • Labels:
    • Hadoop Flags:


      The constants in HdfsConstants are used by both the client side and the server side. There are two types of constants in the class:

      1. Constants that are used internally by the servers or not part of the APIs. These constants are free to evolve without breaking compatibilities. For example, MAX_PATH_LENGTH is used by the NN to enforce the length of the path does not go too long. Developers are free to change the name of the constants and to move it around if necessary.
      2. Constants that are used by the clients, but not parts of the APIs. For example, QUOTA_DONT_SET represents an unlimited quota. The value is part of the wire protocol but the value is not. Developers are free to rename the constants but are not allowed to change the value of the constants.
      3. Constants that are parts of the APIs. For example, SafeModeAction is used in DistributedFileSystem. Changing the name / value of the constant will break binary compatibility, but not source code compatibility.

      This jira proposes to separate the above three types of constants into different classes:

      • Creating a new class HdfsConstantsServer to hold the first type of constants.
      • Move HdfsConstants into the hdfs-client package. The work of separating the second and the third types of constants will be postponed in a separate jira.


        1. HDFS-8249.004.patch
          274 kB
          Haohui Mai
        2. HDFS-8249.003.patch
          274 kB
          Haohui Mai
        3. HDFS-8249.002.patch
          263 kB
          Haohui Mai
        4. HDFS-8249.001.patch
          262 kB
          Haohui Mai
        5. HDFS-8249.000.patch
          262 kB
          Haohui Mai

          Issue Links



              • Assignee:
                wheat9 Haohui Mai
                wheat9 Haohui Mai
              • Votes:
                0 Vote for this issue
                7 Start watching this issue


                • Created: