[
https://issues.apache.org/jira/browse/HADOOP-10949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14700394#comment-14700394
]
Ravi Prakash commented on HADOOP-10949:
---------------------------------------
1. Please try using exclusions in the pom file. Please refer to
https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
. Can you try a clean rebuild?
2. Also {{if(producer != null){}} should probably be the first thing you check
in putMetrics() so that you don't do a lot of work when the producer failed to
init.
3. close should probably set producer to null. You can also use
IOUtils.closeStream()
4 the {{finally}} doesn't seem to be required in close()
5. Please don't catch Throwable in close()
6. In flush, do you really need the try-catch?
7. Please use 2 spaces for indentation.
8. Please conform to the 80-char limit for lines
9. Please add more documentation to the class (including the constraint that
only 1 topic can be written to)
10. Should the scope of kafka be {{provided}}. I don't know if we should start
packaging kafka along with hadoop.
11. In init, is {{producer = new Producer<Integer, byte[]>(config);}} ever
going to throw an exception?
> Write metrics2 sink plugin for Apache Kafka -- KafkaSink
> --------------------------------------------------------
>
> Key: HADOOP-10949
> URL: https://issues.apache.org/jira/browse/HADOOP-10949
> Project: Hadoop Common
> Issue Type: New Feature
> Components: metrics
> Reporter: Babak Behzad
> Assignee: Babak Behzad
> Attachments: HADOOP-10949.patch, HADOOP-10949.patch
>
>
> Write a metrics2 sink plugin for Hadoop to send metrics directly to Apache
> Kafka in addition to the current, Graphite
> ([Hadoop-9704|https://issues.apache.org/jira/browse/HADOOP-9704]), Ganglia
> and File sinks.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)