Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7.0
    • Component/s: fs
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      We also need to expose truncate API via org.apache.hadoop.fs.FileContext.

      1. HADOOP-11510.003.patch
        12 kB
        Yi Liu
      2. HADOOP-11510.002.patch
        12 kB
        Yi Liu
      3. HADOOP-11510.001.patch
        7 kB
        Yi Liu

        Issue Links

          Activity

          Hide
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12694729/HADOOP-11510.001.patch
          against trunk revision 6f9fe76.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 1 new or modified test files.

          -1 javac. The patch appears to cause the build to fail.

          Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/5489//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12694729/HADOOP-11510.001.patch against trunk revision 6f9fe76. +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 1 new or modified test files. -1 javac . The patch appears to cause the build to fail. Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/5489//console This message is automatically generated.
          Hide
          hitliuyi Yi Liu added a comment -

          Seems the Jenkins broke, submit patch again to re-trigger new Jenkins.

          Show
          hitliuyi Yi Liu added a comment - Seems the Jenkins broke, submit patch again to re-trigger new Jenkins.
          Hide
          clamb Charles Lamb added a comment -

          Yi Liu,

          Looks good. One small nit. To be consistent in testTruncateThroughFileContext you could add a few more finals to the decls.

          Just out of curiosity, why 3 in newLength = fileLength/3?

          Show
          clamb Charles Lamb added a comment - Yi Liu , Looks good. One small nit. To be consistent in testTruncateThroughFileContext you could add a few more finals to the decls. Just out of curiosity, why 3 in newLength = fileLength/3?
          Hide
          hitliuyi Yi Liu added a comment -

          Re-trigger the Jenkins in back-end.

          Thanks Charles for review.

          To be consistent in testTruncateThroughFileContext you could add a few more finals to the decls.

          It's really not an issue, I think we don't need to care about that.

          Just out of curiosity, why 3 in newLength = fileLength/3?

          We can choose any length for test. I just use that one.

          Show
          hitliuyi Yi Liu added a comment - Re-trigger the Jenkins in back-end. Thanks Charles for review. To be consistent in testTruncateThroughFileContext you could add a few more finals to the decls. It's really not an issue, I think we don't need to care about that. Just out of curiosity, why 3 in newLength = fileLength/3? We can choose any length for test. I just use that one.
          Hide
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12694744/HADOOP-11510.001.patch
          against trunk revision ee1e06a.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 1 new or modified test files.

          -1 javac. The patch appears to cause the build to fail.

          Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/5511//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12694744/HADOOP-11510.001.patch against trunk revision ee1e06a. +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 1 new or modified test files. -1 javac . The patch appears to cause the build to fail. Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/5511//console This message is automatically generated.
          Hide
          hitliuyi Yi Liu added a comment -

          Fix the build failure.

          Show
          hitliuyi Yi Liu added a comment - Fix the build failure.
          Hide
          hadoopqa Hadoop QA added a comment -

          +1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12694930/HADOOP-11510.002.patch
          against trunk revision d12dd47.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 2 new or modified test files.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 javadoc. There were no new javadoc warning messages.

          +1 eclipse:eclipse. The patch built with eclipse:eclipse.

          +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 core tests. The patch passed unit tests in hadoop-common-project/hadoop-common hadoop-hdfs-project/hadoop-hdfs.

          Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/5514//testReport/
          Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/5514//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - +1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12694930/HADOOP-11510.002.patch against trunk revision d12dd47. +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 2 new or modified test files. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in hadoop-common-project/hadoop-common hadoop-hdfs-project/hadoop-hdfs. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/5514//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/5514//console This message is automatically generated.
          Hide
          shv Konstantin Shvachko added a comment -

          This looks good to me. One thing only: can we move testTruncateThroughFileContext() into TestHDFSFileContextMainOperations. Looks like a dedicated test for FileContext. It has its own routines for creating files via FC, which may simplify the truncate test a bit.

          Show
          shv Konstantin Shvachko added a comment - This looks good to me. One thing only: can we move testTruncateThroughFileContext() into TestHDFSFileContextMainOperations . Looks like a dedicated test for FileContext. It has its own routines for creating files via FC, which may simplify the truncate test a bit.
          Hide
          hitliuyi Yi Liu added a comment -

          can we move testTruncateThroughFileContext() into TestHDFSFileContextMainOperations. Looks like a dedicated test for FileContext

          Yes, Thanks Konstantin Shvachko. Actually I had this plan to do this later today, I also thought it's good to have the test in TestHDFSFileContextMainOperations and guessed you would have this comment

          Show
          hitliuyi Yi Liu added a comment - can we move testTruncateThroughFileContext() into TestHDFSFileContextMainOperations. Looks like a dedicated test for FileContext Yes, Thanks Konstantin Shvachko . Actually I had this plan to do this later today, I also thought it's good to have the test in TestHDFSFileContextMainOperations and guessed you would have this comment
          Hide
          hitliuyi Yi Liu added a comment -

          Update the patch, Konstantin Shvachko please take a look whether it addresses your comments, thanks.

          Show
          hitliuyi Yi Liu added a comment - Update the patch, Konstantin Shvachko please take a look whether it addresses your comments, thanks.
          Hide
          shv Konstantin Shvachko added a comment -

          +1 Looks good. Thanks.

          Show
          shv Konstantin Shvachko added a comment - +1 Looks good. Thanks.
          Hide
          hitliuyi Yi Liu added a comment -

          Committed to trunk and branch-2, thanks Konstantin Shvachko for review.

          Show
          hitliuyi Yi Liu added a comment - Committed to trunk and branch-2, thanks Konstantin Shvachko for review.
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-trunk-Commit #7056 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7056/)
          HADOOP-11510. Expose truncate API via FileContext. (yliu) (yliu: rev 1b56d1ce324165688d40c238858e1e19a1e60f7e)

          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestAfsCheckPath.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FilterFs.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/DelegateToFileSystem.java
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/fs/Hdfs.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ChRootedFs.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFs.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ChecksumFs.java
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #7056 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7056/ ) HADOOP-11510 . Expose truncate API via FileContext. (yliu) (yliu: rev 1b56d1ce324165688d40c238858e1e19a1e60f7e) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestAfsCheckPath.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FilterFs.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/DelegateToFileSystem.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/fs/Hdfs.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ChRootedFs.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFs.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ChecksumFs.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #100 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/100/)
          HADOOP-11510. Expose truncate API via FileContext. (yliu) (yliu: rev 1b56d1ce324165688d40c238858e1e19a1e60f7e)

          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FilterFs.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFs.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java
          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestAfsCheckPath.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/DelegateToFileSystem.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ChecksumFs.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/fs/Hdfs.java
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ChRootedFs.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #100 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/100/ ) HADOOP-11510 . Expose truncate API via FileContext. (yliu) (yliu: rev 1b56d1ce324165688d40c238858e1e19a1e60f7e) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FilterFs.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFs.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestAfsCheckPath.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/DelegateToFileSystem.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ChecksumFs.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/fs/Hdfs.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ChRootedFs.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk #834 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/834/)
          HADOOP-11510. Expose truncate API via FileContext. (yliu) (yliu: rev 1b56d1ce324165688d40c238858e1e19a1e60f7e)

          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFs.java
          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestAfsCheckPath.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ChecksumFs.java
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FilterFs.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ChRootedFs.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/DelegateToFileSystem.java
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/fs/Hdfs.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #834 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/834/ ) HADOOP-11510 . Expose truncate API via FileContext. (yliu) (yliu: rev 1b56d1ce324165688d40c238858e1e19a1e60f7e) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFs.java hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestAfsCheckPath.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ChecksumFs.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FilterFs.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ChRootedFs.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/DelegateToFileSystem.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/fs/Hdfs.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk #2032 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2032/)
          HADOOP-11510. Expose truncate API via FileContext. (yliu) (yliu: rev 1b56d1ce324165688d40c238858e1e19a1e60f7e)

          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestAfsCheckPath.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/DelegateToFileSystem.java
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/fs/Hdfs.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FilterFs.java
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFs.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ChecksumFs.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ChRootedFs.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2032 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2032/ ) HADOOP-11510 . Expose truncate API via FileContext. (yliu) (yliu: rev 1b56d1ce324165688d40c238858e1e19a1e60f7e) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestAfsCheckPath.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/DelegateToFileSystem.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/fs/Hdfs.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FilterFs.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFs.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ChecksumFs.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ChRootedFs.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #101 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/101/)
          HADOOP-11510. Expose truncate API via FileContext. (yliu) (yliu: rev 1b56d1ce324165688d40c238858e1e19a1e60f7e)

          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/fs/Hdfs.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ChRootedFs.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FilterFs.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ChecksumFs.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFs.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/DelegateToFileSystem.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java
          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestAfsCheckPath.java
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #101 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/101/ ) HADOOP-11510 . Expose truncate API via FileContext. (yliu) (yliu: rev 1b56d1ce324165688d40c238858e1e19a1e60f7e) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/fs/Hdfs.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ChRootedFs.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FilterFs.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ChecksumFs.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFs.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/DelegateToFileSystem.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestAfsCheckPath.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk #2051 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2051/)
          HADOOP-11510. Expose truncate API via FileContext. (yliu) (yliu: rev 1b56d1ce324165688d40c238858e1e19a1e60f7e)

          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/fs/Hdfs.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFs.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ChRootedFs.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ChecksumFs.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FilterFs.java
          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestAfsCheckPath.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/DelegateToFileSystem.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2051 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2051/ ) HADOOP-11510 . Expose truncate API via FileContext. (yliu) (yliu: rev 1b56d1ce324165688d40c238858e1e19a1e60f7e) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/fs/Hdfs.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFs.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ChRootedFs.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ChecksumFs.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FilterFs.java hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestAfsCheckPath.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/DelegateToFileSystem.java
          Hide
          cnauroth Chris Nauroth added a comment -

          I believe there is a backwards-compatibility problem in this patch. AbstractFileSystem#truncate was declared abstract. That means that external file system implementations that subclass AbstractFileSystem won't be able to compile anymore, because they don't override the abstract method. Traditionally, new file system operations are introduced with a base class implementation that throws UnsupportedOperationException to avoid this problem. I see this is how it was done for FileSystem#truncate, but not for AbstractFileSystem#truncate.

          Yi Liu, do you agree? If so, would you please file a new jira for a follow-up change? Feel free to notify me. I'd be happy to do the code review. Thanks!

          Show
          cnauroth Chris Nauroth added a comment - I believe there is a backwards-compatibility problem in this patch. AbstractFileSystem#truncate was declared abstract. That means that external file system implementations that subclass AbstractFileSystem won't be able to compile anymore, because they don't override the abstract method. Traditionally, new file system operations are introduced with a base class implementation that throws UnsupportedOperationException to avoid this problem. I see this is how it was done for FileSystem#truncate , but not for AbstractFileSystem#truncate . Yi Liu , do you agree? If so, would you please file a new jira for a follow-up change? Feel free to notify me. I'd be happy to do the code review. Thanks!
          Hide
          hitliuyi Yi Liu added a comment -

          You are right, Chris, thank you! I filed HADOOP-11595 and added you to the watcher list. Will fix it later.

          Show
          hitliuyi Yi Liu added a comment - You are right, Chris, thank you! I filed HADOOP-11595 and added you to the watcher list. Will fix it later.
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-Hdfs-trunk-Java8 #97 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/97/)
          HADOOP-11510. Expose truncate API via FileContext. (yliu) (yliu: rev 1b56d1ce324165688d40c238858e1e19a1e60f7e)

          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/DelegateToFileSystem.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ChRootedFs.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFs.java
          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestAfsCheckPath.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ChecksumFs.java
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/fs/Hdfs.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FilterFs.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Hdfs-trunk-Java8 #97 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/97/ ) HADOOP-11510 . Expose truncate API via FileContext. (yliu) (yliu: rev 1b56d1ce324165688d40c238858e1e19a1e60f7e) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/DelegateToFileSystem.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ChRootedFs.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFs.java hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestAfsCheckPath.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ChecksumFs.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/fs/Hdfs.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FilterFs.java

            People

            • Assignee:
              hitliuyi Yi Liu
              Reporter:
              hitliuyi Yi Liu
            • Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development