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

stack commented on HBASE-16264:
-------------------------------

Took a while, but Tactic #2 where I define my own system classloader, shade pb 
in own module, and intercept loadings of com.google.protobuf and adjust the 
naming to refer to shaded Classes is stuck on java.lang.NoClassDefFoundError. 
Here is first interception:

{code}
461 RCL loading relocated com.google.protobuf.RpcCallback as 
"org.apache.hadoop.hbase.shaded.com.google.protobuf.RpcCallback"
462 [Loaded org.apache.hadoop.hbase.shaded.com.google.protobuf.RpcCallback from 
file:/Users/stack/checkouts/hbase.git/hbase-shaded-libs/target/hbase-shaded-libs-2.0.0-SNAPSHOT.jar]
463 [Loaded java.lang.NoSuchMethodException from 
/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/rt.jar]
464 Error: A JNI error has occurred, please check your installation and try 
again
465 Exception in thread "main" [Loaded java.lang.Throwable$PrintStreamOrWriter 
from 
/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/rt.jar]
466 [Loaded java.lang.Throwable$WrappedPrintStream from 
/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/rt.jar]
467 [Loaded java.util.IdentityHashMap from 
/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/rt.jar]
468 [Loaded java.util.IdentityHashMap$KeySet from 
/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/rt.jar]
469 java.lang.NoClassDefFoundError: com/google/protobuf/RpcCallback
470   at java.lang.Class.getDeclaredMethods0(Native Method)
471   at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
472   at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
473   at java.lang.Class.getMethod0(Class.java:3018)
474   at java.lang.Class.getMethod(Class.java:1784)
475   at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
476   at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
{code}

It looks good at first. There is reference to original c.g.p... still.

Need to figure this out. We can't change the Table and Admin Interface to 
remove c.g.p.Service; i.e. just purge endpoints. We'll break all clients.


> Figure how to deal with endpoints and shaded pb
> -----------------------------------------------
>
>                 Key: HBASE-16264
>                 URL: https://issues.apache.org/jira/browse/HBASE-16264
>             Project: HBase
>          Issue Type: Sub-task
>          Components: Coprocessors, Protobufs
>            Reporter: stack
>            Assignee: stack
>            Priority: Critical
>             Fix For: 2.0.0
>
>         Attachments: HBASE-16264.master.001.patch, 
> HBASE-16264.master.002.patch, HBASE-16264.master.003.patch, 
> HBASE-16264.master.004.patch, HBASE-16264.master.005.patch, 
> HBASE-16264.master.006.patch, HBASE-16264.master.007.patch
>
>
> Come up w/ a migration plan for coprocessor endpoints when our pb is shaded. 
> Would be sweet if could make it so all just worked. At worst, come up w/ a 
> prescription for how to migrate existing CPs.



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

Reply via email to