Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-9183

Compilation against HBase 1.0.0 fails due to missing dependency on high_scale_lib.Counter

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.1.0
    • None
    • None

    Description

      In the HBase 1.0.0 release, org.cliffc.high_scale_lib is no longer used.
      HBaseStorageHandler.java has compile time dependency on high_scale_lib.Counter
      Compilation against HBase 1.0.0 release would fail due to the missing dependency.
      The following change would allow compilation to pass:

      diff --git a/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseStorageHandler.java b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseStorageHandler.java
      index 3218639..6f626f0 100644
      --- a/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseStorageHandler.java
      +++ b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseStorageHandler.java
      @@ -499,8 +499,8 @@ public void configureJobConf(TableDesc tableDesc, JobConf jobConf) {
              * only need TableMapReduceUtil.addDependencyJars(jobConf) here.
              */
             TableMapReduceUtil.addDependencyJars(
      -          jobConf, HBaseStorageHandler.class, TableInputFormatBase.class,
      -          org.cliffc.high_scale_lib.Counter.class); // this will be removed for HBase 1.0
      +          jobConf, HBaseStorageHandler.class, TableInputFormatBase.class);
      +          // org.cliffc.high_scale_lib.Counter.class); this will be removed for HBase 1.0
             Set<String> merged = new LinkedHashSet<String>(jobConf.getStringCollection("tmpjars"));
      
             Job copy = new Job(jobConf);
      

      However, loading of high_scale_lib.Counter should be done at runtime so that 0.98 and 1.0 releases are both supported.

      Attachments

        1. HIVE-9183.patch
          2 kB
          Ted Yu
        2. HIVE-9183.patch
          3 kB
          Ted Yu
        3. HIVE-9183-001.patch
          3 kB
          Ted Yu

        Activity

          People

            yuzhihong@gmail.com Ted Yu
            yuzhihong@gmail.com Ted Yu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: