Issue Details (XML | Word | Printable)

Key: HADOOP-1654
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Enis Soztutar
Reporter: Enis Soztutar
Votes: 0
Watchers: 1
Operations

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

IOUtils class

Created: 26/Jul/07 01:03 PM   Updated: 05/Nov/07 06:12 PM
Return to search
Component/s: io
Affects Version/s: 0.15.0
Fix Version/s: 0.15.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works IOUtils_v1.0.patch 2007-07-26 01:29 PM Enis Soztutar 25 kB
Text File Licensed for inclusion in ASF works IOUtils_v1.1.patch 2007-07-26 03:57 PM Enis Soztutar 24 kB
Text File Licensed for inclusion in ASF works IOUtils_v1.2.patch 2007-07-26 04:29 PM Enis Soztutar 25 kB
Text File Licensed for inclusion in ASF works IOUtils_v1.3.patch 2007-08-06 01:37 PM Enis Soztutar 25 kB
Text File Licensed for inclusion in ASF works IOUtils_v1.4.patch 2007-08-10 10:14 PM Raghu Angadi 26 kB
Text File Licensed for inclusion in ASF works IOUtils_v1.4.patch 2007-08-10 10:13 PM Raghu Angadi 21 kB
Text File Licensed for inclusion in ASF works IOUtils_v1.5.patch 2007-08-15 11:54 AM Enis Soztutar 26 kB
Text File Licensed for inclusion in ASF works IOUtils_v1.6.patch 2007-08-22 07:22 AM Enis Soztutar 26 kB
Issue Links:
Dependants
 

Resolution Date: 23/Aug/07 02:29 PM


 Description  « Hide
In the current situation, FileUtil class includes both file related and io related functionality. This issue intends to separate the two.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Enis Soztutar added a comment - 26/Jul/07 01:29 PM
This patch adds a new class IOUtils, refactors some functions from FileUtil and FsShell, deprecates puclic methods, and updates the referances. I have included removed many @Override annotations added by Eclipse, which i find quite handy.

Hadoop QA added a comment - 26/Jul/07 02:10 PM
-1, new javadoc warnings

The javadoc tool appears to have generated warning messages when testing the latest attachment http://issues.apache.org/jira/secure/attachment/12362608/IOUtils_v1.0.patch against trunk revision r559623.

Test results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/469/testReport/
Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/469/console

Please note that this message is automatically generated and may represent a problem with the automation system and not the patch.


Raghu Angadi added a comment - 26/Jul/07 03:14 PM
You can remove FileUtil versions of readFully() etc, instead of deprecating them. They were introduced recently (HADOOP-1134) and not widely used yet.

Enis Soztutar added a comment - 26/Jul/07 03:57 PM
Removed FileUtil methods which had been moved to IOUtils. Fixes the javadoc warning.

Hadoop QA added a comment - 26/Jul/07 04:07 PM
-1, build or testing failed

2 attempts failed to build and test the latest attachment http://issues.apache.org/jira/secure/attachment/12362626/IOUtils_v1.1.patch against trunk revision r559819.

Test results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/470/testReport/
Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/470/console

Please note that this message is automatically generated and may represent a problem with the automation system and not the patch.


Enis Soztutar added a comment - 26/Jul/07 04:29 PM
Added fix for recently committed TestDataTransferProtocol.


Raghu Angadi added a comment - 26/Jul/07 11:29 PM
Patch looks good. My only reservation is copyBytes() which takes conf.. Why not just require a buffer size. This is a utility function that is expected to be used in variety of places/contexts. conf is not always available. What do you think?

Enis Soztutar added a comment - 27/Jul/07 06:46 AM
There is already an overloaded version which does not take conf, but buffSize.
public static void copyBytes(InputStream in, OutputStream out, int buffSize, boolean close)

Enis Soztutar added a comment - 06/Aug/07 01:37 PM
Updated the patch for the current trunk.


Raghu Angadi added a comment - 10/Aug/07 06:47 PM
Enis,

HADOOP-1649 adds 'skipFully()' in the same wrong place. We need to update this jira with that. I can update the patch. Let me know. For now I am removing 'Patch Available' state.


Raghu Angadi added a comment - 10/Aug/07 10:13 PM
Updated the patch with latest trunk and added skipFully() to IOUtils.

Raghu Angadi added a comment - 10/Aug/07 10:14 PM
add missing IOUtils.java.

Enis Soztutar added a comment - 15/Aug/07 09:30 AM
Retriggering the hudson build, since last time it was not. Local tests succeeds.

Hadoop QA added a comment - 15/Aug/07 09:40 AM
-1, could not apply patch.

The patch command could not apply the latest attachment http://issues.apache.org/jira/secure/attachment/12363631/IOUtils_v1.4.patch as a patch to trunk revision r565995.

Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/557/console

Please note that this message is automatically generated and may represent a problem with the automation system and not the patch.


Enis Soztutar added a comment - 15/Aug/07 11:54 AM
Updated the patch for the current trunk.

Hadoop QA added a comment - 15/Aug/07 01:39 PM
-1, build or testing failed

2 attempts failed to build and test the latest attachment http://issues.apache.org/jira/secure/attachment/12363840/IOUtils_v1.5.patch against trunk revision r565995.

Test results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/558/testReport/
Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/558/console

Please note that this message is automatically generated and may represent a problem with the automation system and not the patch.


Enis Soztutar added a comment - 16/Aug/07 11:31 AM
Retriggering the build, yet again, after HADOOP-1717 is fixed.


Doug Cutting added a comment - 21/Aug/07 07:34 PM
Sorry, but this patch no longer applies to trunk. Can you please update it?

Also, shouldn't the public methods in FileUtil that are removed instead be deprecated in 0.15? Then we should file an issue to remove them in 0.16 or later.


Enis Soztutar added a comment - 22/Aug/07 07:12 AM
> shouldn't the public methods in FileUtil that are removed instead be deprecated in 0.15
Version 1.0 of the patch deprecated the public methods in FileUtil, but Raghu has suggested to remove the functions since they are not widely used (see above). I agree with Raghu in this, especially relying on the heuristic that FileUtil#copyBytes() or similar functions are quite hadoop internal (although public). However I will just deprecate the methods if you insist. smile

Enis Soztutar added a comment - 22/Aug/07 07:22 AM
The latest patch updated to trunk.

I will not trigger hudson build until we decide on deprecation/removal of public methods that are moved to IOUtils.


Raghu Angadi added a comment - 22/Aug/07 03:21 PM
Since most of these were added only recently in 0.14 (as part of Block CRCs), I prefer to remove them. I am not sure about copyBytes() but rest of these are not used outside dfs package.

Doug Cutting added a comment - 22/Aug/07 05:07 PM
Okay, I'll agree to bend the rules a bit, and remove these public methods that were in a release, since we don't think anyone will have used them.


Doug Cutting added a comment - 23/Aug/07 02:29 PM
I just committed this. Thanks, Enis!