hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "li xiang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-14548) Expand how table coprocessor jar and dependency path can be specified
Date Tue, 05 Jul 2016 13:29:11 GMT

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

li xiang commented on HBASE-14548:

Hi Jerry, thanks for the review.

1. I tested FileSytem.isDirectory() by a separate program, against the path with wildcard.
It works as expected for the following inputs, for example, "/user/hbase/*.jar" or "/user/hbase/coprocessor.*",
isDirectory() returns false.
The condition I found which will fail is that suppose the jar file is put as /user/hbase/coprocessor.jar
and "/user/h*" is used as the input. As isDirectory() returns false, the code does not append
"*.jar". FileSystem.globStatus() returns all directories and files starting with "h" under
/user, such as hbase, hive...(if there are). But JarFile followed can not handle a directory.

So I add the logic : For each item globStatus() returned, process file only and skip for directory.
And if all items are directories, throw FileNotFoundException: No file found matching hdfs://xxxx/xxx*

I uploaded v2 for branch 1.2.0 and master to include those changes.

2. Regarding the enhancement on ClassLoaderTestHelper, I opened a new JIRA as https://issues.apache.org/jira/browse/HBASE-16173

> Expand how table coprocessor jar and dependency path can be specified
> ---------------------------------------------------------------------
>                 Key: HBASE-14548
>                 URL: https://issues.apache.org/jira/browse/HBASE-14548
>             Project: HBase
>          Issue Type: Improvement
>          Components: Coprocessors
>    Affects Versions: 1.2.0
>            Reporter: Jerry He
>            Assignee: li xiang
>             Fix For: 2.0.0
>         Attachments: HBASE-14548-1.2.0-v0.patch, HBASE-14548-1.2.0-v1.patch, HBASE-14548-1.2.0-v2.patch,
> Currently you can specify the location of the coprocessor jar in the table coprocessor
> The problem is that it only allows you to specify one jar that implements the coprocessor.
 You will need to either bundle all the dependencies into this jar, or you will need to copy
the dependencies into HBase lib dir.
> The first option may not be ideal sometimes.  The second choice can be troublesome too,
particularly when the hbase region sever node and dirs are dynamically added/created.
> There are a couple things we can expand here.  We can allow the coprocessor attribute
to specify a directory location, probably on hdfs.
> We may even allow some wildcard in there.

This message was sent by Atlassian JIRA

View raw message