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:
[email protected]


Reply via email to