busbey commented on a change in pull request #921: HBASE-22749: Distributed MOB 
compactions
URL: https://github.com/apache/hbase/pull/921#discussion_r375521543
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/mob/DefaultMobStoreCompactor.java
 ##########
 @@ -169,6 +241,22 @@ protected boolean performCompaction(FileDetails fd, 
InternalScanner scanner, Cel
     long bytesWrittenProgressForCloseCheck = 0;
     long bytesWrittenProgressForLog = 0;
     long bytesWrittenProgressForShippedCall = 0;
+    // Clear old mob references
+    mobRefSet.get().clear();
+    boolean isUserRequest = userRequest.get();
+    boolean compactMOBs = major && isUserRequest;
+    boolean discardMobMiss = 
conf.getBoolean(MobConstants.MOB_UNSAFE_DISCARD_MISS_KEY,
+      MobConstants.DEFAULT_MOB_DISCARD_MISS);
+    if (discardMobMiss) {
+      LOG.warn("{}=true. This is unsafe setting recommended only"+
+        " during upgrade process from MOB 1.0 to MOB 2.0 versions.",
+        MobConstants.MOB_UNSAFE_DISCARD_MISS_KEY);
+    }
+    long maxMobFileSize = 
conf.getLong(MobConstants.MOB_COMPACTION_MAX_FILE_SIZE_KEY,
+      MobConstants.DEFAULT_MOB_COMPACTION_MAX_FILE_SIZE);
+    LOG.info("Compact MOB={} optimized={} maximum MOB file size={} major={} 
store={}", compactMOBs,
+      ioOptimizedMode, maxMobFileSize, major, getStoreInfo());
+    FileSystem fs = FileSystem.get(conf);
 
 Review comment:
   we should avoid creating FileSystem objects when we already have one. use 
`store.getFileSystem()`

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


With regards,
Apache Git Services

Reply via email to