hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Templeton (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-12702) Add an HDFS metrics sink
Date Wed, 13 Jan 2016 14:07:39 GMT

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

Daniel Templeton commented on HADOOP-12702:

If {{NetUtils.getHostname()}} gets an {{UnknownHostException}} from {{InetAddress.getLocalhost()}},
then it returns the exception as a string.  Definitely not what I want to use as a filename.
 As I said above, I also don't want some common default (like "localhost") because then multiple
machines may try logging to the same file.  In the case that the link gets an {{UnknownHostException}}
from {{InetAddress.getLocalhost()}}, I think the best approach is to simply let it kill the
sink, i.e. don't catch it.

> 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

View raw message