Sean Busbey created HBASE-23147:
-----------------------------------

             Summary: 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
             Fix For: 1.6.0, 1.5.1


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)

Reply via email to