You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Duo Zhang (Jira)" <ji...@apache.org> on 2020/08/23 14:36:00 UTC

[jira] [Updated] (HBASE-23147) Branches-1 shaded artifact for mapreduce integration misses MainClass

     [ https://issues.apache.org/jira/browse/HBASE-23147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Duo Zhang updated HBASE-23147:
------------------------------
    Fix Version/s:     (was: 1.3.7)

> Branches-1 shaded artifact for mapreduce integration misses MainClass
> ---------------------------------------------------------------------
>
>                 Key: HBASE-23147
>                 URL: https://issues.apache.org/jira/browse/HBASE-23147
>             Project: HBase
>          Issue Type: Bug
>          Components: Client, mapreduce
>    Affects Versions: 1.5.0, 1.3.6, 1.4.11
>            Reporter: Sean Busbey
>            Priority: Major
>              Labels: beginner
>             Fix For: 1.7.0
>
>
> the shaded artifact we intend for folks to use when doing mapreduce stuff in branches-1 is {{hbase-shaded-server}}, but it fails to define the same {{MainClass}} for the jar as the {{hbase-server}} artifact. This prevents commands like this from working:
> {code}
> $ hadoop  jar some/path/to/hbase-shaded-server-1.4.11-SNAPSHOT.jar importtsv -Dimporttsv.columns=HBASE_ROW_KEY,family1:column1,family1:column4,family1:column3 test:example example/ -libjars $(hbase mapredcp)
> Exception in thread "main" java.lang.ClassNotFoundException: importtsv
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:348)
>         at org.apache.hadoop.util.RunJar.run(RunJar.java:232)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:153)
> {code}
> The {{hbase-shaded-server}} module pom should have the same maven-jar-plugin config for setting the main class as the {{hbase-server}} module.
> This is not an issue in branches-2+ because as a part of moving this stuff into a {{hbase-mapreduce}} and {{hbase-shaded-mapreduce}} (HBASE-18697) we corrected this gap on the shaded artifact.
> Work around by specifying the class manually
> {code}
> hadoop jar some/path/to/hbase-shaded-server-1.4.11-SNAPSHOT.jar org.apache.hadoop.hbase.mapreduce.Driver importtsv -Dimporttsv.columns=HBASE_ROW_KEY,family1:column1,family1:column4,family1:column3 test:example example/ -libjars $(hbase mapredcp)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)