jojochuang commented on code in PR #9663:
URL: https://github.com/apache/ozone/pull/9663#discussion_r2897778772


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/CompactDBService.java:
##########
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.ozone.om.service;
-
-import java.io.IOException;
-import java.util.concurrent.CompletableFuture;
-import org.apache.hadoop.hdds.utils.db.RDBStore;
-import org.apache.hadoop.hdds.utils.db.RocksDatabase;
-import org.apache.hadoop.hdds.utils.db.managed.ManagedCompactRangeOptions;
-import org.apache.hadoop.ozone.om.OzoneManager;
-import org.apache.hadoop.util.Time;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * This service issues a compaction request for a column family of om.db.
- */
-public class CompactDBService {
-  private static final Logger LOG = LoggerFactory.getLogger(
-      CompactDBService.class);
-  private final OzoneManager om;
-
-  public CompactDBService(OzoneManager ozoneManager) {
-    this.om = ozoneManager;
-  }
-
-  public CompletableFuture<Void> compact(String columnFamily) throws
-      IOException {
-    return CompletableFuture.supplyAsync(() -> {
-      try {
-        return compactAsync(columnFamily);
-      } catch (Exception e) {
-        LOG.warn("Failed to compact column family: {}", columnFamily, e);
-      }
-      return null;
-    });
-  }
-
-  private Void compactAsync(String columnFamilyName) throws IOException {
-    LOG.info("Compacting column family: {}", columnFamilyName);
-    long startTime = Time.monotonicNow();
-    ManagedCompactRangeOptions options =
-        new ManagedCompactRangeOptions();
-    options.setBottommostLevelCompaction(

Review Comment:
   i noted here, that unlike CompactDBUtil.compactTable(),  it did not use 
   
   `options.setExclusiveManualCompaction(true);`
   
   this is fine but just like to point out for future reference. Having this 
option set to true, makes manual compaction more deterministic.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to