Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-8699

Parameter to DistributedFileSystem#isFileClosed should be of type Path

VotersStop watchingWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.98.0, 0.95.2
    • wal
    • None
    • Reviewed

    Description

      Here is current code of FSHDFSUtils#isFileClosed():

        boolean isFileClosed(final DistributedFileSystem dfs, final Path p) {
          try {
            Method m = dfs.getClass().getMethod("isFileClosed", new Class<?>[] {String.class});
            return (Boolean) m.invoke(dfs, p.toString());
      

      We look for isFileClosed method with parameter type of String.

      However, from hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java (branch-2):

        public boolean isFileClosed(Path src) throws IOException {
      

      The parameter type is of Path.
      This means we would get NoSuchMethodException.

      Attachments

        1. 8699-v5.txt
          4 kB
          Ted Yu
        2. 8699-v5.txt
          4 kB
          Ted Yu
        3. 8699-v4.txt
          5 kB
          Ted Yu
        4. 8699-v3.txt
          5 kB
          Ted Yu
        5. 8699-v1.txt
          4 kB
          Ted Yu

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            yuzhihong@gmail.com Ted Yu
            yuzhihong@gmail.com Ted Yu
            Votes:
            0 Vote for this issue
            Watchers:
            6 Stop watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment