Issue Details (XML | Word | Printable)

Key: HADOOP-5224
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Unassigned
Reporter: Nigel Daley
Votes: 0
Watchers: 6
Operations

If you were logged in you would be able to see more operations.
Hadoop Common

Disable append

Created: 11/Feb/09 08:39 PM   Updated: 08/Jul/09 05:05 PM
Return to search
Component/s: None
Affects Version/s: 0.19.0
Fix Version/s: 0.19.1

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works disableAppend.patch 2009-02-17 03:09 PM dhruba borthakur 8 kB
Text File Licensed for inclusion in ASF works HADOOP-5224-libhdfs.patch 2009-02-19 07:10 PM Raghu Angadi 0.4 kB
Text File Licensed for inclusion in ASF works HADOOP-5224.patch 2009-02-13 08:20 PM Raghu Angadi 6 kB
Issue Links:
Reference
 

Hadoop Flags: Incompatible change, Reviewed
Release Note: HDFS append() is disabled. It throws UnsupportedOperationException.
Resolution Date: 18/Feb/09 05:42 AM


 Description  « Hide
As discussed on core-dev@ (http://www.nabble.com/Hadoop-0.19.1-td21739202.html) we will disable append API in Hadoop 0.19.1 by throwing UnsupportedOperationException from FileSystem.append(...) methods.

Does append in libhdfs (HADOOP-4494) need attention too?



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Nigel Daley made changes - 11/Feb/09 08:42 PM
Field Original Value New Value
Hadoop Flags [Incompatible change]
Jim Kellerman added a comment - 11/Feb/09 08:59 PM
Where does this leave HADOOP-4379?

The testing I have done to date indicates that sync() does, in fact, work. See HBASE-1155


Robert Chansler made changes - 12/Feb/09 11:34 PM
Assignee Raghu Angadi [ rangadi ]
Raghu Angadi added a comment - 13/Feb/09 12:29 AM
Jim,

btw, this is assigned to me just to provide a patch. The decision is not mine. I will let others reply to the above valid concern.


Robert Chansler added a comment - 13/Feb/09 01:51 AM
This particular item turns off append() at the interface without affecting the implementation or normal behavior of sync().
A related item, Hadoop-5225, disables some of the recovery code associated with sync in the case of data node failure.

The use of either of these facilities in 0.19.0 is dangerous to the integrity of the file system. The goal is to provide 0.19.1 with the same file system integrity as 0.18.3. Further development of append and sync recovery can then continue.


Raghu Angadi added a comment - 13/Feb/09 08:20 PM
patch for review. The only real change is that DistributedFileSystem.append() throws UnsupportedOperationException. Rest of the changes are for disabling tests that depend on HDFS append.

Raghu Angadi made changes - 13/Feb/09 08:20 PM
Attachment HADOOP-5224.patch [ 12400205 ]
Raghu Angadi added a comment - 13/Feb/09 09:54 PM
'ant test-contrib' passes as well.

Raghu Angadi made changes - 13/Feb/09 09:54 PM
Status Open [ 1 ] Patch Available [ 10002 ]
Raghu Angadi added a comment - 13/Feb/09 10:28 PM

'ant test-libhdfs' passes as well.

ant test-patch :

     [exec] +1 overall.
     [exec]
     [exec]     +1 @author.  The patch does not contain any @author tags.
     [exec]
     [exec]     +1 tests included.  The patch appears to include 9 new or modified tests.
     [exec]
     [exec]     +1 javadoc.  The javadoc tool did not generate any warning messages.
     [exec]
     [exec]     +1 javac.  The applied patch does not increase the total number of javac compiler warnings.
     [exec]
     [exec]     +1 findbugs.  The patch does not introduce any new Findbugs warnings.

Konstantin Shvachko added a comment - 13/Feb/09 10:52 PM
Looks like TestStickyBit uses append(). Something tells me it should have failed.

Raghu Angadi added a comment - 13/Feb/09 10:55 PM
correct. But TestStickyBit is not in 0.19.

Konstantin Shvachko added a comment - 13/Feb/09 11:06 PM
True. +1

Repository Revision Date User Message
ASF #744282 Fri Feb 13 23:30:25 UTC 2009 rangadi HADOOP-5224. HDFS append() is disabled. It throws
UnsupportedOperationException. committed only to 0.19.x (Raghu Angadi)
Files Changed
MODIFY /hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/DistributedFileSystem.java
MODIFY /hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/hdfs/TestQuota.java
MODIFY /hadoop/core/branches/branch-0.19/CHANGES.txt
MODIFY /hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/hdfs/TestFileAppend3.java
MODIFY /hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/hdfs/TestFileAppend2.java

Raghu Angadi added a comment - 13/Feb/09 11:55 PM
I just committed committed this to 0.19 (only).

Raghu Angadi made changes - 13/Feb/09 11:55 PM
Release Note HDFS append() is disabled. It throws UnsupportedOperationException.
Resolution Fixed [ 1 ]
Hadoop Flags [Incompatible change] [Incompatible change, Reviewed]
Status Patch Available [ 10002 ] Resolved [ 5 ]
dhruba borthakur added a comment - 14/Feb/09 05:37 AM
Hi folks, please pardon me for re-opening this issue. I am wondering if there is a better way to disable "appends" for 0.19.1 We coudld set the config parameter dfs.support.append to false in hadoop-defaults.xml. This means that a default installation of hadoop will not support "appends". However, for people that are testing their apps (not in production), it gives them an easy way to test their apps. There could be big-and-large warning message associated with the dfs.support.append parameter warning people to the fact that there could be data corruption if they set that flag to true.

I am re-opening this issue because I am not sure whether this approach was considered. If it was considered and was shot down, please let me know why and u can close this issue.


dhruba borthakur made changes - 14/Feb/09 05:37 AM
Status Resolved [ 5 ] Reopened [ 4 ]
Resolution Fixed [ 1 ]
dhruba borthakur added a comment - 14/Feb/09 05:40 AM
Making the config parameter dfs.support.append to "false" by default might allow Jim Kellerman to continue testing his Hbase code with 0.19.1 (till these get resolved in later releases).

Raghu Angadi added a comment - 14/Feb/09 05:02 PM
I think I shouldn't have been assigned this jira in the first place.

Raghu Angadi made changes - 14/Feb/09 05:02 PM
Assignee Raghu Angadi [ rangadi ]
dhruba borthakur added a comment - 17/Feb/09 03:09 PM
Hi Raghu, I uploaded a patch where the only change is to set "dfs.support.append" to false. Does this look ok to you?

dhruba borthakur made changes - 17/Feb/09 03:09 PM
Attachment disableAppend.patch [ 12400336 ]
Nigel Daley added a comment - 18/Feb/09 05:01 AM

Hi folks, please pardon me for re-opening this issue. I am wondering if there is a better way to disable "appends" for 0.19.1 We coudld set the config parameter dfs.support.append to false in hadoop-defaults.xml. This means that a default installation of hadoop will not support "appends". However, for people that are testing their apps (not in production), it gives them an easy way to test their apps.

Dhruba, folks who want to test with append can use 0.19.0.

There could be big-and-large warning message associated with the dfs.support.append parameter warning people to the fact that there could be data corruption if they set that flag to true.

The uploaded patch creates a dfs.support.append config entry but doesn't seem to use it in the append method to affect it's behavior. What am I missing?

I am re-opening this issue because I am not sure whether this approach was considered. If it was considered and was shot down, please let me know why and u can close this issue.

I think this should be a new Jira that could be fixed in 0.19.2. If you agree, please close this and open a new Jira.


dhruba borthakur added a comment - 18/Feb/09 05:42 AM
Nigel, thanks for the suggestion. I am closing this one.

dhruba borthakur made changes - 18/Feb/09 05:42 AM
Resolution Fixed [ 1 ]
Status Reopened [ 4 ] Resolved [ 5 ]
Hadoop Flags [Reviewed, Incompatible change] [Incompatible change, Reviewed]
Raghu Angadi added a comment - 18/Feb/09 10:30 PM
> 'ant test-libhdfs' passes as well.

my bad. I had reverted the patch by mistake before running 'ant test-libhdfs'. So the patch I attached is incomplete since it does not remove the libhdfs append test. Please disregard it.


Raghu Angadi added a comment - 19/Feb/09 07:10 PM

libhdfs.patch : disables append tests in libhdfs.

The command ' ant -Dcompile.c++=true -Dlibhdfs=true clean compile test-libhdfs ' fails with current 0.19 and passes with this patch applied.

I will commit this correction soon today.


Raghu Angadi made changes - 19/Feb/09 07:10 PM
Attachment HADOOP-5224-libhdfs.patch [ 12400542 ]
Repository Revision Date User Message
ASF #745977 Thu Feb 19 19:50:29 UTC 2009 rangadi minor: the original patch for HADOOP-5224 did not disable
append tests in libhdfs. This fixes it. (Raghu Angadi)
Files Changed
MODIFY /hadoop/core/branches/branch-0.19/src/c++/libhdfs/hdfs_test.c

Raghu Angadi added a comment - 19/Feb/09 07:51 PM
I just committed libhdfs.patch to 0.19 (only).

Nigel Daley made changes - 24/Feb/09 11:37 PM
Status Resolved [ 5 ] Closed [ 6 ]
dhruba borthakur made changes - 26/Feb/09 05:43 AM
Link This issue relates to HADOOP-5332 [ HADOOP-5332 ]
Owen O'Malley made changes - 08/Jul/09 04:43 PM
Component/s dfs [ 12310710 ]
Owen O'Malley made changes - 08/Jul/09 05:05 PM
Component/s libhdfs [ 12311345 ]