Skip to content

NPE in IdxRegion.IdxRegionScanner/KeyProvider with HBase 0.20.5 #7

@jbaldassari

Description

@jbaldassari

Between HBase-0.20.4 and HBase-0.20.5 the method HRegion.RegionScanner.initHeap() was removed, and the code that was previously in that method was moved into the HRegion.RegionScanner constructor. As a result of this change, IdxRegion.IdxRegionScanner fails to initialize properly.

The problem is that lines 318-321 in IdxRegion check if storeHeap == null, and the KeyProvider instance is only initialized if that condition is true. But storeHeap is never null because it is initialized in the HRegion.RegionScanner constructor, so the KeyProvider never gets initialized, and any methods called on it throw NPE because memstoreHeap is null.

The fix is simple, and I have a patch that I'll attach shortly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions