Author: rangadi
Date: Fri Jan 16 15:55:37 2009
New Revision: 735183
URL: http://svn.apache.org/viewvc?rev=735183&view=rev
Log:
HADOOP-4997. Revert tmp files handling on DataNodes back to 0.17.\nsync()
introduced in 0.18 has less gaurantees (Raghu Angadi).
Modified:
hadoop/core/branches/branch-0.18/CHANGES.txt
hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSDataset.java
hadoop/core/branches/branch-0.18/src/test/org/apache/hadoop/dfs/TestFileCreationDelete.java
hadoop/core/branches/branch-0.18/src/test/org/apache/hadoop/dfs/TestRenameWhileOpen.java
Modified: hadoop/core/branches/branch-0.18/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/CHANGES.txt?rev=735183&r1=735182&r2=735183&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.18/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.18/CHANGES.txt Fri Jan 16 15:55:37 2009
@@ -136,6 +136,9 @@
HADOOP-4910. NameNode should exclude replicas when choosing excessive
replicas to delete to avoid data lose. (hairong)
+ HADOOP-4997. Revert tmp files handling on DataNodes back to 0.17.
+ sync() introduced in 0.18 has less gaurantees (Raghu Angadi).
+
Release 0.18.2 - 2008-11-03
BUG FIXES
Modified:
hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSDataset.java
URL:
http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSDataset.java?rev=735183&r1=735182&r2=735183&view=diff
==============================================================================
---
hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSDataset.java
(original)
+++
hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSDataset.java
Fri Jan 16 15:55:37 2009
@@ -300,14 +300,11 @@
recoverDetachedBlocks(currentDir, detachDir);
}
- // Files that were being written when the datanode was last shutdown
- // are now moved back to the data directory. It is possible that
- // in the future, we might want to do some sort of datanode-local
- // recovery for these blocks. For example, crc validation.
+ // Delete all temporary blocks in the tmp diectory
//
this.tmpDir = new File(parent, "tmp");
if (tmpDir.exists()) {
- recoverDetachedBlocks(currentDir, tmpDir);
+ FileUtil.fullyDelete(tmpDir);
}
this.dataDir = new FSDir(currentDir);
if (!tmpDir.mkdirs()) {
Modified:
hadoop/core/branches/branch-0.18/src/test/org/apache/hadoop/dfs/TestFileCreationDelete.java
URL:
http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/src/test/org/apache/hadoop/dfs/TestFileCreationDelete.java?rev=735183&r1=735182&r2=735183&view=diff
==============================================================================
---
hadoop/core/branches/branch-0.18/src/test/org/apache/hadoop/dfs/TestFileCreationDelete.java
(original)
+++
hadoop/core/branches/branch-0.18/src/test/org/apache/hadoop/dfs/TestFileCreationDelete.java
Fri Jan 16 15:55:37 2009
@@ -34,6 +34,9 @@
}
public void testFileCreationDeleteParent() throws IOException {
+ /* XXX This test is temporarily disabled since sync() is not supported in
+ * 0.18.3. This is a 0.18.3 only change. */
+ if (true) return;
Configuration conf = new Configuration();
final int MAX_IDLE_TIME = 2000; // 2s
conf.setInt("ipc.client.connection.maxidletime", MAX_IDLE_TIME);
Modified:
hadoop/core/branches/branch-0.18/src/test/org/apache/hadoop/dfs/TestRenameWhileOpen.java
URL:
http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/src/test/org/apache/hadoop/dfs/TestRenameWhileOpen.java?rev=735183&r1=735182&r2=735183&view=diff
==============================================================================
---
hadoop/core/branches/branch-0.18/src/test/org/apache/hadoop/dfs/TestRenameWhileOpen.java
(original)
+++
hadoop/core/branches/branch-0.18/src/test/org/apache/hadoop/dfs/TestRenameWhileOpen.java
Fri Jan 16 15:55:37 2009
@@ -92,6 +92,9 @@
* move /user/dir1 /user/dir3
*/
public void testWhileOpenRenameParent() throws IOException {
+ /* XXX This test is temporarily disabled since sync() is not supported in
+ * 0.18.3. This is a 0.18.3 only change. */
+ if (true) return;
Configuration conf = new Configuration();
final int MAX_IDLE_TIME = 2000; // 2s
conf.setInt("ipc.client.connection.maxidletime", MAX_IDLE_TIME);
@@ -164,6 +167,9 @@
* move /user/dir1 /user/dir3
*/
public void testWhileOpenRenameParentToNonexistentDir() throws IOException {
+ /* XXX This test is temporarily disabled since sync() is not supported in
+ * 0.18.3. This is a 0.18.3 only change. */
+ if (true) return;
Configuration conf = new Configuration();
final int MAX_IDLE_TIME = 2000; // 2s
conf.setInt("ipc.client.connection.maxidletime", MAX_IDLE_TIME);
@@ -236,6 +242,9 @@
* move /user/dir1/file1 /user/dir2/
*/
public void testWhileOpenRenameToExistentDirectory() throws IOException {
+ /* XXX This test is temporarily disabled since sync() is not supported in
+ * 0.18.3. This is a 0.18.3 only change. */
+ if (true) return;
Configuration conf = new Configuration();
final int MAX_IDLE_TIME = 2000; // 2s
conf.setInt("ipc.client.connection.maxidletime", MAX_IDLE_TIME);
@@ -298,6 +307,9 @@
* move /user/dir1/file1 /user/dir2/
*/
public void testWhileOpenRenameToNonExistentDirectory() throws IOException {
+ /* XXX This test is temporarily disabled since sync() is not supported in
+ * 0.18.3. This is a 0.18.3 only change. */
+ if (true) return;
Configuration conf = new Configuration();
final int MAX_IDLE_TIME = 2000; // 2s
conf.setInt("ipc.client.connection.maxidletime", MAX_IDLE_TIME);