hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r725446 - in /hadoop/core/trunk: 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:36:19 GMT
Author: szetszwo
Date: Wed Dec 10 13:36:18 2008
New Revision: 725446

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

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java
    hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/TestRenameWhileOpen.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=725446&r1=725445&r2=725446&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Wed Dec 10 13:36:18 2008
@@ -1412,6 +1412,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/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java?rev=725446&r1=725445&r2=725446&view=diff
==============================================================================
--- hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java (original)
+++ hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java Wed
Dec 10 13:36:18 2008
@@ -284,7 +284,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/trunk/src/test/org/apache/hadoop/hdfs/TestRenameWhileOpen.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/TestRenameWhileOpen.java?rev=725446&r1=725445&r2=725446&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/TestRenameWhileOpen.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/TestRenameWhileOpen.java Wed Dec 10
13:36:18 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