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

A "NullPointerException" could be thrown; "Result" is nullable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 2.1.4
    • None
    • Client
    • None

    Description

      In hbase-client model the class  "org.apache.hadoop.hbase.MetaTableAccessor"'s method getRegionInfo(final Result r, byte [] qualifier),A "NullPointerException" could be thrown; "r" is nullable here.

       

      @Nullable
      private static RegionInfo getRegionInfo(final Result r, byte [] qualifier) {
        Cell cell = r.getColumnLatestCell(getCatalogFamily(), qualifier);
        if (cell == null) return null;
        return RegionInfo.parseFromOrNull(cell.getValueArray(),
          cell.getValueOffset(), cell.getValueLength());
      }
      

       

      Attachments

        1. HBASE-22461.patch
          1 kB
          wuguihu

        Issue Links

          Activity

            People

              Unassigned Unassigned
              hapihu wuguihu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: