You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2019/08/14 17:10:20 UTC

[GitHub] [hadoop] jojochuang commented on a change in pull request #1270: HDFS-14718. HttpFS: Sort response by key names as WebHDFS does

jojochuang commented on a change in pull request #1270: HDFS-14718. HttpFS: Sort response by key names as WebHDFS does
URL: https://github.com/apache/hadoop/pull/1270#discussion_r313986113
 
 

 ##########
 File path: hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/FSOperations.java
 ##########
 @@ -280,14 +279,14 @@ private static Map contentSummaryToJSON(ContentSummary contentSummary) {
    */
   @SuppressWarnings({"unchecked"})
   private static Map quotaUsageToJSON(QuotaUsage quotaUsage) {
-    Map response = new LinkedHashMap();
+    Map response = new TreeMap();
     Map quotaUsageMap = quotaUsageToMap(quotaUsage);
     response.put(HttpFSFileSystem.QUOTA_USAGE_JSON, quotaUsageMap);
     return response;
   }
 
   private static Map<String, Object> quotaUsageToMap(QuotaUsage quotaUsage) {
-    Map<String, Object> result = new LinkedHashMap<>();
+    Map<String, Object> result = new TreeMap<>();
 
 Review comment:
   I honestly don't think people care about the order.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org