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

FixedFileTrailer should recognize CellComparatorImpl class in branch-1.x

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • None
    • 1.4.0, 1.3.2, 1.1.13, 1.2.7
    • HFile
    • None
    • Reviewed
    • Hide
      FixedFileTrailer#getComparatorClass() recognizes CellComparatorImpl and CellComparatorImpl$MetaCellComparator classes.

      This is for rolling upgrade from 1.x release to 2.0 release.
      Show
      FixedFileTrailer#getComparatorClass() recognizes CellComparatorImpl and CellComparatorImpl$MetaCellComparator classes. This is for rolling upgrade from 1.x release to 2.0 release.

    Description

      HBASE-18945 has gone into branch-2 .
      Let's consider rolling upgrade scenario from 1.x to 2.0 where there're three servers: s1, s2, s3

      s1 is upgraded to 2.0 first. It flushes to hfile in region r1 with CellComparatorImpl written in the hfile trailer.
      Somehow s1 crashes and master assigns r1 to s2 which is still running 1.x
      The following code in FixedFileTrailer would be triggered:

            try {
              comparatorKlass = (Class<? extends CellComparator>) Class.forName(comparatorClassName);
            } catch (ClassNotFoundException e) {
              throw new IOException(e);
            }
      

      since s2 is not aware of CellComparatorImpl.

      This issue is to backport CellComparatorImpl related change to branch-1.x
      Note: CellComparatorImpl wouldn't be used in write path, only in read path.

      Attachments

        1. 19052.branch-1.txt
          2 kB
          Ted Yu

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: