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



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
##########
@@ -331,11 +332,11 @@ protected HStore(final HRegion region, final 
ColumnFamilyDescriptor family,
       confPrintThreshold = 10;
     }
     this.parallelPutCountPrintThreshold = confPrintThreshold;
-    LOG.info("Store={},  memstore type={}, storagePolicy={}, 
verifyBulkLoads={}, "
-            + "parallelPutCountPrintThreshold={}, encoding={}, compression={}",
+    LOG.info("Created HStore: Store={},  memstore type={}, storagePolicy={}, 
verifyBulkLoads={}, "

Review comment:
       Why have 'HStore:' in here? Instead of 'Created HStore: Store=', just 
have 'Created '.

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
##########
@@ -276,7 +276,8 @@ protected HStore(final HRegion region, final 
ColumnFamilyDescriptor family,
     // used by ScanQueryMatcher
     long timeToPurgeDeletes =
         Math.max(conf.getLong("hbase.hstore.time.to.purge.deletes", 0), 0);
-    LOG.trace("Time to purge deletes set to {}ms in store {}", 
timeToPurgeDeletes, this);
+    LOG.trace("Time to purge deletes set to {}ms in store {} in region {}", 
timeToPurgeDeletes,

Review comment:
       I like what @anoopsjohn  says. toString could be 
encodedRegionName/store-name (region name is too much -- could be anything 
given it includes start key... could be a spew of binary characters....)

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
##########
@@ -331,11 +332,11 @@ protected HStore(final HRegion region, final 
ColumnFamilyDescriptor family,
       confPrintThreshold = 10;
     }
     this.parallelPutCountPrintThreshold = confPrintThreshold;
-    LOG.info("Store={},  memstore type={}, storagePolicy={}, 
verifyBulkLoads={}, "
-            + "parallelPutCountPrintThreshold={}, encoding={}, compression={}",
+    LOG.info("Created HStore: Store={},  memstore type={}, storagePolicy={}, 
verifyBulkLoads={}, "
+            + "parallelPutCountPrintThreshold={}, encoding={}, compression={} 
in region {}",
         getColumnFamilyName(), memstore.getClass().getSimpleName(), 
policyName, verifyBulkLoads,
         parallelPutCountPrintThreshold, family.getDataBlockEncoding(),
-        family.getCompressionType());
+        family.getCompressionType(), getRegionInfo().getRegionNameAsString());

Review comment:
       Encoded name, not full name.

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
##########
@@ -276,7 +276,8 @@ protected HStore(final HRegion region, final 
ColumnFamilyDescriptor family,
     // used by ScanQueryMatcher
     long timeToPurgeDeletes =
         Math.max(conf.getLong("hbase.hstore.time.to.purge.deletes", 0), 0);
-    LOG.trace("Time to purge deletes set to {}ms in store {}", 
timeToPurgeDeletes, this);
+    LOG.trace("Time to purge deletes set to {}ms in store {} in region {}", 
timeToPurgeDeletes,

Review comment:
       Otherwise I'd comment that no need of words 'store' or 'region' in log 
message; no need of these qualifiers.

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
##########
@@ -1192,8 +1198,10 @@ public StoreFileWriter createWriterInTmp(long 
maxKeyCount, Compression.Algorithm
       if (shouldCacheDataOnWrite) {
         writerCacheConf.enableCacheOnWrite();
         if (!cacheOnWriteLogged) {
-          LOG.info("For Store {} , cacheDataOnWrite is true, hence enabled 
cacheOnWrite for " +
-            "Index blocks and Bloom filter blocks", getColumnFamilyName());
+          LOG.info("For Store {} in region {}, " +

Review comment:
       No need of 'Store' or 'region'... its obvious that we're talking store 
and region. Having these works in there bulk up logging and make it harder to 
read/parse.




----------------------------------------------------------------
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