You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Andrew Purtell (JIRA)" <ji...@apache.org> on 2015/07/18 02:09:04 UTC

[jira] [Comment Edited] (HBASE-13706) CoprocessorClassLoader should not exempt Hive classes

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

Andrew Purtell edited comment on HBASE-13706 at 7/18/15 12:08 AM:
------------------------------------------------------------------

I think the current patch has the wrong approach. That's what I was getting at when I said 
bq. HBase doesn't know anything about Hive, nor should it.

Here we have 
{code}
+  private static final String[] CLASS_PREFIX_NO_EXEMPTION = new String[] {
+    "org.apache.hadoop.hive"
+  };
{code}

What makes this package name special? What about the essentially infinite other variations of org.apache.* that are not the Hadoop and HBase classes we only want to exempt?

We should whitelist packages for exemption. This whitelist is something we can maintain. The inverse is such a large space it's inherently unmaintainable.


was (Author: apurtell):
I think the current patch has the wrong approach. That's what I was getting at when I said 
bq. HBase doesn't know anything about Hive, nor should it.

Here we have 
{code}
+  private static final String[] CLASS_PREFIX_NO_EXEMPTION = new String[] {
+    "org.apache.hadoop.hive"
+  };
{code}

What makes this package name special? What about the potentially infinite other variations of org.apache.* that are not the Hadoop and HBase classes we only want to exempt?

We should whitelist packages for exemption. This whitelist is something we can maintain. The inverse is such a large space it's inherently unmaintainable.

> CoprocessorClassLoader should not exempt Hive classes
> -----------------------------------------------------
>
>                 Key: HBASE-13706
>                 URL: https://issues.apache.org/jira/browse/HBASE-13706
>             Project: HBase
>          Issue Type: Bug
>          Components: Coprocessors
>    Affects Versions: 2.0.0, 1.0.1, 1.1.0, 0.98.12
>            Reporter: Jerry He
>            Assignee: Jerry He
>            Priority: Minor
>             Fix For: 2.0.0, 0.98.14, 1.0.2, 1.1.2
>
>         Attachments: HBASE-13706.patch
>
>
> CoprocessorClassLoader is used to load classes from the coprocessor jar.
> Certain classes are exempt from being loaded by this ClassLoader, which means they will be ignored in the coprocessor jar, but loaded from parent classpath instead.
> One problem is that we categorically exempt "org.apache.hadoop".
> But it happens that Hive packages start with "org.apache.hadoop".
> There is no reason to exclude hive classes from theCoprocessorClassLoader.
> HBase does not even include Hive jars.



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