You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/12/23 06:16:01 UTC

[GitHub] [hbase] saintstack commented on a change in pull request #2800: HBASE-25249 Adding HStoreContext

saintstack commented on a change in pull request #2800:
URL: https://github.com/apache/hbase/pull/2800#discussion_r547688417



##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreUtils.java
##########
@@ -136,4 +140,26 @@ public static OptionalLong getMaxSequenceIdInList(Collection<HStoreFile> sfs) {
     return largestFile.isPresent() ? StoreUtils.getFileSplitPoint(largestFile.get(), comparator)
         : Optional.empty();
   }
+
+  /**
+   * Returns the configured checksum algorithm.
+   * @param conf The configuration
+   * @return The checksum algorithm that is set in the configuration
+   */
+  public static ChecksumType getChecksumType(Configuration conf) {
+    String checksumName = conf.get(HConstants.CHECKSUM_TYPE_NAME);

Review comment:
       You don't want to do get
   
   return ChecksymType.nameToType(conf.get(HConstants.CHECKSUM_TYPE_NAME, DEFAULT_WHATEVER_IT_IS));
   
   Is this a candidate for StoreContext? (Perhaps if called frequently). Perhaps StoreContext is not available where this is used?

##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
##########
@@ -246,6 +234,8 @@
   private AtomicLong compactedCellsSize = new AtomicLong();
   private AtomicLong majorCompactedCellsSize = new AtomicLong();
 
+  private HStoreContext storeContext;

Review comment:
       Yeah, just trying to understand why. You want to swap out the HStore implementation or something?

##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
##########
@@ -246,6 +234,8 @@
   private AtomicLong compactedCellsSize = new AtomicLong();
   private AtomicLong majorCompactedCellsSize = new AtomicLong();
 
+  private HStoreContext storeContext;

Review comment:
       Why introduce an StoreContext? Isn't that what a Store is? Store spans files.
   
   (We need the 'H' in HStoreContext?)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org