Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-12802

local FileContext does not rename .crc file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • 2.7.2, 3.0.0-alpha1
    • None
    • None
    • None

    Description

      After run the following code, "old" file is renamed to "new", but ".old.crc" is not renamed to ".new.crc"

      Path oldPath = new Path("/tmp/old");
      Path newPath = new Path("/tmp/new");
      
      Configuration conf = new Configuration();
      
      FileContext fc = FileContext.getLocalFSFileContext(conf);
      FSDataOutputStream out = fc.create(oldPath, EnumSet.of(CreateFlag.CREATE));
      out.close();
      
      fc.rename(oldPath, newPath);
      

      On the other hand, local FileSystem successfully renames .crc file.

      Path oldPath = new Path("/tmp/old");
      Path newPath = new Path("/tmp/new");
      
      Configuration conf = new Configuration();
      
      FileSystem fs = FileSystem.getLocal(conf);
      FSDataOutputStream out = fs.create(oldPath);
      out.close();
      
      fs.rename(oldPath, newPath);
      

      Attachments

        1. HADOOP-12802.01.patch
          5 kB
          Andras Bokor
        2. HADOOP-12802.02.patch
          3 kB
          Andras Bokor

        Issue Links

          Activity

            People

              boky01 Andras Bokor
              y0un5 Youngjoon Kim
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated: