hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r725448 - in /hadoop/core/branches/branch-0.19: CHANGES.txt src/hdfs/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java src/test/org/apache/hadoop/hdfs/TestRenameWhileOpen.java
Date Wed, 10 Dec 2008 21:39:28 GMT
Author: szetszwo
Date: Wed Dec 10 13:39:28 2008
New Revision: 725448

URL: http://svn.apache.org/viewvc?rev=725448&view=rev
Log:
HADOOP-4806. HDFS rename should not use src path as a regular expression. (szetszwo)

Modified:
    hadoop/core/branches/branch-0.19/CHANGES.txt
    hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java
    hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/hdfs/TestRenameWhileOpen.java

Modified: hadoop/core/branches/branch-0.19/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/CHANGES.txt?rev=725448&r1=725447&r2=725448&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.19/CHANGES.txt Wed Dec 10 13:39:28 2008
@@ -1078,6 +1078,9 @@
 
     HADOOP-4613. Fix block browsing on Web UI. (Johan Oskarsson via shv)
 
+    HADOOP-4806. HDFS rename should not use src path as a regular expression.
+    (szetszwo)
+
 Release 0.18.2 - 2008-11-03
 
   BUG FIXES

Modified: hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java?rev=725448&r1=725447&r2=725448&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java
(original)
+++ hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java
Wed Dec 10 13:39:28 2008
@@ -288,7 +288,8 @@
     for(Map.Entry<String, Lease> entry : findLeaseWithPrefixPath(src, sortedLeasesByPath))
{
       final String oldpath = entry.getKey();
       final Lease lease = entry.getValue();
-      final String newpath = oldpath.replaceFirst(overwrite, replaceBy);
+      final String newpath = oldpath.replaceFirst(
+          java.util.regex.Pattern.quote(overwrite), replaceBy);
       if (LOG.isDebugEnabled()) {
         LOG.debug("changeLease: replacing " + oldpath + " with " + newpath);
       }

Modified: hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/hdfs/TestRenameWhileOpen.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/hdfs/TestRenameWhileOpen.java?rev=725448&r1=725447&r2=725448&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/hdfs/TestRenameWhileOpen.java
(original)
+++ hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/hdfs/TestRenameWhileOpen.java
Wed Dec 10 13:39:28 2008
@@ -59,7 +59,7 @@
       final int nnport = cluster.getNameNodePort();
 
       // create file1.
-      Path dir1 = new Path("/user/dir1");
+      Path dir1 = new Path("/user/a+b/dir1");
       Path file1 = new Path(dir1, "file1");
       FSDataOutputStream stm1 = TestFileCreation.createFile(fs, file1, 1);
       System.out.println("testFileCreationDeleteParent: "



Mime
View raw message