Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-23147

Branches-1 shaded artifact for mapreduce integration misses MainClass

Add voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.5.0, 1.3.6, 1.4.11
    • Fix Version/s: 1.7.0
    • Component/s: Client, mapreduce
    • Labels:

      Description

      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:

      $ 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)
      

      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

      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)
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              busbey Sean Busbey

              Dates

              • Created:
                Updated:

                Issue deployment