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

deprecate TableMapReduce.addDependencyJars(Configuration, class<?> ...)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.3.0, 2.0.0
    • mapreduce
    • None
    • The MapReduce helper function `TableMapReduce.addDependencyJars(Configuration, class<?> ...)` has been deprecated since it is easy to use incorrectly. Most users should rely on addDependencyJars(Job) instead.

    Description

      We expose two public static methods names addDependencyJars. One of them, void addDependencyJars(Job, is very helpful – goes out of its way to detect job dependencies as well as shipping all the necessary HBase dependencies. The other is shfty and nefarious, void addDependencyJars(Configuration, Class<?>...) – it only adds exactly what the user requests, forcing them to resolve dependencies themselves and giving a false sense of security. We should deprecate the latter throw a big giant warning when people use that one. The handy functionality of providing help when our heuristics fail can be added via a new method signature, something like void addDependencyJars(Job, Class<?> .... This method would do everything void addDependencyJars(Job does, plus let the user specify arbitrary additional classes. That way HBase still can help the user, but also gives them super-powers to compensate for when our heuristics fail.

      For reference, this appears to be the reason why HBase + Pig doesn't really work out of the box. See HBaseStorage.java

      Attachments

        1. HBASE-8386.1.patch
          17 kB
          Sean Busbey

        Issue Links

          Activity

            People

              busbey Sean Busbey
              ndimiduk Nick Dimiduk
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: