[ 
https://issues.apache.org/jira/browse/HADOOP-6244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13106680#comment-13106680
 ] 

Steve Loughran commented on HADOOP-6244:
----------------------------------------

Actually, we could use Json records trivially, one per line

{code}
{"time_t":546774444, "tag1": null, "tag2" :"Value2", "tag3" :"with\nnewlines" }
{code}
Escaping things reliably is where you want to delegate to a JSON lib, but this 
format would give you something greppable that is human readable and nicely 
viewable in JSON tooling. It would look a bit like Avro-in-JSON, without the 
schema. 

The Log4J idea makes sense, we'd just need a specific JSON-formatter. Which 
isn't that hard, as someone has already done one: 
https://github.com/Aconex/json-log4j-layout/blob/master/src/main/java/org/elasticflume/log4j/JSONLayout.java

> Improvements to FileContext metrics output formatting
> -----------------------------------------------------
>
>                 Key: HADOOP-6244
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6244
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: metrics
>    Affects Versions: 0.22.0
>            Reporter: Todd Lipcon
>            Assignee: Steve Loughran
>         Attachments: hadoop-6244.txt
>
>
> The output of FileContext has two big issues: 1) it doesn't include a 
> timestamp, 2) it doesn't differentiate between tags and metrics in 
> formatting. This patch is to improve the output format to be more useful.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to