Skip to content

HDFS-14718. HttpFS: Sort response by key names as WebHDFS does #1270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

smengcl
Copy link
Contributor

@smengcl smengcl commented Aug 10, 2019

No description provided.

Change-Id: Ia799ee1b242ab420c8d1de2c07efaf060f066434
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<>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to add a unit test to make sure that the order is preserved.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't found any existing unit tests that compares the order of the response JSON of WebHDFS and HttpFS. e.g. BaseTestHttpFSWith#testQuotaUsage checks the the correctness of output from DFS/HttpFS but doesn't care about the order.
That might be something we want to do with a new unit test class. Or is there one test class that does this already?

Initially I was just looking at output for LISTSTATUS. I discovered that WebHDFS responds with sorted keys, but HttpFS doesn't. Then I found other responses from HttpFS also aren't sorted but WebHDFS does. So I extended the scope of this jira.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I honestly don't think people care about the order.

Copy link
Contributor Author

@smengcl smengcl Aug 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. People won't care in production.
I filed this jira just because I was comparing the RAW JSON, and they weren't in the same order.

@sunchao sunchao added the HDFS label Aug 13, 2019
@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 47 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
-1 test4tests 0 The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 mvninstall 1079 trunk passed
+1 compile 21 trunk passed
+1 checkstyle 16 trunk passed
+1 mvnsite 30 trunk passed
+1 shadedclient 675 branch has no errors when building and testing our client artifacts.
+1 javadoc 18 trunk passed
0 spotbugs 35 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 34 trunk passed
_ Patch Compile Tests _
+1 mvninstall 20 the patch passed
+1 compile 16 the patch passed
+1 javac 16 the patch passed
-0 checkstyle 18 hadoop-hdfs-project/hadoop-hdfs-httpfs: The patch generated 4 new + 42 unchanged - 4 fixed = 46 total (was 46)
+1 mvnsite 24 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 706 patch has no errors when building and testing our client artifacts.
+1 javadoc 15 the patch passed
+1 findbugs 38 the patch passed
_ Other Tests _
+1 unit 262 hadoop-hdfs-httpfs in the patch passed.
+1 asflicense 26 The patch does not generate ASF License warnings.
3155
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1270/1/artifact/out/Dockerfile
GITHUB PR #1270
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 8c0a2f3179b2 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 9b8359b
Default Java 1.8.0_222
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-1270/1/artifact/out/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs-httpfs.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1270/1/testReport/
Max. process+thread count 620 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs-httpfs U: hadoop-hdfs-project/hadoop-hdfs-httpfs
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1270/1/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 66 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
-1 test4tests 0 The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 mvninstall 1083 trunk passed
+1 compile 23 trunk passed
+1 checkstyle 15 trunk passed
+1 mvnsite 29 trunk passed
+1 shadedclient 665 branch has no errors when building and testing our client artifacts.
+1 javadoc 22 trunk passed
0 spotbugs 37 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 36 trunk passed
_ Patch Compile Tests _
+1 mvninstall 19 the patch passed
+1 compile 18 the patch passed
+1 javac 18 the patch passed
-0 checkstyle 12 hadoop-hdfs-project/hadoop-hdfs-httpfs: The patch generated 4 new + 42 unchanged - 4 fixed = 46 total (was 46)
+1 mvnsite 24 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 721 patch has no errors when building and testing our client artifacts.
+1 javadoc 17 the patch passed
+1 findbugs 44 the patch passed
_ Other Tests _
+1 unit 286 hadoop-hdfs-httpfs in the patch passed.
+1 asflicense 28 The patch does not generate ASF License warnings.
3221
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1270/2/artifact/out/Dockerfile
GITHUB PR #1270
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux e429fe79a7b9 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 6244502
Default Java 1.8.0_222
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-1270/2/artifact/out/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs-httpfs.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1270/2/testReport/
Max. process+thread count 616 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs-httpfs U: hadoop-hdfs-project/hadoop-hdfs-httpfs
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1270/2/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 106 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
-1 test4tests 0 The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 mvninstall 1366 trunk passed
+1 compile 32 trunk passed
+1 checkstyle 27 trunk passed
+1 mvnsite 43 trunk passed
+1 shadedclient 942 branch has no errors when building and testing our client artifacts.
+1 javadoc 26 trunk passed
0 spotbugs 53 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 51 trunk passed
_ Patch Compile Tests _
+1 mvninstall 26 the patch passed
+1 compile 20 the patch passed
+1 javac 20 the patch passed
-0 checkstyle 17 hadoop-hdfs-project/hadoop-hdfs-httpfs: The patch generated 4 new + 42 unchanged - 4 fixed = 46 total (was 46)
+1 mvnsite 30 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 873 patch has no errors when building and testing our client artifacts.
+1 javadoc 20 the patch passed
+1 findbugs 47 the patch passed
_ Other Tests _
+1 unit 290 hadoop-hdfs-httpfs in the patch passed.
+1 asflicense 31 The patch does not generate ASF License warnings.
4064
Subsystem Report/Notes
Docker Client=19.03.0 Server=19.03.0 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1270/3/artifact/out/Dockerfile
GITHUB PR #1270
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux e091ff9f41e6 4.15.0-52-generic #56-Ubuntu SMP Tue Jun 4 22:49:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / ee7c261
Default Java 1.8.0_212
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-1270/3/artifact/out/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs-httpfs.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1270/3/testReport/
Max. process+thread count 610 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs-httpfs U: hadoop-hdfs-project/hadoop-hdfs-httpfs
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1270/3/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 33 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
-1 test4tests 0 The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 mvninstall 1252 trunk passed
+1 compile 23 trunk passed
+1 checkstyle 22 trunk passed
+1 mvnsite 31 trunk passed
+1 shadedclient 799 branch has no errors when building and testing our client artifacts.
+1 javadoc 23 trunk passed
0 spotbugs 44 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 41 trunk passed
_ Patch Compile Tests _
+1 mvninstall 23 the patch passed
+1 compile 19 the patch passed
+1 javac 19 the patch passed
-0 checkstyle 16 hadoop-hdfs-project/hadoop-hdfs-httpfs: The patch generated 4 new + 42 unchanged - 4 fixed = 46 total (was 46)
+1 mvnsite 27 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 823 patch has no errors when building and testing our client artifacts.
+1 javadoc 20 the patch passed
+1 findbugs 56 the patch passed
_ Other Tests _
+1 unit 296 hadoop-hdfs-httpfs in the patch passed.
+1 asflicense 31 The patch does not generate ASF License warnings.
3656
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1270/4/artifact/out/Dockerfile
GITHUB PR #1270
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 5d3fa81bfa75 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 3329257
Default Java 1.8.0_222
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-1270/4/artifact/out/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs-httpfs.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1270/4/testReport/
Max. process+thread count 609 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs-httpfs U: hadoop-hdfs-project/hadoop-hdfs-httpfs
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1270/4/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 44 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
-1 test4tests 0 The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 mvninstall 1102 trunk passed
+1 compile 26 trunk passed
+1 checkstyle 21 trunk passed
+1 mvnsite 33 trunk passed
+1 shadedclient 716 branch has no errors when building and testing our client artifacts.
+1 javadoc 24 trunk passed
0 spotbugs 46 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 44 trunk passed
_ Patch Compile Tests _
+1 mvninstall 23 the patch passed
+1 compile 21 the patch passed
+1 javac 21 the patch passed
-0 checkstyle 16 hadoop-hdfs-project/hadoop-hdfs-httpfs: The patch generated 4 new + 42 unchanged - 4 fixed = 46 total (was 46)
+1 mvnsite 29 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 768 patch has no errors when building and testing our client artifacts.
+1 javadoc 21 the patch passed
+1 findbugs 47 the patch passed
_ Other Tests _
+1 unit 281 hadoop-hdfs-httpfs in the patch passed.
+1 asflicense 34 The patch does not generate ASF License warnings.
3377
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1270/5/artifact/out/Dockerfile
GITHUB PR #1270
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 9697a1ae48b2 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 915cbc9
Default Java 1.8.0_222
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-1270/5/artifact/out/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs-httpfs.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1270/5/testReport/
Max. process+thread count 624 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs-httpfs U: hadoop-hdfs-project/hadoop-hdfs-httpfs
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1270/5/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 35s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 💚 mvninstall 20m 10s trunk passed
+1 💚 compile 0m 29s trunk passed with JDK Ubuntu-11.0.8+10-post-Ubuntu-0ubuntu118.04.1
+1 💚 compile 0m 26s trunk passed with JDK Private Build-1.8.0_252-8u252-b09-1~18.04-b09
+1 💚 checkstyle 0m 23s trunk passed
+1 💚 mvnsite 0m 34s trunk passed
+1 💚 shadedclient 14m 47s branch has no errors when building and testing our client artifacts.
-1 ❌ javadoc 0m 26s hadoop-hdfs-httpfs in trunk failed with JDK Ubuntu-11.0.8+10-post-Ubuntu-0ubuntu118.04.1.
+1 💚 javadoc 0m 26s trunk passed with JDK Private Build-1.8.0_252-8u252-b09-1~18.04-b09
+0 🆗 spotbugs 0m 40s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 0m 39s trunk passed
_ Patch Compile Tests _
+1 💚 mvninstall 0m 31s the patch passed
+1 💚 compile 0m 23s the patch passed with JDK Ubuntu-11.0.8+10-post-Ubuntu-0ubuntu118.04.1
+1 💚 javac 0m 23s the patch passed
+1 💚 compile 0m 20s the patch passed with JDK Private Build-1.8.0_252-8u252-b09-1~18.04-b09
+1 💚 javac 0m 20s the patch passed
-0 ⚠️ checkstyle 0m 15s hadoop-hdfs-project/hadoop-hdfs-httpfs: The patch generated 4 new + 43 unchanged - 4 fixed = 47 total (was 47)
+1 💚 mvnsite 0m 29s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 shadedclient 13m 42s patch has no errors when building and testing our client artifacts.
-1 ❌ javadoc 0m 23s hadoop-hdfs-httpfs in the patch failed with JDK Ubuntu-11.0.8+10-post-Ubuntu-0ubuntu118.04.1.
+1 💚 javadoc 0m 19s the patch passed with JDK Private Build-1.8.0_252-8u252-b09-1~18.04-b09
+1 💚 findbugs 0m 48s the patch passed
_ Other Tests _
+1 💚 unit 5m 10s hadoop-hdfs-httpfs in the patch passed.
+1 💚 asflicense 0m 31s The patch does not generate ASF License warnings.
64m 36s
Subsystem Report/Notes
Docker ClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-1270/3/artifact/out/Dockerfile
GITHUB PR #1270
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 9022e3aeaa26 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / e756fe3
Default Java Private Build-1.8.0_252-8u252-b09-1~18.04-b09
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.8+10-post-Ubuntu-0ubuntu118.04.1 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_252-8u252-b09-1~18.04-b09
javadoc https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-1270/3/artifact/out/branch-javadoc-hadoop-hdfs-project_hadoop-hdfs-httpfs-jdkUbuntu-11.0.8+10-post-Ubuntu-0ubuntu118.04.1.txt
checkstyle https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-1270/3/artifact/out/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs-httpfs.txt
javadoc https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-1270/3/artifact/out/patch-javadoc-hadoop-hdfs-project_hadoop-hdfs-httpfs-jdkUbuntu-11.0.8+10-post-Ubuntu-0ubuntu118.04.1.txt
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-1270/3/testReport/
Max. process+thread count 643 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs-httpfs U: hadoop-hdfs-project/hadoop-hdfs-httpfs
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-1270/3/console
versions git=2.17.1 maven=3.6.0 findbugs=4.0.6
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 0s Docker mode activated.
-1 ❌ patch 0m 20s #1270 does not apply to trunk. Rebase required? Wrong Branch? See https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute for help.
Subsystem Report/Notes
GITHUB PR #1270
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-1270/1/console
versions git=2.17.1
Powered by Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants