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

Mike Drob commented on HBASE-18601:
-----------------------------------

Do we need null checks in {{IntegrationTestSendTraceRequests}}

We could probably refactor stuff out to have a createTrace method so that the 
null checks are consolidated?

Something like...

{code}
class TraceUtil {
  TraceScope createTrace(String description) {
    Tracer tracer = Tracer.curThreadTracer();
    return (tracer == null) ? null : tracer.newScope(description);
  }
}
{code}

Then we can do try-with-resources in lots of places:
{code}
try (TraceScope scope = TraceUtil.createTrace("action")) {
  // process
}
{code}
because that will correctly handle null resource returned for when it is time 
to close it.

Even if we don't use try blocks, it's still less change and cruft inline right 
now. I understand this is largely mechanical changes, but I don't want to 
create more work for us down the line since we _know_ this will be changing 
again soon.


We're dropping all tracing from IPC? Is that correct? Let's file a JIRA for 
improving the tracing story that we can have as a follow up to this and record 
notes like this in there. Maybe it will be a good GSOC project for somebody?

In AbstractFSWAL, I don't think we should be calling detach, should we? That 
seems problematic. It was there before already, this is another thing that gets 
fixed by try-blocks... that might be too much work for this pass though.

What do you think we should do with all your TODO notes about the API changes?

> Update Htrace to 4.2
> --------------------
>
>                 Key: HBASE-18601
>                 URL: https://issues.apache.org/jira/browse/HBASE-18601
>             Project: HBase
>          Issue Type: Task
>    Affects Versions: 2.0.0, 3.0.0
>            Reporter: Tamas Penzes
>            Assignee: stack
>             Fix For: 2.0.0-alpha-3
>
>         Attachments: HBASE-18601.master.001.patch, 
> HBASE-18601.master.002.patch
>
>
> HTrace is not perfectly integrated into HBase, the version 3.2.0 is buggy, 
> the upgrade to 4.x is not trivial and would take time. It might not worth to 
> keep it in this state, so would be better to remove it.
> Of course it doesn't mean tracing would be useless, just that in this form 
> the use of HTrace 3.2 might not add any value to the project and fixing it 
> would be far too much effort.
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Based on the decision of the community we keep htrace now and update version



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to