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

stack commented on HBASE-15638:
-------------------------------

The TestInterfaceAudienceAnnotations is interesting. It is shaded pb not being 
available at test time when ClassFinder iterates over classes on CLASSPATH 
(ClassFinder goes to the system classloader explicitly). Messing, I've tried a 
few things: 1. changing the hbase-protocol phase that shading runs at but it 
won't let me... it wants to run at package phase (which makes sense when you 
think about it) which is a phase that comes AFTER test phase; 2. moving this 
test out to hbase-it (Sean idea) only now the CLASSPATH has other pollution in 
it and so a bunch of cleanup of annotations to do in tests BUT we really want 
this class as part of our unit test run because it is great at ensuring code 
gets proper annotations on checkin (it'll fail if missing).

So, I have some hackery in the test that rules out classes that user pb. They 
fail to load with NoClassDefFoundException. That should be ok for stuff like 
CPs. Interesting though, we stumble in a good few places which makes me want to 
revisit my pb cleanup project, the one that narrows the places where we make 
explicit reference to pb. In particular, above I worked on changing 
ServiceException to IOEs but shied from committing this afraid I'd end up 
overcatching. I'm going to redo this project in a separate subissue; talking to 
[~mbertozzi], he pointed out that I went down below Connection where 
ServiceException is thrown, then I could safely make the change/cleanup.

This above hackery brought to the fore what are we to do with our Endpoint CP 
Service; i.e. the subissue HBASE-16264. Let me make comments over there.

> Shade protobuf
> --------------
>
>                 Key: HBASE-15638
>                 URL: https://issues.apache.org/jira/browse/HBASE-15638
>             Project: HBase
>          Issue Type: Bug
>          Components: Protobufs
>            Reporter: stack
>            Assignee: stack
>            Priority: Critical
>         Attachments: 15638v2.patch, HBASE-15638.master.001.patch, 
> HBASE-15638.master.002.patch, HBASE-15638.master.003 (1).patch, 
> HBASE-15638.master.003 (1).patch, HBASE-15638.master.003 (1).patch, 
> HBASE-15638.master.003.patch, HBASE-15638.master.003.patch, 
> HBASE-15638.master.004.patch, HBASE-15638.master.005.patch, 
> HBASE-15638.master.006.patch, HBASE-15638.master.007.patch, 
> HBASE-15638.master.007.patch, HBASE-15638.master.008.patch, 
> as.far.as.server.patch
>
>
> Shade protobufs so we can move to a different version without breaking the 
> world. We want to get up on pb3 because it has unsafe methods that allow us 
> save on copies; it also has some means of dealing with BBs so we can pass it 
> offheap DBBs. We'll probably want to change PB3 to open it up some more too 
> so we can stay offheap as we traverse PB. This issue comes of [~anoop.hbase] 
> and [~ram_krish]'s offheaping of the readpath work.
> This change is mostly straight-forward but there are some tricky bits:
>  # How to interface with HDFS? It wants its ByteStrings. Here in particular 
> in FanOutOneBlockAsyncDFSOutputSaslHelper:
> {code}
>       if (payload != null) {
>         builder.setPayload(ByteString.copyFrom(payload));
>       }
> {code}
>  # [~busbey] also points out that we need to take care of endpoints done as 
> pb. Test at least.
> Let me raise this one on the dev list too.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to