[
https://issues.apache.org/jira/browse/HADOOP-12702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15096974#comment-15096974
]
Daniel Templeton commented on HADOOP-12702:
-------------------------------------------
I dug into what it would take to switch to Avro and what it would mean for the
consumer. The metrics2 data object classes appear to have been written with
the express intent of making their use with Avro as painful as possible. It is
possible to construct a schema that will accurately represent the objects, but
consumption of that schema by the deserializing party will not be
straightforward. I would say that we should stay will text files for now and
add an option for Avro files as a separate JIRA (that may also encompass
rejiggering the metrics data object classes a bit). Work for you, [~steve_l]?
> Add an HDFS metrics sink
> ------------------------
>
> Key: HADOOP-12702
> URL: https://issues.apache.org/jira/browse/HADOOP-12702
> Project: Hadoop Common
> Issue Type: Improvement
> Components: metrics
> Affects Versions: 2.7.1
> Reporter: Daniel Templeton
> Assignee: Daniel Templeton
> Attachments: HADOOP-12702.001.patch
>
>
> We need a metrics2 sink that can write metrics to HDFS. The sink should
> accept as configuration a "directory prefix" and do the following in
> {{putMetrics()}}
> * Get yyyyMMddHH from current timestamp.
> * If HDFS dir "dir prefix" + yyyyMMddHH doesn't exist, create it. Close any
> currently open file and create a new file called <hostname>.log in the new
> directory.
> * Write metrics to the current log file.
> * If a write fails, it should be fatal to the process running the sink.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)