[
https://issues.apache.org/jira/browse/HCATALOG-68?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13263132#comment-13263132
]
[email protected] commented on HCATALOG-68:
-------------------------------------------------------
bq. On 2012-04-26 18:46:24, David Capwell wrote:
bq. > /trunk/src/java/org/apache/hcatalog/common/HCatLogUtil.java, line 9
bq. > <https://reviews.apache.org/r/4732/diff/5/?file=102447#file102447line9>
bq. >
bq. > I don't see why this is needed. List.toString will print out what
you want, just not on a newline (just add \n{} if thats what you want). Same
with Set.
bq.
bq. Vandana Ayyalasomayajula wrote:
bq. What you are saying is true. This class is more like a place holder
for any future utility methods. I agree we can the slf4j log itself to log
lists and maps. The methods in the utility class will be efficient in terms,
that "isLogDebugEnabled" checks are done only once for all the items in the
list.
"This class is more like a place holder for any future utility methods"
IMO we should only add it once needed.
"The methods in the utility class will be efficient in terms, that
"isLogDebugEnabled" checks are done only once for all the items in the list."
they are done n+2 times now (your call, once for the user's string, then n
times for number of elements). If n is large this will be more IO than just
calling toString on the list directly (logback is better about this but we are
using log4j).
The thing about slf4j is that it will only expand the args iff you are able to
do it at that level and only calls toString, so these method are in fact more
costly.
- David
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4732/#review7270
-----------------------------------------------------------
On 2012-04-26 20:34:16, 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-26 20:34:16)
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/src/java/org/apache/hcatalog/cli/SemanticAnalysis/HCatSemanticAnalyzer.java
1331003
bq. /trunk/src/java/org/apache/hcatalog/common/HCatLogUtil.java PRE-CREATION
bq. /trunk/src/java/org/apache/hcatalog/common/HCatUtil.java 1331003
bq. /trunk/src/java/org/apache/hcatalog/data/HCatRecordObjectInspector.java
1331003
bq.
/trunk/src/java/org/apache/hcatalog/data/HCatRecordObjectInspectorFactory.java
1331003
bq. /trunk/src/java/org/apache/hcatalog/data/HCatRecordSerDe.java 1331003
bq. /trunk/src/java/org/apache/hcatalog/data/JsonSerDe.java 1331003
bq.
/trunk/src/java/org/apache/hcatalog/mapreduce/DefaultOutputCommitterContainer.java
1331003
bq. /trunk/src/java/org/apache/hcatalog/mapreduce/HCatRecordReader.java
1331003
bq. /trunk/src/java/org/apache/hcatalog/mapreduce/HCatSplit.java 1331003
bq. /trunk/src/java/org/apache/hcatalog/mapreduce/InitializeInput.java
1331003
bq. /trunk/src/test/org/apache/hcatalog/data/HCatDataCheckUtil.java 1331003
bq. /trunk/src/test/org/apache/hcatalog/data/TestJsonSerDe.java 1331003
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