You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Joey Echeverria (JIRA)" <ji...@apache.org> on 2011/05/20 21:43:47 UTC
[jira] [Created] (HDFS-1977) Stop using
StringUtils.stringifyException()
Stop using StringUtils.stringifyException()
-------------------------------------------
Key: HDFS-1977
URL: https://issues.apache.org/jira/browse/HDFS-1977
Project: Hadoop HDFS
Issue Type: Improvement
Reporter: Joey Echeverria
Priority: Minor
The old version of the logging APIs didn't support logging stack traces by passing exceptions to the logging methods (e.g. Log.error()). A number of log statements make use of StringUtils.stringifyException() to get around the old behavior. It would be nice if this could get cleaned up to make use of the the logger's stack trace printing. This also gives users more control since you can configure how the stack traces are written to the logs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1977) Stop using
StringUtils.stringifyException()
Posted by "Jitendra Nath Pandey (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13063654#comment-13063654 ]
Jitendra Nath Pandey commented on HDFS-1977:
--------------------------------------------
StringUtils is still being imported in many files, although not used anymore. For example in DFSInputStream.java, NameNodeConnector.java and in a few others.
Otherwise, the patch looks good to me.
> Stop using StringUtils.stringifyException()
> -------------------------------------------
>
> Key: HDFS-1977
> URL: https://issues.apache.org/jira/browse/HDFS-1977
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Joey Echeverria
> Assignee: Bharath Mundlapudi
> Priority: Minor
> Attachments: HDFS-1977-1.patch, HDFS-1977-2.patch, HDFS-1977-3.patch
>
>
> The old version of the logging APIs didn't support logging stack traces by passing exceptions to the logging methods (e.g. Log.error()). A number of log statements make use of StringUtils.stringifyException() to get around the old behavior. It would be nice if this could get cleaned up to make use of the the logger's stack trace printing. This also gives users more control since you can configure how the stack traces are written to the logs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HDFS-1977) Stop using
StringUtils.stringifyException()
Posted by "Tanping Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tanping Wang updated HDFS-1977:
-------------------------------
Status: Patch Available (was: Open)
> Stop using StringUtils.stringifyException()
> -------------------------------------------
>
> Key: HDFS-1977
> URL: https://issues.apache.org/jira/browse/HDFS-1977
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Joey Echeverria
> Assignee: Bharath Mundlapudi
> Priority: Minor
> Attachments: HDFS-1977-1.patch
>
>
> The old version of the logging APIs didn't support logging stack traces by passing exceptions to the logging methods (e.g. Log.error()). A number of log statements make use of StringUtils.stringifyException() to get around the old behavior. It would be nice if this could get cleaned up to make use of the the logger's stack trace printing. This also gives users more control since you can configure how the stack traces are written to the logs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1977) Stop using
StringUtils.stringifyException()
Posted by "Bharath Mundlapudi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13061719#comment-13061719 ]
Bharath Mundlapudi commented on HDFS-1977:
------------------------------------------
Sure. I agree with you. I am posting an updated patch with your suggestions.
> Stop using StringUtils.stringifyException()
> -------------------------------------------
>
> Key: HDFS-1977
> URL: https://issues.apache.org/jira/browse/HDFS-1977
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Joey Echeverria
> Assignee: Bharath Mundlapudi
> Priority: Minor
> Attachments: HDFS-1977-1.patch, HDFS-1977-2.patch, HDFS-1977-3.patch
>
>
> The old version of the logging APIs didn't support logging stack traces by passing exceptions to the logging methods (e.g. Log.error()). A number of log statements make use of StringUtils.stringifyException() to get around the old behavior. It would be nice if this could get cleaned up to make use of the the logger's stack trace printing. This also gives users more control since you can configure how the stack traces are written to the logs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1977) Stop using
StringUtils.stringifyException()
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13060904#comment-13060904 ]
Hadoop QA commented on HDFS-1977:
---------------------------------
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12485490/HDFS-1977-2.patch
against trunk revision 1143147.
+1 @author. The patch does not contain any @author tags.
-1 tests included. The patch doesn't appear to include any new or modified tests.
Please justify why no new tests are needed for this patch.
Also please list what manual steps were performed to verify this patch.
+1 javadoc. The javadoc tool did not generate any warning messages.
+1 javac. The applied patch does not increase the total number of javac compiler warnings.
+1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.
+1 release audit. The applied patch does not increase the total number of release audit warnings.
+1 core tests. The patch passed core unit tests.
+1 contrib tests. The patch passed contrib unit tests.
+1 system test framework. The patch passed system test framework compile.
Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/884//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/884//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/884//console
This message is automatically generated.
> Stop using StringUtils.stringifyException()
> -------------------------------------------
>
> Key: HDFS-1977
> URL: https://issues.apache.org/jira/browse/HDFS-1977
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Joey Echeverria
> Assignee: Bharath Mundlapudi
> Priority: Minor
> Attachments: HDFS-1977-1.patch, HDFS-1977-2.patch
>
>
> The old version of the logging APIs didn't support logging stack traces by passing exceptions to the logging methods (e.g. Log.error()). A number of log statements make use of StringUtils.stringifyException() to get around the old behavior. It would be nice if this could get cleaned up to make use of the the logger's stack trace printing. This also gives users more control since you can configure how the stack traces are written to the logs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HDFS-1977) Stop using
StringUtils.stringifyException()
Posted by "Tanping Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tanping Wang updated HDFS-1977:
-------------------------------
Status: Open (was: Patch Available)
> Stop using StringUtils.stringifyException()
> -------------------------------------------
>
> Key: HDFS-1977
> URL: https://issues.apache.org/jira/browse/HDFS-1977
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Joey Echeverria
> Assignee: Bharath Mundlapudi
> Priority: Minor
> Attachments: HDFS-1977-1.patch
>
>
> The old version of the logging APIs didn't support logging stack traces by passing exceptions to the logging methods (e.g. Log.error()). A number of log statements make use of StringUtils.stringifyException() to get around the old behavior. It would be nice if this could get cleaned up to make use of the the logger's stack trace printing. This also gives users more control since you can configure how the stack traces are written to the logs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (HDFS-1977) Stop using
StringUtils.stringifyException()
Posted by "Bharath Mundlapudi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bharath Mundlapudi reassigned HDFS-1977:
----------------------------------------
Assignee: Bharath Mundlapudi
> Stop using StringUtils.stringifyException()
> -------------------------------------------
>
> Key: HDFS-1977
> URL: https://issues.apache.org/jira/browse/HDFS-1977
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Joey Echeverria
> Assignee: Bharath Mundlapudi
> Priority: Minor
>
> The old version of the logging APIs didn't support logging stack traces by passing exceptions to the logging methods (e.g. Log.error()). A number of log statements make use of StringUtils.stringifyException() to get around the old behavior. It would be nice if this could get cleaned up to make use of the the logger's stack trace printing. This also gives users more control since you can configure how the stack traces are written to the logs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1977) Stop using
StringUtils.stringifyException()
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13064526#comment-13064526 ]
Hudson commented on HDFS-1977:
------------------------------
Integrated in Hadoop-Hdfs-trunk #723 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk/723/])
HDFS-1977. Stop using StringUtils.stringifyException(). Contributed by Bharath Mundlapudi.
jitendra : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1145834
Files :
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
* /hadoop/common/trunk/hdfs/CHANGES.txt
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolSliceScanner.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/DFSInputStream.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/DFSClient.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/DataStorage.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/DataXceiverServer.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/FSDataset.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/balancer/NameNodeConnector.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/DFSOutputStream.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/UpgradeObjectDatanode.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/BlockSender.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java
> Stop using StringUtils.stringifyException()
> -------------------------------------------
>
> Key: HDFS-1977
> URL: https://issues.apache.org/jira/browse/HDFS-1977
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Joey Echeverria
> Assignee: Bharath Mundlapudi
> Priority: Minor
> Attachments: HDFS-1977-1.patch, HDFS-1977-2.patch, HDFS-1977-3.patch, HDFS-1977-4.patch
>
>
> The old version of the logging APIs didn't support logging stack traces by passing exceptions to the logging methods (e.g. Log.error()). A number of log statements make use of StringUtils.stringifyException() to get around the old behavior. It would be nice if this could get cleaned up to make use of the the logger's stack trace printing. This also gives users more control since you can configure how the stack traces are written to the logs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1977) Stop using
StringUtils.stringifyException()
Posted by "Bharath Mundlapudi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13049438#comment-13049438 ]
Bharath Mundlapudi commented on HDFS-1977:
------------------------------------------
The newer logging API supports exceptions.
ie.:
Change the code from LOG.warn(msg, StringUtils.stringifyException(exception)); to LOG.warn(msg, exception);
> Stop using StringUtils.stringifyException()
> -------------------------------------------
>
> Key: HDFS-1977
> URL: https://issues.apache.org/jira/browse/HDFS-1977
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Joey Echeverria
> Assignee: Bharath Mundlapudi
> Priority: Minor
>
> The old version of the logging APIs didn't support logging stack traces by passing exceptions to the logging methods (e.g. Log.error()). A number of log statements make use of StringUtils.stringifyException() to get around the old behavior. It would be nice if this could get cleaned up to make use of the the logger's stack trace printing. This also gives users more control since you can configure how the stack traces are written to the logs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1977) Stop using
StringUtils.stringifyException()
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13064105#comment-13064105 ]
Hadoop QA commented on HDFS-1977:
---------------------------------
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12486212/HDFS-1977-4.patch
against trunk revision 1145428.
+1 @author. The patch does not contain any @author tags.
-1 tests included. The patch doesn't appear to include any new or modified tests.
Please justify why no new tests are needed for this patch.
Also please list what manual steps were performed to verify this patch.
+1 javadoc. The javadoc tool did not generate any warning messages.
+1 javac. The applied patch does not increase the total number of javac compiler warnings.
+1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.
+1 release audit. The applied patch does not increase the total number of release audit warnings.
+1 core tests. The patch passed core unit tests.
+1 contrib tests. The patch passed contrib unit tests.
+1 system test framework. The patch passed system test framework compile.
Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/910//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/910//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/910//console
This message is automatically generated.
> Stop using StringUtils.stringifyException()
> -------------------------------------------
>
> Key: HDFS-1977
> URL: https://issues.apache.org/jira/browse/HDFS-1977
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Joey Echeverria
> Assignee: Bharath Mundlapudi
> Priority: Minor
> Attachments: HDFS-1977-1.patch, HDFS-1977-2.patch, HDFS-1977-3.patch, HDFS-1977-4.patch
>
>
> The old version of the logging APIs didn't support logging stack traces by passing exceptions to the logging methods (e.g. Log.error()). A number of log statements make use of StringUtils.stringifyException() to get around the old behavior. It would be nice if this could get cleaned up to make use of the the logger's stack trace printing. This also gives users more control since you can configure how the stack traces are written to the logs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1977) Stop using
StringUtils.stringifyException()
Posted by "Bharath Mundlapudi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13060910#comment-13060910 ]
Bharath Mundlapudi commented on HDFS-1977:
------------------------------------------
This patch doesn't include unit tests, since its just adopting to new logging api. No new tests are required.
> Stop using StringUtils.stringifyException()
> -------------------------------------------
>
> Key: HDFS-1977
> URL: https://issues.apache.org/jira/browse/HDFS-1977
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Joey Echeverria
> Assignee: Bharath Mundlapudi
> Priority: Minor
> Attachments: HDFS-1977-1.patch, HDFS-1977-2.patch
>
>
> The old version of the logging APIs didn't support logging stack traces by passing exceptions to the logging methods (e.g. Log.error()). A number of log statements make use of StringUtils.stringifyException() to get around the old behavior. It would be nice if this could get cleaned up to make use of the the logger's stack trace printing. This also gives users more control since you can configure how the stack traces are written to the logs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HDFS-1977) Stop using
StringUtils.stringifyException()
Posted by "Bharath Mundlapudi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bharath Mundlapudi updated HDFS-1977:
-------------------------------------
Attachment: HDFS-1977-3.patch
> Stop using StringUtils.stringifyException()
> -------------------------------------------
>
> Key: HDFS-1977
> URL: https://issues.apache.org/jira/browse/HDFS-1977
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Joey Echeverria
> Assignee: Bharath Mundlapudi
> Priority: Minor
> Attachments: HDFS-1977-1.patch, HDFS-1977-2.patch, HDFS-1977-3.patch
>
>
> The old version of the logging APIs didn't support logging stack traces by passing exceptions to the logging methods (e.g. Log.error()). A number of log statements make use of StringUtils.stringifyException() to get around the old behavior. It would be nice if this could get cleaned up to make use of the the logger's stack trace printing. This also gives users more control since you can configure how the stack traces are written to the logs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1977) Stop using
StringUtils.stringifyException()
Posted by "Tanping Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13052746#comment-13052746 ]
Tanping Wang commented on HDFS-1977:
------------------------------------
+1 on the patch.
> Stop using StringUtils.stringifyException()
> -------------------------------------------
>
> Key: HDFS-1977
> URL: https://issues.apache.org/jira/browse/HDFS-1977
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Joey Echeverria
> Assignee: Bharath Mundlapudi
> Priority: Minor
> Attachments: HDFS-1977-1.patch
>
>
> The old version of the logging APIs didn't support logging stack traces by passing exceptions to the logging methods (e.g. Log.error()). A number of log statements make use of StringUtils.stringifyException() to get around the old behavior. It would be nice if this could get cleaned up to make use of the the logger's stack trace printing. This also gives users more control since you can configure how the stack traces are written to the logs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1977) Stop using
StringUtils.stringifyException()
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13061740#comment-13061740 ]
Hadoop QA commented on HDFS-1977:
---------------------------------
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12485675/HDFS-1977-3.patch
against trunk revision 1144100.
+1 @author. The patch does not contain any @author tags.
-1 tests included. The patch doesn't appear to include any new or modified tests.
Please justify why no new tests are needed for this patch.
Also please list what manual steps were performed to verify this patch.
+1 javadoc. The javadoc tool did not generate any warning messages.
+1 javac. The applied patch does not increase the total number of javac compiler warnings.
+1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.
+1 release audit. The applied patch does not increase the total number of release audit warnings.
+1 core tests. The patch passed core unit tests.
+1 contrib tests. The patch passed contrib unit tests.
+1 system test framework. The patch passed system test framework compile.
Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/897//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/897//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/897//console
This message is automatically generated.
> Stop using StringUtils.stringifyException()
> -------------------------------------------
>
> Key: HDFS-1977
> URL: https://issues.apache.org/jira/browse/HDFS-1977
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Joey Echeverria
> Assignee: Bharath Mundlapudi
> Priority: Minor
> Attachments: HDFS-1977-1.patch, HDFS-1977-2.patch, HDFS-1977-3.patch
>
>
> The old version of the logging APIs didn't support logging stack traces by passing exceptions to the logging methods (e.g. Log.error()). A number of log statements make use of StringUtils.stringifyException() to get around the old behavior. It would be nice if this could get cleaned up to make use of the the logger's stack trace printing. This also gives users more control since you can configure how the stack traces are written to the logs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HDFS-1977) Stop using
StringUtils.stringifyException()
Posted by "Tanping Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tanping Wang updated HDFS-1977:
-------------------------------
Status: Patch Available (was: Open)
> Stop using StringUtils.stringifyException()
> -------------------------------------------
>
> Key: HDFS-1977
> URL: https://issues.apache.org/jira/browse/HDFS-1977
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Joey Echeverria
> Assignee: Bharath Mundlapudi
> Priority: Minor
> Attachments: HDFS-1977-1.patch
>
>
> The old version of the logging APIs didn't support logging stack traces by passing exceptions to the logging methods (e.g. Log.error()). A number of log statements make use of StringUtils.stringifyException() to get around the old behavior. It would be nice if this could get cleaned up to make use of the the logger's stack trace printing. This also gives users more control since you can configure how the stack traces are written to the logs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HDFS-1977) Stop using
StringUtils.stringifyException()
Posted by "Bharath Mundlapudi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bharath Mundlapudi updated HDFS-1977:
-------------------------------------
Attachment: HDFS-1977-2.patch
Things changed since last post, reattaching with new changes.
> Stop using StringUtils.stringifyException()
> -------------------------------------------
>
> Key: HDFS-1977
> URL: https://issues.apache.org/jira/browse/HDFS-1977
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Joey Echeverria
> Assignee: Bharath Mundlapudi
> Priority: Minor
> Attachments: HDFS-1977-1.patch, HDFS-1977-2.patch
>
>
> The old version of the logging APIs didn't support logging stack traces by passing exceptions to the logging methods (e.g. Log.error()). A number of log statements make use of StringUtils.stringifyException() to get around the old behavior. It would be nice if this could get cleaned up to make use of the the logger's stack trace printing. This also gives users more control since you can configure how the stack traces are written to the logs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1977) Stop using
StringUtils.stringifyException()
Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13061682#comment-13061682 ]
Todd Lipcon commented on HDFS-1977:
-----------------------------------
In the places where the log message ends in ": ", I think we should remove the ": " part, since log4j will already separate the trace from the message. Same goes for places where we have a {{"\n"}} or {{+ " got "}}
For lines like the following, can you make the message a little more informative?
+ DFSClient.LOG.info("Exception: ", e);
+ LOG.warn("IOException: ", e);
While we're changing the following line, may as well fix the typo also:
+ LOG.info("Could not reade next line in LogHandler : ", e);
> Stop using StringUtils.stringifyException()
> -------------------------------------------
>
> Key: HDFS-1977
> URL: https://issues.apache.org/jira/browse/HDFS-1977
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Joey Echeverria
> Assignee: Bharath Mundlapudi
> Priority: Minor
> Attachments: HDFS-1977-1.patch, HDFS-1977-2.patch
>
>
> The old version of the logging APIs didn't support logging stack traces by passing exceptions to the logging methods (e.g. Log.error()). A number of log statements make use of StringUtils.stringifyException() to get around the old behavior. It would be nice if this could get cleaned up to make use of the the logger's stack trace printing. This also gives users more control since you can configure how the stack traces are written to the logs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1977) Stop using
StringUtils.stringifyException()
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13064279#comment-13064279 ]
Hudson commented on HDFS-1977:
------------------------------
Integrated in Hadoop-Hdfs-trunk-Commit #783 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/783/])
HDFS-1977. Stop using StringUtils.stringifyException(). Contributed by Bharath Mundlapudi.
jitendra : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1145834
Files :
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
* /hadoop/common/trunk/hdfs/CHANGES.txt
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolSliceScanner.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/DFSInputStream.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/DFSClient.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/DataStorage.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/DataXceiverServer.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/FSDataset.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/balancer/NameNodeConnector.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/DFSOutputStream.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/UpgradeObjectDatanode.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/BlockSender.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
* /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java
> Stop using StringUtils.stringifyException()
> -------------------------------------------
>
> Key: HDFS-1977
> URL: https://issues.apache.org/jira/browse/HDFS-1977
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Joey Echeverria
> Assignee: Bharath Mundlapudi
> Priority: Minor
> Attachments: HDFS-1977-1.patch, HDFS-1977-2.patch, HDFS-1977-3.patch, HDFS-1977-4.patch
>
>
> The old version of the logging APIs didn't support logging stack traces by passing exceptions to the logging methods (e.g. Log.error()). A number of log statements make use of StringUtils.stringifyException() to get around the old behavior. It would be nice if this could get cleaned up to make use of the the logger's stack trace printing. This also gives users more control since you can configure how the stack traces are written to the logs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1977) Stop using
StringUtils.stringifyException()
Posted by "Jitendra Nath Pandey (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13064117#comment-13064117 ]
Jitendra Nath Pandey commented on HDFS-1977:
--------------------------------------------
+1 for the patch.
> Stop using StringUtils.stringifyException()
> -------------------------------------------
>
> Key: HDFS-1977
> URL: https://issues.apache.org/jira/browse/HDFS-1977
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Joey Echeverria
> Assignee: Bharath Mundlapudi
> Priority: Minor
> Attachments: HDFS-1977-1.patch, HDFS-1977-2.patch, HDFS-1977-3.patch, HDFS-1977-4.patch
>
>
> The old version of the logging APIs didn't support logging stack traces by passing exceptions to the logging methods (e.g. Log.error()). A number of log statements make use of StringUtils.stringifyException() to get around the old behavior. It would be nice if this could get cleaned up to make use of the the logger's stack trace printing. This also gives users more control since you can configure how the stack traces are written to the logs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1977) Stop using
StringUtils.stringifyException()
Posted by "Bharath Mundlapudi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13062068#comment-13062068 ]
Bharath Mundlapudi commented on HDFS-1977:
------------------------------------------
Todd, If you don't have any further comments on this patch, can you please commit this?
> Stop using StringUtils.stringifyException()
> -------------------------------------------
>
> Key: HDFS-1977
> URL: https://issues.apache.org/jira/browse/HDFS-1977
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Joey Echeverria
> Assignee: Bharath Mundlapudi
> Priority: Minor
> Attachments: HDFS-1977-1.patch, HDFS-1977-2.patch, HDFS-1977-3.patch
>
>
> The old version of the logging APIs didn't support logging stack traces by passing exceptions to the logging methods (e.g. Log.error()). A number of log statements make use of StringUtils.stringifyException() to get around the old behavior. It would be nice if this could get cleaned up to make use of the the logger's stack trace printing. This also gives users more control since you can configure how the stack traces are written to the logs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HDFS-1977) Stop using
StringUtils.stringifyException()
Posted by "Bharath Mundlapudi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bharath Mundlapudi updated HDFS-1977:
-------------------------------------
Attachment: HDFS-1977-4.patch
> Stop using StringUtils.stringifyException()
> -------------------------------------------
>
> Key: HDFS-1977
> URL: https://issues.apache.org/jira/browse/HDFS-1977
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Joey Echeverria
> Assignee: Bharath Mundlapudi
> Priority: Minor
> Attachments: HDFS-1977-1.patch, HDFS-1977-2.patch, HDFS-1977-3.patch, HDFS-1977-4.patch
>
>
> The old version of the logging APIs didn't support logging stack traces by passing exceptions to the logging methods (e.g. Log.error()). A number of log statements make use of StringUtils.stringifyException() to get around the old behavior. It would be nice if this could get cleaned up to make use of the the logger's stack trace printing. This also gives users more control since you can configure how the stack traces are written to the logs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1977) Stop using
StringUtils.stringifyException()
Posted by "Bharath Mundlapudi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13064067#comment-13064067 ]
Bharath Mundlapudi commented on HDFS-1977:
------------------------------------------
Thank you all, I am attaching a patch which addresses Jitendra's comment.
> Stop using StringUtils.stringifyException()
> -------------------------------------------
>
> Key: HDFS-1977
> URL: https://issues.apache.org/jira/browse/HDFS-1977
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Joey Echeverria
> Assignee: Bharath Mundlapudi
> Priority: Minor
> Attachments: HDFS-1977-1.patch, HDFS-1977-2.patch, HDFS-1977-3.patch
>
>
> The old version of the logging APIs didn't support logging stack traces by passing exceptions to the logging methods (e.g. Log.error()). A number of log statements make use of StringUtils.stringifyException() to get around the old behavior. It would be nice if this could get cleaned up to make use of the the logger's stack trace printing. This also gives users more control since you can configure how the stack traces are written to the logs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HDFS-1977) Stop using
StringUtils.stringifyException()
Posted by "Bharath Mundlapudi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bharath Mundlapudi updated HDFS-1977:
-------------------------------------
Attachment: HDFS-1977-1.patch
Attaching a patch.
> Stop using StringUtils.stringifyException()
> -------------------------------------------
>
> Key: HDFS-1977
> URL: https://issues.apache.org/jira/browse/HDFS-1977
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Joey Echeverria
> Assignee: Bharath Mundlapudi
> Priority: Minor
> Attachments: HDFS-1977-1.patch
>
>
> The old version of the logging APIs didn't support logging stack traces by passing exceptions to the logging methods (e.g. Log.error()). A number of log statements make use of StringUtils.stringifyException() to get around the old behavior. It would be nice if this could get cleaned up to make use of the the logger's stack trace printing. This also gives users more control since you can configure how the stack traces are written to the logs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HDFS-1977) Stop using
StringUtils.stringifyException()
Posted by "Jitendra Nath Pandey (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jitendra Nath Pandey updated HDFS-1977:
---------------------------------------
Resolution: Fixed
Status: Resolved (was: Patch Available)
I have committed this. Thanks to Bharath!
> Stop using StringUtils.stringifyException()
> -------------------------------------------
>
> Key: HDFS-1977
> URL: https://issues.apache.org/jira/browse/HDFS-1977
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Joey Echeverria
> Assignee: Bharath Mundlapudi
> Priority: Minor
> Attachments: HDFS-1977-1.patch, HDFS-1977-2.patch, HDFS-1977-3.patch, HDFS-1977-4.patch
>
>
> The old version of the logging APIs didn't support logging stack traces by passing exceptions to the logging methods (e.g. Log.error()). A number of log statements make use of StringUtils.stringifyException() to get around the old behavior. It would be nice if this could get cleaned up to make use of the the logger's stack trace printing. This also gives users more control since you can configure how the stack traces are written to the logs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HDFS-1977) Stop using
StringUtils.stringifyException()
Posted by "Tanping Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tanping Wang updated HDFS-1977:
-------------------------------
Hadoop Flags: [Reviewed]
> Stop using StringUtils.stringifyException()
> -------------------------------------------
>
> Key: HDFS-1977
> URL: https://issues.apache.org/jira/browse/HDFS-1977
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Joey Echeverria
> Assignee: Bharath Mundlapudi
> Priority: Minor
> Attachments: HDFS-1977-1.patch
>
>
> The old version of the logging APIs didn't support logging stack traces by passing exceptions to the logging methods (e.g. Log.error()). A number of log statements make use of StringUtils.stringifyException() to get around the old behavior. It would be nice if this could get cleaned up to make use of the the logger's stack trace printing. This also gives users more control since you can configure how the stack traces are written to the logs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira