Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-18169 Coprocessor fix and cleanup before 2.0.0 release
  3. HBASE-18825

Use HStoreFile instead of StoreFile in our own code base and remove unnecessary methods in StoreFile interface

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0-alpha-1, 2.0.0-alpha-3
    • 2.0.0-alpha-4, 2.0.0
    • Coprocessors
    • None
    • Incompatible change, Reviewed
    • Hide
      Cleanup the StoreFile interface.

      The metadata keys are moved to HStoreFile.

      These methods are removed:
      CacheConfig getCacheConf();
      byte[] getMetadataValue(byte[] key);
      boolean isCompactedAway();
      boolean isReferencedInReads();
      void initReader() throws IOException;
      StoreFileScanner getPreadScanner(boolean cacheBlocks, long readPt, long scannerOrder, boolean canOptimizeForNonNullColumn);
      StoreFileScanner getStreamScanner(boolean canUseDropBehind, boolean cacheBlocks, boolean isCompaction, long readPt, long scannerOrder, boolean canOptimizeForNonNullColumn) throws IOException;
      StoreFileReader getReader();
      void closeReader(boolean evictOnClose) throws IOException;
      void markCompactedAway();
      void deleteReader() throws IOException;

      Notice that these methods are still available in HStoreFile.

      And the return value of getFirstKey and getLastKey are changed from Cell to Optional<Cell> to better indicate that they may not be available.
      Show
      Cleanup the StoreFile interface. The metadata keys are moved to HStoreFile. These methods are removed: CacheConfig getCacheConf(); byte[] getMetadataValue(byte[] key); boolean isCompactedAway(); boolean isReferencedInReads(); void initReader() throws IOException; StoreFileScanner getPreadScanner(boolean cacheBlocks, long readPt, long scannerOrder, boolean canOptimizeForNonNullColumn); StoreFileScanner getStreamScanner(boolean canUseDropBehind, boolean cacheBlocks, boolean isCompaction, long readPt, long scannerOrder, boolean canOptimizeForNonNullColumn) throws IOException; StoreFileReader getReader(); void closeReader(boolean evictOnClose) throws IOException; void markCompactedAway(); void deleteReader() throws IOException; Notice that these methods are still available in HStoreFile. And the return value of getFirstKey and getLastKey are changed from Cell to Optional<Cell> to better indicate that they may not be available.

    Description

      Use generic types to avoid too many casts.

      Attachments

        1. HBASE-18825.patch
          583 kB
          Duo Zhang
        2. HBASE-18825-v1.patch
          700 kB
          Duo Zhang
        3. HBASE-18825-v2.patch
          705 kB
          Duo Zhang
        4. HBASE-18825-v3.patch
          707 kB
          Duo Zhang
        5. HBASE-18825-v3.patch
          707 kB
          Duo Zhang
        6. HBASE-18825-v4.patch
          714 kB
          Duo Zhang
        7. HBASE-18825-v5.patch
          720 kB
          Duo Zhang
        8. HBASE-18825-v6.patch
          722 kB
          Duo Zhang

        Issue Links

          Activity

            People

              zhangduo Duo Zhang
              zhangduo Duo Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: