[ 
https://issues.apache.org/jira/browse/HBASE-20135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sakthi updated HBASE-20135:
---------------------------
    Attachment: hbase-20135.master.001.patch

> NullPointerException during reading bloom filter when upgraded from hbase-1 
> to hbase-2
> --------------------------------------------------------------------------------------
>
>                 Key: HBASE-20135
>                 URL: https://issues.apache.org/jira/browse/HBASE-20135
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-beta-2
>            Reporter: Umesh Agashe
>            Assignee: Sakthi
>            Priority: Minor
>             Fix For: 2.0.0
>
>         Attachments: hbase-20135.master.001.patch
>
>
> When upgraded from hbase-1 to hbase-2, found following exception logged 
> multiple times in the log:
> {code:java}
> ERROR [StoreFileOpenerThread-test_cf-1] regionserver.StoreFileReader: Error 
> reading bloom filter meta for GENERAL_BLOOM_META -- proceeding without
> java.io.IOException: Comparator class 
> org.apache.hadoop.hbase.KeyValue$RawBytesComparator is not instantiable
>         at 
> org.apache.hadoop.hbase.io.hfile.FixedFileTrailer.createComparator(FixedFileTrailer.java:628)
>         at 
> org.apache.hadoop.hbase.io.hfile.CompoundBloomFilter.<init>(CompoundBloomFilter.java:79)
>         at 
> org.apache.hadoop.hbase.util.BloomFilterFactory.createFromMeta(BloomFilterFactory.java:104)
>         at 
> org.apache.hadoop.hbase.regionserver.StoreFileReader.loadBloomfilter(StoreFileReader.java:479)
>         at 
> org.apache.hadoop.hbase.regionserver.HStoreFile.open(HStoreFile.java:425)
>         at 
> org.apache.hadoop.hbase.regionserver.HStoreFile.initReader(HStoreFile.java:460)
>         at 
> org.apache.hadoop.hbase.regionserver.HStore.createStoreFileAndReader(HStore.java:671)
>         at 
> org.apache.hadoop.hbase.regionserver.HStore.lambda$openStoreFiles$0(HStore.java:537)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>         at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.NullPointerException{code}
>  
> Analysis from [~anoop.hbase]:
> Checking the related code.  There seems no issue..  We are not going
> to even fail reading the bloom.  In 2.0 code base we expect the
> comparator class name to be null.  But in 1.x we write old KV based
> Raw Bytes comparator class name.  So reading that back, we will return
> class name as null and we get NPE it looks like.
> {code:java}
>  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
>       comparatorKlass = null;
>     }
> {code}
> We can better do a null check before trying the comparator class
> instantiation so that we can avoid this scary error logs



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to