[
https://issues.apache.org/jira/browse/HTRACE-274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14942570#comment-14942570
]
Colin Patrick McCabe commented on HTRACE-274:
---------------------------------------------
I'm not really a fan of this code snippet (it should be using a condition
variable or something, not just busy-waiting). It could definitely be
improved. I don't think it's long enough to really put into a common function
in a useful way, though. If you strip out the comments and try/catch
boilerplate it's just 3 or 4 lines.
> XSpanReceiver code duplication
> ------------------------------
>
> Key: HTRACE-274
> URL: https://issues.apache.org/jira/browse/HTRACE-274
> Project: HTrace
> Issue Type: Bug
> Components: hbase, zipkin
> Reporter: Cosmin Lehene
> Priority: Blocker
> Fix For: 4.1
>
>
> https://github.com/apache/incubator-htrace/blob/master/htrace-zipkin/src/main/java/org/apache/htrace/impl/ZipkinSpanReceiver.java#L239-L255
> https://github.com/apache/incubator-htrace/blob/master/htrace-hbase/src/main/java/org/apache/htrace/impl/HBaseSpanReceiver.java#L175-L191
> Doing a code duplication analysis revealed several others. I'm thinking we
> should add pmd (http://maven.apache.org/plugins/maven-pmd-plugin/) and
> perhaps Sonar.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)