busbey commented on a change in pull request #921: HBASE-22749: Distributed MOB
compactions
URL: https://github.com/apache/hbase/pull/921#discussion_r358594263
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/mob/DefaultMobStoreCompactor.java
##########
@@ -52,22 +61,59 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.apache.hbase.thirdparty.com.google.common.collect.Lists;
+
/**
* Compact passed set of files in the mob-enabled column family.
*/
@InterfaceAudience.Private
public class DefaultMobStoreCompactor extends DefaultCompactor {
private static final Logger LOG =
LoggerFactory.getLogger(DefaultMobStoreCompactor.class);
- private long mobSizeThreshold;
- private HMobStore mobStore;
+ protected long mobSizeThreshold;
+ protected HMobStore mobStore;
+
+ /*
+ * MOB file reference set thread local variable. It contains set of a MOB
file names, which newly
+ * compacted store file has references to. This variable is populated during
compaction and the
+ * content of it is written into meta section of a newly created store file
at the final step of
+ * compaction process.
+ */
+
+ static ThreadLocal<Set<String>> mobRefSet = new ThreadLocal<Set<String>>() {
+ @Override
+ protected Set<String> initialValue() {
+ return new HashSet<String>();
+ }
+ };
+
+ /*
+ * Is it user or system-originated request.
+ */
+
+ static ThreadLocal<Boolean> userRequest = new ThreadLocal<Boolean>() {
+ @Override
+ protected Boolean initialValue() {
+ return Boolean.FALSE;
+ }
+ };
+
+ /*
+ * Map : MOB file name - file length Can be expensive for large amount of
MOB files?
Review comment:
nit: drop the question mark
----------------------------------------------------------------
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