busbey commented on a change in pull request #921: HBASE-22749: Distributed MOB
compactions
URL: https://github.com/apache/hbase/pull/921#discussion_r358597733
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/mob/DefaultMobStoreCompactor.java
##########
@@ -104,54 +150,69 @@ public DefaultMobStoreCompactor(Configuration conf,
HStore store) {
}
@Override
- public List<Path> compact(CompactionRequestImpl request,
ThroughputController throughputController,
- User user) throws IOException {
+ public List<Path> compact(CompactionRequestImpl request,
+ ThroughputController throughputController, User user) throws IOException
{
+ LOG.info("Mob compaction: major=" + request.isMajor() + " isAll=" +
request.isAllFiles()
+ + " priority=" + request.getPriority());
+ if (request.getPriority() == HStore.PRIORITY_USER) {
+ userRequest.set(Boolean.TRUE);
+ } else {
+ userRequest.set(Boolean.FALSE);
+ }
+ LOG.info("Mob compaction files: " + request.getFiles());
+ // Check if I/O optimized MOB compaction
+ if (conf.get(MobConstants.MOB_COMPACTION_TYPE_KEY,
MobConstants.DEFAULT_MOB_COMPACTION_TYPE)
+ .equals(MobConstants.IO_OPTIMIZED_MOB_COMPACTION_TYPE)) {
+ if (request.isMajor() && request.getPriority() == HStore.PRIORITY_USER) {
+ Path mobDir =
+ MobUtils.getMobFamilyPath(conf, store.getTableName(),
store.getColumnFamilyName());
+ List<Path> mobFiles =
MobUtils.getReferencedMobFiles(request.getFiles(), mobDir);
+ if (mobFiles.size() > 0) {
+ calculateMobLengthMap(mobFiles);
+ }
+ LOG.info("I/O optimized MOB compaction. Total referenced MOB files:
{}", mobFiles.size());
Review comment:
log region name and store name
----------------------------------------------------------------
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