Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-13428 [DOC] Migration to hbase-2.0.0
  3. HBASE-19567

ClassNotFoundException: org.apache.hadoop.hbase.KeyValue$RawBytesComparator starting 2.0.0 over a 0.98.25 data.

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0-beta-1, 2.0.0
    • HFile
    • None

    Description

      Starting branch-2 over a 0.98.25 data:

      382603 2017-12-19 21:25:08,333 DEBUG [StoreOpener-8e6e2b71d8a413561d9103b0cb6e4686-1] regionserver.HStore: loaded hdfs://ve0524.halxg.cloudera.com:8020/hbase/data/default/ycsb/8e6e2b71d8a413561d9103b0cb6e4686/family/3633fe2e03ad4cceb0d2018f1f0d76da, isReference=false, isBulkLoadResult=false, seqid=341101 6, majorCompaction=false
      382604 2017-12-19 21:25:08,339 DEBUG [StoreFileOpenerThread-family-1] hfile.HFile: Opening HFile v2 with v3 reader
      382605 2017-12-19 21:25:08,342 ERROR [StoreFileOpenerThread-family-1] regionserver.StoreFileReader: Error reading bloom filter meta for GENERAL_BLOOM_META – proceeding without
      382606 java.io.IOException: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.KeyValue$RawBytesComparator
      382607 at org.apache.hadoop.hbase.io.hfile.FixedFileTrailer.getComparatorClass(FixedFileTrailer.java:583)
      382608 at org.apache.hadoop.hbase.io.hfile.FixedFileTrailer.createComparator(FixedFileTrailer.java:592)
      382609 at org.apache.hadoop.hbase.io.hfile.CompoundBloomFilter.<init>(CompoundBloomFilter.java:79)
      382610 at org.apache.hadoop.hbase.util.BloomFilterFactory.createFromMeta(BloomFilterFactory.java:104)
      382611 at org.apache.hadoop.hbase.regionserver.StoreFileReader.loadBloomfilter(StoreFileReader.java:480)
      382612 at org.apache.hadoop.hbase.regionserver.HStoreFile.open(HStoreFile.java:426)
      382613 at org.apache.hadoop.hbase.regionserver.HStoreFile.initReader(HStoreFile.java:461)
      382614 at org.apache.hadoop.hbase.regionserver.HStore.createStoreFileAndReader(HStore.java:665)
      382615 at org.apache.hadoop.hbase.regionserver.HStore.lambda$openStoreFiles$0(HStore.java:533)
      382616 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      382617 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      382618 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      382619 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      382620 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      382621 at java.lang.Thread.run(Thread.java:745)
      382622 Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.KeyValue$RawBytesComparator
      382623 at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      382624 at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      382625 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
      382626 at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      382627 at java.lang.Class.forName0(Native Method)
      382628 at java.lang.Class.forName(Class.java:264)
      382629 at org.apache.hadoop.hbase.io.hfile.FixedFileTrailer.getComparatorClass(FixedFileTrailer.java:581)
      382630 ... 14 more

      Ram suggested a one-liner. I tried it and it seems to work.

      diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/FixedFileTrailer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/FixedFileTrailer.java
      index 672919d..1a22cd6 100644
      — a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/FixedFileTrailer.java
      +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/FixedFileTrailer.java
      @@ -570,7 +570,7 @@ public class FixedFileTrailer {

      (comparatorClassName
      .equals("org.apache.hadoop.hbase.CellComparator$MetaCellComparator"))) { comparatorKlass = MetaCellComparator.class; - }

      else if (comparatorClassName.equals("org.apache.hadoop.hbase.KeyValue.RawBytesComparator")
      + } else if (comparatorClassName.equals("org.apache.hadoop.hbase.KeyValue$RawBytesComparator")

      comparatorClassName.equals("org.apache.hadoop.hbase.util.Bytes$ByteArrayComparator")) {
      // When the comparator to be used is Bytes.BYTES_RAWCOMPARATOR, we just return null from here
      // Bytes.BYTES_RAWCOMPARATOR is not a CellComparator

      Attachments

        1. 19567.patch
          2 kB
          Michael Stack

        Activity

          People

            stack Michael Stack
            stack Michael Stack
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: