[
https://issues.apache.org/jira/browse/HCATALOG-68?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13254828#comment-13254828
]
[email protected] commented on HCATALOG-68:
-------------------------------------------------------
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4732/#review6937
-----------------------------------------------------------
/trunk/src/java/org/apache/hcatalog/common/HCatLogUtil.java
<https://reviews.apache.org/r/4732/#comment15482>
With this everything will be logged as HCatLogUtil.class which beats the
point of logging messages for debugging purpose.
/trunk/src/java/org/apache/hcatalog/common/HCatLogUtil.java
<https://reviews.apache.org/r/4732/#comment15480>
It would be cleaner and configurable if formatting is part of log4j.xml of
log4j.properties and not part of code.
/trunk/src/java/org/apache/hcatalog/common/HCatLogUtil.java
<https://reviews.apache.org/r/4732/#comment15481>
It would be better to do String concatenation than string format.
String.format is very costly as it does pattern matching.
https://issues.apache.org/jira/browse/MAPREDUCE-1533
/trunk/src/java/org/apache/hcatalog/data/HCatRecordObjectInspectorFactory.java
<https://reviews.apache.org/r/4732/#comment15478>
You will have to do a isDebugEnabled() before the debug call. The main
intention of it is to avoid the cost of string concatenation/parameter
construction.
http://logging.apache.org/log4j/1.2/manual.html#performance
/trunk/src/java/org/apache/hcatalog/mapreduce/HCatRecordReader.java
<https://reviews.apache.org/r/4732/#comment15484>
Log.warn("some msg", e) would log both e.getMessage and e's strack trace.
Logging them separately is redundant. There are many instances of this in the
code which can be cleaned up.
- Rohini
On 2012-04-16 06:31:43, Vandana Ayyalasomayajula wrote:
bq.
bq. -----------------------------------------------------------
bq. This is an automatically generated e-mail. To reply, visit:
bq. https://reviews.apache.org/r/4732/
bq. -----------------------------------------------------------
bq.
bq. (Updated 2012-04-16 06:31:43)
bq.
bq.
bq. Review request for hcatalog, Sushanth Sowmyan, Francis Liu, and Thomas.
bq.
bq.
bq. Summary
bq. -------
bq.
bq. We need to do the following things:
bq.
bq. + Use log4j across the board
bq. + Introduce a class with methods to help logging, refactoring away the
bunch of these functions in HCatUtil right now
bq. + Instrument debug logging with isLogEnabled checks on the log level
bq. + remove all instances of commented code whose purpose was for debug logs
bq.
bq.
bq. This addresses bug hcatalog-68.
bq. https://issues.apache.org/jira/browse/hcatalog-68
bq.
bq.
bq. Diffs
bq. -----
bq.
bq. /trunk/ivy.xml 1325838
bq.
/trunk/src/java/org/apache/hcatalog/cli/SemanticAnalysis/HCatSemanticAnalyzer.java
1325838
bq. /trunk/src/java/org/apache/hcatalog/common/HCatLogUtil.java PRE-CREATION
bq. /trunk/src/java/org/apache/hcatalog/common/HCatUtil.java 1325838
bq.
/trunk/src/java/org/apache/hcatalog/data/HCatRecordObjectInspectorFactory.java
1325838
bq. /trunk/src/java/org/apache/hcatalog/data/HCatRecordSerDe.java 1325838
bq. /trunk/src/java/org/apache/hcatalog/data/JsonSerDe.java 1325838
bq.
/trunk/src/java/org/apache/hcatalog/mapreduce/DefaultOutputCommitterContainer.java
1325838
bq. /trunk/src/java/org/apache/hcatalog/mapreduce/HCatOutputFormat.java
1325838
bq. /trunk/src/java/org/apache/hcatalog/mapreduce/HCatRecordReader.java
1325838
bq. /trunk/src/java/org/apache/hcatalog/mapreduce/HCatSplit.java 1325838
bq. /trunk/src/java/org/apache/hcatalog/mapreduce/InitializeInput.java
1325838
bq. /trunk/src/test/org/apache/hcatalog/data/HCatDataCheckUtil.java 1325838
bq. /trunk/src/test/org/apache/hcatalog/data/TestJsonSerDe.java 1325838
bq.
bq. Diff: https://reviews.apache.org/r/4732/diff
bq.
bq.
bq. Testing
bq. -------
bq.
bq. Unit tests pass. Log messages verified from test logs.
bq.
bq.
bq. Thanks,
bq.
bq. Vandana
bq.
bq.
> Logging from HCat
> -----------------
>
> Key: HCATALOG-68
> URL: https://issues.apache.org/jira/browse/HCATALOG-68
> Project: HCatalog
> Issue Type: Improvement
> Reporter: Sushanth Sowmyan
> Assignee: Vandana Ayyalasomayajula
>
> We need to do the following things:
> + Use log4j across the board
> + Introduce a class with methods to help logging, refactoring away the
> bunch of these functions in HCatUtil right now
> + Instrument debug logging with isLogEnabled checks on the log level
> + remove all instances of commented code whose purpose was for debug logs
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira