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

HttpFS does not seem to support SNAPSHOT related methods for WebHDFS REST Interface

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha3
    • Fix Version/s: 2.9.0, 3.0.0-beta1
    • Component/s: httpfs
    • Labels:
      None

      Description

      Currently, HttpFS is lacking implementation for SNAPSHOT related methods from WebHDFS REST interface as defined by WebHDFS documentation WebHDFS documentation

      I would like to work on this implementation, following the existing design approach already implemented by other WebHDFS methods on current HttpFS project, so I'll be proposing an initial patch soon for reviews.

      1. HDFS-12117.003.patch
        21 kB
        Wellington Chevreuil
      2. HDFS-12117.004.patch
        21 kB
        Wellington Chevreuil
      3. HDFS-12117.005.patch
        22 kB
        Wellington Chevreuil
      4. HDFS-12117.006.patch
        28 kB
        Wellington Chevreuil
      5. HDFS-12117.patch.01
        11 kB
        Wellington Chevreuil
      6. HDFS-12117.patch.02
        21 kB
        Wellington Chevreuil
      7. HDFS-12117-branch-2.001.patch
        28 kB
        Wellington Chevreuil

        Activity

        Hide
        jzhuge John Zhuge added a comment -

        The branch-2 patch looks good. Committed to branch-2.

        Thanks Wellington Chevreuil for the contribution! Thanks Wei-Chiu Chuang for the review!

        Show
        jzhuge John Zhuge added a comment - The branch-2 patch looks good. Committed to branch-2. Thanks Wellington Chevreuil for the contribution! Thanks Wei-Chiu Chuang for the review!
        Hide
        hadoopqa Hadoop QA added a comment -
        +1 overall



        Vote Subsystem Runtime Comment
        0 reexec 13m 17s Docker mode activated.
              Prechecks
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 2 new or modified test files.
              branch-2 Compile Tests
        +1 mvninstall 7m 0s branch-2 passed
        +1 compile 0m 18s branch-2 passed with JDK v1.8.0_144
        +1 compile 0m 19s branch-2 passed with JDK v1.7.0_131
        +1 checkstyle 0m 21s branch-2 passed
        +1 mvnsite 0m 45s branch-2 passed
        +1 findbugs 0m 33s branch-2 passed
        +1 javadoc 0m 16s branch-2 passed with JDK v1.8.0_144
        +1 javadoc 0m 16s branch-2 passed with JDK v1.7.0_131
              Patch Compile Tests
        +1 mvninstall 0m 21s the patch passed
        +1 compile 0m 17s the patch passed with JDK v1.8.0_144
        +1 javac 0m 17s the patch passed
        +1 compile 0m 17s the patch passed with JDK v1.7.0_131
        +1 javac 0m 17s the patch passed
        -0 checkstyle 0m 18s hadoop-hdfs-project/hadoop-hdfs-httpfs: The patch generated 38 new + 501 unchanged - 2 fixed = 539 total (was 503)
        +1 mvnsite 0m 39s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 0m 40s the patch passed
        +1 javadoc 0m 11s the patch passed with JDK v1.8.0_144
        +1 javadoc 0m 13s the patch passed with JDK v1.7.0_131
              Other Tests
        +1 unit 3m 47s hadoop-hdfs-httpfs in the patch passed with JDK v1.7.0_131.
        +1 asflicense 0m 17s The patch does not generate ASF License warnings.
        35m 36s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:5e40efe
        JIRA Issue HDFS-12117
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12881991/HDFS-12117-branch-2.001.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 00f94e0439fc 3.13.0-116-generic #163-Ubuntu SMP Fri Mar 31 14:13:22 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision branch-2 / b30522c
        Default Java 1.7.0_131
        Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_144 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_131
        findbugs v3.0.0
        checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/20708/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs-httpfs.txt
        JDK v1.7.0_131 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/20708/testReport/
        modules C: hadoop-hdfs-project/hadoop-hdfs-httpfs U: hadoop-hdfs-project/hadoop-hdfs-httpfs
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/20708/console
        Powered by Apache Yetus 0.6.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 reexec 13m 17s Docker mode activated.       Prechecks +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 2 new or modified test files.       branch-2 Compile Tests +1 mvninstall 7m 0s branch-2 passed +1 compile 0m 18s branch-2 passed with JDK v1.8.0_144 +1 compile 0m 19s branch-2 passed with JDK v1.7.0_131 +1 checkstyle 0m 21s branch-2 passed +1 mvnsite 0m 45s branch-2 passed +1 findbugs 0m 33s branch-2 passed +1 javadoc 0m 16s branch-2 passed with JDK v1.8.0_144 +1 javadoc 0m 16s branch-2 passed with JDK v1.7.0_131       Patch Compile Tests +1 mvninstall 0m 21s the patch passed +1 compile 0m 17s the patch passed with JDK v1.8.0_144 +1 javac 0m 17s the patch passed +1 compile 0m 17s the patch passed with JDK v1.7.0_131 +1 javac 0m 17s the patch passed -0 checkstyle 0m 18s hadoop-hdfs-project/hadoop-hdfs-httpfs: The patch generated 38 new + 501 unchanged - 2 fixed = 539 total (was 503) +1 mvnsite 0m 39s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 0m 40s the patch passed +1 javadoc 0m 11s the patch passed with JDK v1.8.0_144 +1 javadoc 0m 13s the patch passed with JDK v1.7.0_131       Other Tests +1 unit 3m 47s hadoop-hdfs-httpfs in the patch passed with JDK v1.7.0_131. +1 asflicense 0m 17s The patch does not generate ASF License warnings. 35m 36s Subsystem Report/Notes Docker Image:yetus/hadoop:5e40efe JIRA Issue HDFS-12117 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12881991/HDFS-12117-branch-2.001.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 00f94e0439fc 3.13.0-116-generic #163-Ubuntu SMP Fri Mar 31 14:13:22 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision branch-2 / b30522c Default Java 1.7.0_131 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_144 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_131 findbugs v3.0.0 checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/20708/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs-httpfs.txt JDK v1.7.0_131 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/20708/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs-httpfs U: hadoop-hdfs-project/hadoop-hdfs-httpfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/20708/console Powered by Apache Yetus 0.6.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        wchevreuil Wellington Chevreuil added a comment -

        Nevermind, I had just applied my commit into branch-2 head, resolved the conflicts.

        Uploading HDFS-12117-branch-2.001.patch with these changes on top of branch-2.

        Show
        wchevreuil Wellington Chevreuil added a comment - Nevermind, I had just applied my commit into branch-2 head, resolved the conflicts. Uploading HDFS-12117 -branch-2.001.patch with these changes on top of branch-2.
        Hide
        wchevreuil Wellington Chevreuil added a comment - - edited

        HDFS-12052 seems to depend on HDFS-10860, which in turn depends on HADOOP-13597, which depends on HADOOP-9902. None of these are in branch-2 yet.

        id date author message
        69b23632c48297ac844c58fd3e21aad10c093cc8 Mon Feb 6 13:33:32 2017 Xiao Chen HDFS-10860. Switch HttpFS from Tomcat to Jetty. Contributed by John Zhuge.
        5d182949badb2eb80393de7ba3838102d006488b Thu Jan 5 17:21:57 2017 Xiao Chen HADOOP-13597. Switch KMS from Tomcat to Jetty. Contributed by John Zhuge.
        31467453ec453f5df0ae29b5296c96d2514f2751 Tue Aug 19 12:11:17 2014 Allen Wittenauer HADOOP-9902. Shell script rewrite (aw)
        Show
        wchevreuil Wellington Chevreuil added a comment - - edited HDFS-12052 seems to depend on HDFS-10860 , which in turn depends on HADOOP-13597 , which depends on HADOOP-9902 . None of these are in branch-2 yet. id date author message 69b23632c48297ac844c58fd3e21aad10c093cc8 Mon Feb 6 13:33:32 2017 Xiao Chen HDFS-10860 . Switch HttpFS from Tomcat to Jetty. Contributed by John Zhuge. 5d182949badb2eb80393de7ba3838102d006488b Thu Jan 5 17:21:57 2017 Xiao Chen HADOOP-13597 . Switch KMS from Tomcat to Jetty. Contributed by John Zhuge. 31467453ec453f5df0ae29b5296c96d2514f2751 Tue Aug 19 12:11:17 2014 Allen Wittenauer HADOOP-9902 . Shell script rewrite (aw)
        Hide
        wchevreuil Wellington Chevreuil added a comment -

        Thanks Wei-Chiu Chuang! It seems my commit is depending on commit below, which has not been applied yet on branch-2:

        id date author message
        12c8fdceaf263425661169cba25402df89d444c1 2017-07-11 19:19 John Zhuge HDFS-12052. Set SWEBHDFS delegation token kind when ssl is enabled in HttpFS. Contributed by Zoran Dimitrijevic.

        Should I cherry pick this one, together with mine into branch-2?

        Show
        wchevreuil Wellington Chevreuil added a comment - Thanks Wei-Chiu Chuang ! It seems my commit is depending on commit below, which has not been applied yet on branch-2: id date author message 12c8fdceaf263425661169cba25402df89d444c1 2017-07-11 19:19 John Zhuge HDFS-12052 . Set SWEBHDFS delegation token kind when ssl is enabled in HttpFS. Contributed by Zoran Dimitrijevic. Should I cherry pick this one, together with mine into branch-2?
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #12151 (See https://builds.apache.org/job/Hadoop-trunk-Commit/12151/)
        HDFS-12117. HttpFS does not seem to support SNAPSHOT related methods for (weichiu: rev 8a4bff02c1534c6bf529726f2bbe414ac4c172e8)

        • (edit) hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/HttpFSServer.java
        • (edit) hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/HttpFSParametersProvider.java
        • (edit) hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/fs/http/client/BaseTestHttpFSWith.java
        • (edit) hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/client/HttpFSFileSystem.java
        • (edit) hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/fs/http/server/TestHttpFSServer.java
        • (edit) hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/FSOperations.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #12151 (See https://builds.apache.org/job/Hadoop-trunk-Commit/12151/ ) HDFS-12117 . HttpFS does not seem to support SNAPSHOT related methods for (weichiu: rev 8a4bff02c1534c6bf529726f2bbe414ac4c172e8) (edit) hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/HttpFSServer.java (edit) hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/HttpFSParametersProvider.java (edit) hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/fs/http/client/BaseTestHttpFSWith.java (edit) hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/client/HttpFSFileSystem.java (edit) hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/fs/http/server/TestHttpFSServer.java (edit) hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/FSOperations.java
        Hide
        jojochuang Wei-Chiu Chuang added a comment -

        Committed rev 006 patch to trunk. There are some conflicts in branch-2 cherrypick. Would you please make a branch-2 patch? Thanks a lot Wellington Chevreuil!

        Show
        jojochuang Wei-Chiu Chuang added a comment - Committed rev 006 patch to trunk. There are some conflicts in branch-2 cherrypick. Would you please make a branch-2 patch? Thanks a lot Wellington Chevreuil !
        Hide
        jojochuang Wei-Chiu Chuang added a comment -

        +1 the test looks good to me too. Thanks Wellington Chevreuil!

        Show
        jojochuang Wei-Chiu Chuang added a comment - +1 the test looks good to me too. Thanks Wellington Chevreuil !
        Hide
        jojochuang Wei-Chiu Chuang added a comment -

        Had a quick review and looks good to me.
        I'll take another look later today. Thanks!

        Show
        jojochuang Wei-Chiu Chuang added a comment - Had a quick review and looks good to me. I'll take another look later today. Thanks!
        Hide
        hadoopqa Hadoop QA added a comment -
        +1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 17s Docker mode activated.
              Prechecks
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 2 new or modified test files.
              trunk Compile Tests
        +1 mvninstall 15m 50s trunk passed
        +1 compile 0m 22s trunk passed
        +1 checkstyle 0m 19s trunk passed
        +1 mvnsite 1m 14s trunk passed
        +1 findbugs 0m 27s trunk passed
        +1 javadoc 0m 16s trunk passed
              Patch Compile Tests
        +1 mvninstall 0m 22s the patch passed
        +1 compile 0m 19s the patch passed
        +1 javac 0m 19s the patch passed
        -0 checkstyle 0m 18s hadoop-hdfs-project/hadoop-hdfs-httpfs: The patch generated 28 new + 409 unchanged - 0 fixed = 437 total (was 409)
        +1 mvnsite 1m 12s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 0m 34s the patch passed
        +1 javadoc 0m 13s the patch passed
              Other Tests
        +1 unit 4m 7s hadoop-hdfs-httpfs in the patch passed.
        +1 asflicense 0m 14s The patch does not generate ASF License warnings.
        27m 24s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:14b5c93
        JIRA Issue HDFS-12117
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12879704/HDFS-12117.006.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 2b866646a431 3.13.0-117-generic #164-Ubuntu SMP Fri Apr 7 11:05:26 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 3e23415
        Default Java 1.8.0_131
        findbugs v3.1.0-RC1
        checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/20505/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs-httpfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/20505/testReport/
        modules C: hadoop-hdfs-project/hadoop-hdfs-httpfs U: hadoop-hdfs-project/hadoop-hdfs-httpfs
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/20505/console
        Powered by Apache Yetus 0.6.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 reexec 0m 17s Docker mode activated.       Prechecks +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 2 new or modified test files.       trunk Compile Tests +1 mvninstall 15m 50s trunk passed +1 compile 0m 22s trunk passed +1 checkstyle 0m 19s trunk passed +1 mvnsite 1m 14s trunk passed +1 findbugs 0m 27s trunk passed +1 javadoc 0m 16s trunk passed       Patch Compile Tests +1 mvninstall 0m 22s the patch passed +1 compile 0m 19s the patch passed +1 javac 0m 19s the patch passed -0 checkstyle 0m 18s hadoop-hdfs-project/hadoop-hdfs-httpfs: The patch generated 28 new + 409 unchanged - 0 fixed = 437 total (was 409) +1 mvnsite 1m 12s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 0m 34s the patch passed +1 javadoc 0m 13s the patch passed       Other Tests +1 unit 4m 7s hadoop-hdfs-httpfs in the patch passed. +1 asflicense 0m 14s The patch does not generate ASF License warnings. 27m 24s Subsystem Report/Notes Docker Image:yetus/hadoop:14b5c93 JIRA Issue HDFS-12117 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12879704/HDFS-12117.006.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 2b866646a431 3.13.0-117-generic #164-Ubuntu SMP Fri Apr 7 11:05:26 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 3e23415 Default Java 1.8.0_131 findbugs v3.1.0-RC1 checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/20505/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs-httpfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/20505/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs-httpfs U: hadoop-hdfs-project/hadoop-hdfs-httpfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/20505/console Powered by Apache Yetus 0.6.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        wchevreuil Wellington Chevreuil added a comment - - edited

        Thanks for the suggestions Wei-Chiu Chuang! Attaching a new patch with the Client side tests added as suggested.

        While implementing these, I noticed that LocalFileSystem currently has no support for snapshot related methods. I'm not sure if that's intended to be that way, but I guess it does not make much sense add this feature for LocalFileSystem, as it's mostly a testing/dev file system option.

        TestHttpFSFileSystemLocalFileSystem would fail when trying to run snapshot related methods defined on BaseTestHttpFSWith, so for now, these tests would only really run if FileSystem implementation is different from LocalFileSystem.

        For example, rename snapshot test:

          private void testRenameSnapshot() throws Exception {
            if (!this.isLocalFS()) {
              Path snapshottablePath = new Path("/tmp/tmp-snap-test");
              createSnapshotTestsPreconditions(snapshottablePath);
              //Now get the FileSystem instance that's being tested
              FileSystem fs = this.getHttpFSFileSystem();
              fs.createSnapshot(snapshottablePath, "snap-to-rename");
              fs.renameSnapshot(snapshottablePath, "snap-to-rename",
                  "snap-new-name");
              Path snapshotsDir = new Path("/tmp/tmp-snap-test/.snapshot");
              FileStatus[] snapshotItems = fs.listStatus(snapshotsDir);
              assertTrue("Should have exactly one snapshot.",
                  snapshotItems.length == 1);
              String resultingSnapName = snapshotItems[0].getPath().getName();
              assertTrue("Snapshot name is not same as passed name.",
                  "snap-new-name".equals(resultingSnapName));
              cleanSnapshotTests(snapshottablePath, resultingSnapName);
            }
          }
        
        Show
        wchevreuil Wellington Chevreuil added a comment - - edited Thanks for the suggestions Wei-Chiu Chuang ! Attaching a new patch with the Client side tests added as suggested. While implementing these, I noticed that LocalFileSystem currently has no support for snapshot related methods. I'm not sure if that's intended to be that way, but I guess it does not make much sense add this feature for LocalFileSystem , as it's mostly a testing/dev file system option. TestHttpFSFileSystemLocalFileSystem would fail when trying to run snapshot related methods defined on BaseTestHttpFSWith , so for now, these tests would only really run if FileSystem implementation is different from LocalFileSystem . For example, rename snapshot test: private void testRenameSnapshot() throws Exception { if (!this.isLocalFS()) { Path snapshottablePath = new Path("/tmp/tmp-snap-test"); createSnapshotTestsPreconditions(snapshottablePath); //Now get the FileSystem instance that's being tested FileSystem fs = this.getHttpFSFileSystem(); fs.createSnapshot(snapshottablePath, "snap-to-rename"); fs.renameSnapshot(snapshottablePath, "snap-to-rename", "snap-new-name"); Path snapshotsDir = new Path("/tmp/tmp-snap-test/.snapshot"); FileStatus[] snapshotItems = fs.listStatus(snapshotsDir); assertTrue("Should have exactly one snapshot.", snapshotItems.length == 1); String resultingSnapName = snapshotItems[0].getPath().getName(); assertTrue("Snapshot name is not same as passed name.", "snap-new-name".equals(resultingSnapName)); cleanSnapshotTests(snapshottablePath, resultingSnapName); } }
        Hide
        jojochuang Wei-Chiu Chuang added a comment -

        Thanks for the patch! Wellington Chevreuil
        Overall the patch looks good to me. One comment regarding tests:

        Looks like the patch added httpfs server side tests. I'd like to see httpfs client side tests as well. Specifically, you can add tests in BaseTestHttpFSWith, which will be executed by TestHttpFSFWithSWebhdfsFileSystem, TestHttpFSWithHttpFSFileSystem, TestHttpFSFWithWebhdfsFileSystem, TestHttpFSFileSystemLocalFileSystem, and can ensure the client works with these server side implementations.

        Show
        jojochuang Wei-Chiu Chuang added a comment - Thanks for the patch! Wellington Chevreuil Overall the patch looks good to me. One comment regarding tests: Looks like the patch added httpfs server side tests. I'd like to see httpfs client side tests as well. Specifically, you can add tests in BaseTestHttpFSWith , which will be executed by TestHttpFSFWithSWebhdfsFileSystem, TestHttpFSWithHttpFSFileSystem, TestHttpFSFWithWebhdfsFileSystem, TestHttpFSFileSystemLocalFileSystem, and can ensure the client works with these server side implementations.
        Hide
        wchevreuil Wellington Chevreuil added a comment -

        Reviewed the failed junit test, I don't think it's related, as it touched different parts of the code and it's passing on my local build:

        java.lang.AssertionError: array lengths differed, expected.length=2 actual.length=3
        	at org.junit.Assert.fail(Assert.java:88)
        	at org.junit.internal.ComparisonCriteria.assertArraysAreSameLength(ComparisonCriteria.java:71)
        	at org.junit.internal.ComparisonCriteria.arrayEquals(ComparisonCriteria.java:32)
        	at org.junit.Assert.internalArrayEquals(Assert.java:473)
        	at org.junit.Assert.assertArrayEquals(Assert.java:265)
        	at org.junit.Assert.assertArrayEquals(Assert.java:280)
        	at org.apache.hadoop.fs.http.client.BaseTestHttpFSWith.verifyBlockLocations(BaseTestHttpFSWith.java:1229)
        	at org.apache.hadoop.fs.http.client.BaseTestHttpFSWith.testGetFileBlockLocations(BaseTestHttpFSWith.java:1208)
        	at org.apache.hadoop.fs.http.client.BaseTestHttpFSWith.operation(BaseTestHttpFSWith.java:1106)
        	at org.apache.hadoop.fs.http.client.BaseTestHttpFSWith.testOperation(BaseTestHttpFSWith.java:1134)
        
        Show
        wchevreuil Wellington Chevreuil added a comment - Reviewed the failed junit test, I don't think it's related, as it touched different parts of the code and it's passing on my local build: java.lang.AssertionError: array lengths differed, expected.length=2 actual.length=3 at org.junit.Assert.fail(Assert.java:88) at org.junit.internal.ComparisonCriteria.assertArraysAreSameLength(ComparisonCriteria.java:71) at org.junit.internal.ComparisonCriteria.arrayEquals(ComparisonCriteria.java:32) at org.junit.Assert.internalArrayEquals(Assert.java:473) at org.junit.Assert.assertArrayEquals(Assert.java:265) at org.junit.Assert.assertArrayEquals(Assert.java:280) at org.apache.hadoop.fs.http.client.BaseTestHttpFSWith.verifyBlockLocations(BaseTestHttpFSWith.java:1229) at org.apache.hadoop.fs.http.client.BaseTestHttpFSWith.testGetFileBlockLocations(BaseTestHttpFSWith.java:1208) at org.apache.hadoop.fs.http.client.BaseTestHttpFSWith.operation(BaseTestHttpFSWith.java:1106) at org.apache.hadoop.fs.http.client.BaseTestHttpFSWith.testOperation(BaseTestHttpFSWith.java:1134)
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 3m 15s Docker mode activated.
              Prechecks
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
              trunk Compile Tests
        +1 mvninstall 13m 48s trunk passed
        +1 compile 0m 20s trunk passed
        +1 checkstyle 0m 25s trunk passed
        +1 mvnsite 2m 39s trunk passed
        +1 findbugs 0m 33s trunk passed
        +1 javadoc 0m 16s trunk passed
              Patch Compile Tests
        +1 mvninstall 0m 20s the patch passed
        +1 compile 0m 18s the patch passed
        +1 javac 0m 18s the patch passed
        -0 checkstyle 0m 18s hadoop-hdfs-project/hadoop-hdfs-httpfs: The patch generated 30 new + 427 unchanged - 2 fixed = 457 total (was 429)
        +1 mvnsite 2m 29s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 0m 36s the patch passed
        +1 javadoc 0m 13s the patch passed
              Other Tests
        -1 unit 4m 43s hadoop-hdfs-httpfs in the patch failed.
        +1 asflicense 0m 18s The patch does not generate ASF License warnings.
        31m 59s



        Reason Tests
        Failed junit tests hadoop.fs.http.client.TestHttpFSFWithSWebhdfsFileSystem



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:14b5c93
        JIRA Issue HDFS-12117
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12877867/HDFS-12117.005.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 7b0b5123df5d 3.13.0-116-generic #163-Ubuntu SMP Fri Mar 31 14:13:22 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / f5f14a2
        Default Java 1.8.0_131
        findbugs v3.1.0-RC1
        checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/20329/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs-httpfs.txt
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/20329/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-httpfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/20329/testReport/
        modules C: hadoop-hdfs-project/hadoop-hdfs-httpfs U: hadoop-hdfs-project/hadoop-hdfs-httpfs
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/20329/console
        Powered by Apache Yetus 0.6.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 3m 15s Docker mode activated.       Prechecks +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.       trunk Compile Tests +1 mvninstall 13m 48s trunk passed +1 compile 0m 20s trunk passed +1 checkstyle 0m 25s trunk passed +1 mvnsite 2m 39s trunk passed +1 findbugs 0m 33s trunk passed +1 javadoc 0m 16s trunk passed       Patch Compile Tests +1 mvninstall 0m 20s the patch passed +1 compile 0m 18s the patch passed +1 javac 0m 18s the patch passed -0 checkstyle 0m 18s hadoop-hdfs-project/hadoop-hdfs-httpfs: The patch generated 30 new + 427 unchanged - 2 fixed = 457 total (was 429) +1 mvnsite 2m 29s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 0m 36s the patch passed +1 javadoc 0m 13s the patch passed       Other Tests -1 unit 4m 43s hadoop-hdfs-httpfs in the patch failed. +1 asflicense 0m 18s The patch does not generate ASF License warnings. 31m 59s Reason Tests Failed junit tests hadoop.fs.http.client.TestHttpFSFWithSWebhdfsFileSystem Subsystem Report/Notes Docker Image:yetus/hadoop:14b5c93 JIRA Issue HDFS-12117 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12877867/HDFS-12117.005.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 7b0b5123df5d 3.13.0-116-generic #163-Ubuntu SMP Fri Mar 31 14:13:22 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / f5f14a2 Default Java 1.8.0_131 findbugs v3.1.0-RC1 checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/20329/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs-httpfs.txt unit https://builds.apache.org/job/PreCommit-HDFS-Build/20329/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-httpfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/20329/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs-httpfs U: hadoop-hdfs-project/hadoop-hdfs-httpfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/20329/console Powered by Apache Yetus 0.6.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        wchevreuil Wellington Chevreuil added a comment - - edited

        Tried rebase.

        Show
        wchevreuil Wellington Chevreuil added a comment - - edited Tried rebase.
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 0s Docker mode activated.
        -1 patch 0m 4s HDFS-12117 does not apply to trunk. Rebase required? Wrong Branch? See https://wiki.apache.org/hadoop/HowToContribute for help.



        Subsystem Report/Notes
        JIRA Issue HDFS-12117
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12877670/HDFS-12117.004.patch
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/20314/console
        Powered by Apache Yetus 0.6.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 0s Docker mode activated. -1 patch 0m 4s HDFS-12117 does not apply to trunk. Rebase required? Wrong Branch? See https://wiki.apache.org/hadoop/HowToContribute for help. Subsystem Report/Notes JIRA Issue HDFS-12117 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12877670/HDFS-12117.004.patch Console output https://builds.apache.org/job/PreCommit-HDFS-Build/20314/console Powered by Apache Yetus 0.6.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        wchevreuil Wellington Chevreuil added a comment -

        Ok, previous patch was generated from my local branch. Attached new patch from local trunk.

        Show
        wchevreuil Wellington Chevreuil added a comment - Ok, previous patch was generated from my local branch. Attached new patch from local trunk.
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 0s Docker mode activated.
        -1 patch 0m 5s HDFS-12117 does not apply to trunk. Rebase required? Wrong Branch? See https://wiki.apache.org/hadoop/HowToContribute for help.



        Subsystem Report/Notes
        JIRA Issue HDFS-12117
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12877483/HDFS-12117.003.patch
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/20297/console
        Powered by Apache Yetus 0.6.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 0s Docker mode activated. -1 patch 0m 5s HDFS-12117 does not apply to trunk. Rebase required? Wrong Branch? See https://wiki.apache.org/hadoop/HowToContribute for help. Subsystem Report/Notes JIRA Issue HDFS-12117 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12877483/HDFS-12117.003.patch Console output https://builds.apache.org/job/PreCommit-HDFS-Build/20297/console Powered by Apache Yetus 0.6.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        wchevreuil Wellington Chevreuil added a comment -

        Renamed the patch.

        Show
        wchevreuil Wellington Chevreuil added a comment - Renamed the patch.
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 0s Docker mode activated.
        0 patch 0m 2s The patch file was not named according to hadoop's naming conventions. Please see https://wiki.apache.org/hadoop/HowToContribute for instructions.
        -1 patch 0m 5s HDFS-12117 does not apply to trunk. Rebase required? Wrong Branch? See https://wiki.apache.org/hadoop/HowToContribute for help.



        Subsystem Report/Notes
        JIRA Issue HDFS-12117
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12877460/HDFS-12117.patch.02
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/20295/console
        Powered by Apache Yetus 0.6.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 0s Docker mode activated. 0 patch 0m 2s The patch file was not named according to hadoop's naming conventions. Please see https://wiki.apache.org/hadoop/HowToContribute for instructions. -1 patch 0m 5s HDFS-12117 does not apply to trunk. Rebase required? Wrong Branch? See https://wiki.apache.org/hadoop/HowToContribute for help. Subsystem Report/Notes JIRA Issue HDFS-12117 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12877460/HDFS-12117.patch.02 Console output https://builds.apache.org/job/PreCommit-HDFS-Build/20295/console Powered by Apache Yetus 0.6.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        wchevreuil Wellington Chevreuil added a comment -

        Adding a second version, with tests and chekstyle issues addressed.

        Show
        wchevreuil Wellington Chevreuil added a comment - Adding a second version, with tests and chekstyle issues addressed.
        Hide
        wchevreuil Wellington Chevreuil added a comment -

        Initial patch version for review only. Still need to work on tests for the added functions. Will be providing another patch later with tests added.

        Please let me know on any suggestions/improvements you may have.

        Regards,
        Wellington.

        Show
        wchevreuil Wellington Chevreuil added a comment - Initial patch version for review only. Still need to work on tests for the added functions. Will be providing another patch later with tests added. Please let me know on any suggestions/improvements you may have. Regards, Wellington.

          People

          • Assignee:
            wchevreuil Wellington Chevreuil
            Reporter:
            wchevreuil Wellington Chevreuil
          • Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development