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

HttpFS: Sort response by key names as WebHDFS does

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: httpfs
    • Labels:
      None
    • Target Version/s:

      Description

      Example

      See description of HDFS-14665 for an example of LISTSTATUS.

      Analysis

      WebHDFS is using a TreeMap to serialize HdfsFileStatus, while HttpFS uses a LinkedHashMap to serialize FileStatus.

      Questions

      Why the difference? Is this intentional?

      • I looked into the Git history. It seems it's simply because WebHDFS uses TreeMap from the beginning; and HttpFS uses LinkedHashMap from the beginning. It is not only limited to LISTSTATUS, but ALL other request's JSON serialization.

      Now the real question: Could/Should we replace ALL LinkedHashMap into TreeMap in HttpFS serialization in FSOperations class?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                smeng Siyao Meng
                Reporter:
                smeng Siyao Meng
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: