Issue Details (XML | Word | Printable)

Key: HADOOP-4965
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Konstantin Shvachko
Reporter: Konstantin Shvachko
Votes: 0
Watchers: 0
Operations

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

DFSClient should log instead of printing into std err.

Created: 31/Dec/08 06:45 AM   Updated: 24/Feb/09 11:37 PM
Return to search
Component/s: test
Affects Version/s: 0.17.0
Fix Version/s: 0.19.1

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works DFSClientLogging.patch 2009-01-14 12:36 AM Konstantin Shvachko 1 kB
Text File Licensed for inclusion in ASF works DFSClientLogging.patch 2009-01-13 01:08 AM Konstantin Shvachko 1 kB
Text File Licensed for inclusion in ASF works DFSClientLogging.patch 2008-12-31 06:52 AM Konstantin Shvachko 0.5 kB
Text File Licensed for inclusion in ASF works TestFileAppend3.patch 2009-01-16 09:08 PM Konstantin Shvachko 0.5 kB
Issue Links:
Duplicate
 

Hadoop Flags: Reviewed
Resolution Date: 16/Jan/09 09:28 PM


 Description  « Hide
DFSClient.LeaseChecker.close() uses System.err.println() and Exception.printStackTrace() to output the exception.LOG.error() should be used instead.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Konstantin Shvachko made changes - 31/Dec/08 06:52 AM
Field Original Value New Value
Attachment DFSClientLogging.patch [ 12396956 ]
Konstantin Shvachko made changes - 31/Dec/08 06:53 AM
Status Open [ 1 ] Patch Available [ 10002 ]
Suresh Srinivas added a comment - 31/Dec/08 08:28 AM
Previously the file name was printed. Should the file name be printed in the log? Otherwise +1 for the patch.

Tsz Wo (Nicholas), SZE added a comment - 31/Dec/08 11:57 AM
This patch may change the shell commands output.

Konstantin Shvachko added a comment - 13/Jan/09 01:08 AM
This patch
  • prints the file name;
  • stringifyException
  • also closes FileSystem in TestFileAppend3

Konstantin Shvachko made changes - 13/Jan/09 01:08 AM
Attachment DFSClientLogging.patch [ 12397733 ]
Steve Loughran added a comment - 13/Jan/09 02:02 PM
You shouldn't need to call StringUtils.stringifyException(), because passing it down to the log tools as is lets your logging tool handle the chained strack trace themselves -which can include a more structured output than the stringifyException() call. I'd prefer something like:
LOG.error("Exception closing file " + src + ": " +ie,ie);

Steve Loughran made changes - 13/Jan/09 03:54 PM
Link This issue duplicates HADOOP-3894 [ HADOOP-3894 ]
Steve Loughran added a comment - 13/Jan/09 03:54 PM
I thought this bugrep was familiar;

Konstantin Shvachko added a comment - 14/Jan/09 12:36 AM
Incorporated Suresh's comment.

Konstantin Shvachko made changes - 14/Jan/09 12:36 AM
Attachment DFSClientLogging.patch [ 12397843 ]
Konstantin Shvachko added a comment - 15/Jan/09 01:40 AM
Only one unit test failure with this patch. TestMapReduceLocal fails as in HADOOP-4907.

Suresh Srinivas added a comment - 15/Jan/09 01:44 AM
+1 for the patch

Konstantin Shvachko added a comment - 16/Jan/09 09:08 PM
I am removing the DFSClient related code from the patch because it has been resolved by HADOOP-3894. Leaving only the TestFileAppend3 improvement.

Konstantin Shvachko made changes - 16/Jan/09 09:08 PM
Attachment TestFileAppend3.patch [ 12398110 ]
Konstantin Shvachko made changes - 16/Jan/09 09:10 PM
Component/s test [ 12311440 ]
Component/s dfs [ 12310710 ]
Repository Revision Date User Message
ASF #735140 Fri Jan 16 21:16:43 UTC 2009 shv HADOOP-4965. TestFileAppend3 should close FileSystem. Contributed by Konstantin Shvachko.
Files Changed
MODIFY /hadoop/core/trunk/CHANGES.txt
MODIFY /hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/TestFileAppend3.java

Repository Revision Date User Message
ASF #735143 Fri Jan 16 21:22:19 UTC 2009 shv HADOOP-4965. Merge -r 735139:735140 from trunk to branch 0.20.
Files Changed
MODIFY /hadoop/core/branches/branch-0.20/CHANGES.txt
MODIFY /hadoop/core/branches/branch-0.20/src/test/org/apache/hadoop/hdfs/TestFileAppend3.java

Repository Revision Date User Message
ASF #735145 Fri Jan 16 21:26:56 UTC 2009 shv HADOOP-4965. Merge -r 735139:735140 from trunk to branch 0.19.
Files Changed
MODIFY /hadoop/core/branches/branch-0.19/CHANGES.txt
MODIFY /hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/hdfs/TestFileAppend3.java

Konstantin Shvachko added a comment - 16/Jan/09 09:28 PM
I just committed this.

Konstantin Shvachko made changes - 16/Jan/09 09:28 PM
Fix Version/s 0.20.0 [ 12313438 ]
Resolution Fixed [ 1 ]
Fix Version/s 0.19.1 [ 12313473 ]
Status Patch Available [ 10002 ] Resolved [ 5 ]
Hadoop Flags [Reviewed]
Nigel Daley made changes - 24/Feb/09 11:37 PM
Status Resolved [ 5 ] Closed [ 6 ]