public static void rename(FileSystem fs, String oldName, String newName)
    throws IOException {
    Path oldDir = new Path(oldName);
    Path newDir = new Path(newName);
    if (!fs.rename(oldDir, newDir)) {
      throw new IOException("Could not rename " + oldDir + " to " + newDir);
    }
  }
public static void rename ( FileSystem fs , String oldName , String newName ) throws IOException { Path oldDir = new Path ( oldName ) ; Path newDir = new Path ( newName ) ; if ( ! fs . rename ( oldDir , newDir ) ) { throw new IOException ( "Could not rename " + oldDir + " to " + newDir ) ; } }
Renames an existing map directory.