From 5fc044897f9968d10f197ae6d17e4ca90d41e5a6 Mon Sep 17 00:00:00 2001 From: tejaskriya Date: Mon, 24 Feb 2025 13:11:23 +0530 Subject: [PATCH 1/8] HDDS-12310. Repair command to perform compaction on rocksDB --- .../ozone/repair/RocksDBManualCompaction.java | 100 ++++++++++++++++++ .../hadoop/ozone/repair/om/OMRepair.java | 4 +- .../hadoop/ozone/repair/scm/SCMRepair.java | 4 +- 3 files changed, 106 insertions(+), 2 deletions(-) create mode 100644 hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/RocksDBManualCompaction.java diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/RocksDBManualCompaction.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/RocksDBManualCompaction.java new file mode 100644 index 000000000000..1446dd6ef9d5 --- /dev/null +++ b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/RocksDBManualCompaction.java @@ -0,0 +1,100 @@ +/* + * 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.repair; + +import jakarta.annotation.Nonnull; +import org.apache.hadoop.hdds.cli.HddsVersionProvider; +import org.apache.hadoop.hdds.utils.IOUtils; +import org.apache.hadoop.hdds.utils.db.managed.ManagedRocksDB; +import org.apache.hadoop.ozone.debug.RocksDBUtils; +import org.rocksdb.ColumnFamilyDescriptor; +import org.rocksdb.ColumnFamilyHandle; +import org.rocksdb.RocksDBException; +import picocli.CommandLine; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * Tool to perform compaction on a table. + */ +@CommandLine.Command( + name = "compact", + description = "CLI to compact a table in the DB.", + mixinStandardHelpOptions = true, + versionProvider = HddsVersionProvider.class +) +public class RocksDBManualCompaction extends RepairTool { + + @CommandLine.Option(names = {"--db"}, + required = true, + description = "Database File Path") + private String dbPath; + + @CommandLine.Option(names = {"--column_family", "--column-family", "--cf"}, + required = true, + description = "Table name") + private String columnFamilyName; + + @Override + public void execute() throws Exception { + List cfHandleList = new ArrayList<>(); + List cfDescList = RocksDBUtils.getColumnFamilyDescriptors( + dbPath); + + try (ManagedRocksDB db = ManagedRocksDB.open(dbPath, cfDescList, cfHandleList)) { + ColumnFamilyHandle cfh = RocksDBUtils.getColumnFamilyHandle(columnFamilyName, cfHandleList); + if (cfh == null) { + throw new IllegalArgumentException(columnFamilyName + + " is not in a column family in DB for the given path."); + } + + info("Running compaction on " + (columnFamilyName == null ? "entire DB" : columnFamilyName)); + + if (!isDryRun()) { + db.get().compactRange(cfh); + info("Compaction completed."); + } + } catch (RocksDBException exception) { + error("Failed to compact the RocksDB for the given path: %s, column-family:%s", dbPath, columnFamilyName); + error("Exception: " + exception); + throw new IOException("Failed to compact RocksDB.", exception); + } finally { + IOUtils.closeQuietly(cfHandleList); + } + } + + @Override + @Nonnull + protected Component serviceToBeOffline() { + final String parent = spec().parent().name(); + switch (parent) { + case "om": + return Component.OM; + case "scm": + return Component.SCM; + default: + throw new IllegalStateException("Unknown component: " + parent); + } + } +} diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/OMRepair.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/OMRepair.java index 9b099b79c7b5..ccf60836e7d2 100644 --- a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/OMRepair.java +++ b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/OMRepair.java @@ -18,6 +18,7 @@ package org.apache.hadoop.ozone.repair.om; import org.apache.hadoop.hdds.cli.RepairSubcommand; +import org.apache.hadoop.ozone.repair.RocksDBManualCompaction; import org.apache.hadoop.ozone.repair.TransactionInfoRepair; import org.apache.hadoop.ozone.repair.om.quota.QuotaRepair; import org.kohsuke.MetaInfServices; @@ -31,7 +32,8 @@ FSORepairTool.class, SnapshotRepair.class, TransactionInfoRepair.class, - QuotaRepair.class + QuotaRepair.class, + RocksDBManualCompaction.class }, description = "Operational tool to repair OM.") @MetaInfServices(RepairSubcommand.class) diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/scm/SCMRepair.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/scm/SCMRepair.java index 125ec89561dd..6fe3e36f0b8b 100644 --- a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/scm/SCMRepair.java +++ b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/scm/SCMRepair.java @@ -18,6 +18,7 @@ package org.apache.hadoop.ozone.repair.scm; import org.apache.hadoop.hdds.cli.RepairSubcommand; +import org.apache.hadoop.ozone.repair.RocksDBManualCompaction; import org.apache.hadoop.ozone.repair.TransactionInfoRepair; import org.apache.hadoop.ozone.repair.scm.cert.CertRepair; import org.kohsuke.MetaInfServices; @@ -30,7 +31,8 @@ description = "Operational tool to repair SCM.", subcommands = { CertRepair.class, - TransactionInfoRepair.class + TransactionInfoRepair.class, + RocksDBManualCompaction.class } ) @MetaInfServices(RepairSubcommand.class) From 98d1062ba089c1c2a6ec6a627616184b235405b2 Mon Sep 17 00:00:00 2001 From: tejaskriya Date: Mon, 24 Feb 2025 13:29:32 +0530 Subject: [PATCH 2/8] CHeckstyle fix --- .../hadoop/ozone/repair/RocksDBManualCompaction.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/RocksDBManualCompaction.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/RocksDBManualCompaction.java index 1446dd6ef9d5..80bd8eb10583 100644 --- a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/RocksDBManualCompaction.java +++ b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/RocksDBManualCompaction.java @@ -22,6 +22,9 @@ package org.apache.hadoop.ozone.repair; import jakarta.annotation.Nonnull; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; import org.apache.hadoop.hdds.cli.HddsVersionProvider; import org.apache.hadoop.hdds.utils.IOUtils; import org.apache.hadoop.hdds.utils.db.managed.ManagedRocksDB; @@ -31,10 +34,6 @@ import org.rocksdb.RocksDBException; import picocli.CommandLine; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - /** * Tool to perform compaction on a table. */ From 2e1d0425ef00070c2e50438cffb6f5919e392c25 Mon Sep 17 00:00:00 2001 From: tejaskriya Date: Mon, 24 Feb 2025 13:41:28 +0530 Subject: [PATCH 3/8] Checkstyle fix --- .../ozone/repair/RocksDBManualCompaction.java | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/RocksDBManualCompaction.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/RocksDBManualCompaction.java index 80bd8eb10583..b995947f42ab 100644 --- a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/RocksDBManualCompaction.java +++ b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/RocksDBManualCompaction.java @@ -1,24 +1,20 @@ /* * 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 + * 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 + * 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 + * 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.repair; import jakarta.annotation.Nonnull; From 29f7d1dd992bbfbeb89c066c3b60a09fcf21375b Mon Sep 17 00:00:00 2001 From: tejaskriya Date: Mon, 10 Mar 2025 13:18:45 +0530 Subject: [PATCH 4/8] HDDS-12533. Offline repair command for generic rocksDB compaction --- .../{ => ldb}/RocksDBManualCompaction.java | 34 +++++++------------ .../hadoop/ozone/repair/ldb/package-info.java | 21 ++++++++++++ .../hadoop/ozone/repair/om/OMRepair.java | 4 +-- .../hadoop/ozone/repair/scm/SCMRepair.java | 4 +-- 4 files changed, 35 insertions(+), 28 deletions(-) rename hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/{ => ldb}/RocksDBManualCompaction.java (78%) create mode 100644 hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/ldb/package-info.java diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/RocksDBManualCompaction.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/ldb/RocksDBManualCompaction.java similarity index 78% rename from hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/RocksDBManualCompaction.java rename to hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/ldb/RocksDBManualCompaction.java index b995947f42ab..b20a0d968a28 100644 --- a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/RocksDBManualCompaction.java +++ b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/ldb/RocksDBManualCompaction.java @@ -15,16 +15,17 @@ * limitations under the License. */ -package org.apache.hadoop.ozone.repair; +package org.apache.hadoop.ozone.repair.ldb; -import jakarta.annotation.Nonnull; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.hdds.cli.HddsVersionProvider; import org.apache.hadoop.hdds.utils.IOUtils; +import org.apache.hadoop.hdds.utils.db.managed.ManagedCompactRangeOptions; import org.apache.hadoop.hdds.utils.db.managed.ManagedRocksDB; import org.apache.hadoop.ozone.debug.RocksDBUtils; +import org.apache.hadoop.ozone.repair.RepairTool; import org.rocksdb.ColumnFamilyDescriptor; import org.rocksdb.ColumnFamilyHandle; import org.rocksdb.RocksDBException; @@ -35,7 +36,8 @@ */ @CommandLine.Command( name = "compact", - description = "CLI to compact a table in the DB.", + description = "CLI to compact a column-family in the DB. " + + "Note: If om.db is compacted then it will impact efficient snapshot diff.", mixinStandardHelpOptions = true, versionProvider = HddsVersionProvider.class ) @@ -48,7 +50,7 @@ public class RocksDBManualCompaction extends RepairTool { @CommandLine.Option(names = {"--column_family", "--column-family", "--cf"}, required = true, - description = "Table name") + description = "Column family name") private String columnFamilyName; @Override @@ -64,12 +66,14 @@ public void execute() throws Exception { " is not in a column family in DB for the given path."); } - info("Running compaction on " + (columnFamilyName == null ? "entire DB" : columnFamilyName)); - + info("Running compaction on " + columnFamilyName); if (!isDryRun()) { - db.get().compactRange(cfh); - info("Compaction completed."); + ManagedCompactRangeOptions compactOptions = new ManagedCompactRangeOptions(); + compactOptions.setBottommostLevelCompaction(ManagedCompactRangeOptions.BottommostLevelCompaction.kForce); + db.get().compactRange(cfh, null, null, compactOptions); } + info("Compaction completed."); + } catch (RocksDBException exception) { error("Failed to compact the RocksDB for the given path: %s, column-family:%s", dbPath, columnFamilyName); error("Exception: " + exception); @@ -78,18 +82,4 @@ public void execute() throws Exception { IOUtils.closeQuietly(cfHandleList); } } - - @Override - @Nonnull - protected Component serviceToBeOffline() { - final String parent = spec().parent().name(); - switch (parent) { - case "om": - return Component.OM; - case "scm": - return Component.SCM; - default: - throw new IllegalStateException("Unknown component: " + parent); - } - } } diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/ldb/package-info.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/ldb/package-info.java new file mode 100644 index 000000000000..ae27a7097286 --- /dev/null +++ b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/ldb/package-info.java @@ -0,0 +1,21 @@ +/* + * 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. + */ + +/** + * OM related repair tools. + */ +package org.apache.hadoop.ozone.repair.ldb; diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/OMRepair.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/OMRepair.java index ccf60836e7d2..9b099b79c7b5 100644 --- a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/OMRepair.java +++ b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/OMRepair.java @@ -18,7 +18,6 @@ package org.apache.hadoop.ozone.repair.om; import org.apache.hadoop.hdds.cli.RepairSubcommand; -import org.apache.hadoop.ozone.repair.RocksDBManualCompaction; import org.apache.hadoop.ozone.repair.TransactionInfoRepair; import org.apache.hadoop.ozone.repair.om.quota.QuotaRepair; import org.kohsuke.MetaInfServices; @@ -32,8 +31,7 @@ FSORepairTool.class, SnapshotRepair.class, TransactionInfoRepair.class, - QuotaRepair.class, - RocksDBManualCompaction.class + QuotaRepair.class }, description = "Operational tool to repair OM.") @MetaInfServices(RepairSubcommand.class) diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/scm/SCMRepair.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/scm/SCMRepair.java index 6fe3e36f0b8b..125ec89561dd 100644 --- a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/scm/SCMRepair.java +++ b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/scm/SCMRepair.java @@ -18,7 +18,6 @@ package org.apache.hadoop.ozone.repair.scm; import org.apache.hadoop.hdds.cli.RepairSubcommand; -import org.apache.hadoop.ozone.repair.RocksDBManualCompaction; import org.apache.hadoop.ozone.repair.TransactionInfoRepair; import org.apache.hadoop.ozone.repair.scm.cert.CertRepair; import org.kohsuke.MetaInfServices; @@ -31,8 +30,7 @@ description = "Operational tool to repair SCM.", subcommands = { CertRepair.class, - TransactionInfoRepair.class, - RocksDBManualCompaction.class + TransactionInfoRepair.class } ) @MetaInfServices(RepairSubcommand.class) From 6b6880161f6d555deb1cec525e2bcc3b225449b8 Mon Sep 17 00:00:00 2001 From: tejaskriya Date: Mon, 10 Mar 2025 14:00:54 +0530 Subject: [PATCH 5/8] Add ldb sub command for repair --- .../hadoop/ozone/repair/ldb/LDBRepair.java | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/ldb/LDBRepair.java diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/ldb/LDBRepair.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/ldb/LDBRepair.java new file mode 100644 index 000000000000..2e01866bbe98 --- /dev/null +++ b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/ldb/LDBRepair.java @@ -0,0 +1,35 @@ +/* + * 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.repair.ldb; + +import org.apache.hadoop.hdds.cli.RepairSubcommand; +import org.kohsuke.MetaInfServices; +import picocli.CommandLine; + +/** + * Ozone Repair CLI for ldb. + */ +@CommandLine.Command(name = "ldb", + subcommands = { + RocksDBManualCompaction.class + }, + description = "Operational tool to repair ldb.") +@MetaInfServices(RepairSubcommand.class) +public class LDBRepair implements RepairSubcommand { + +} From 422ba81fcc65122e94d5381090768e5af5796ff6 Mon Sep 17 00:00:00 2001 From: tejaskriya Date: Thu, 13 Mar 2025 19:37:42 +0530 Subject: [PATCH 6/8] Improve messsages --- .../repair/ldb/RocksDBManualCompaction.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/ldb/RocksDBManualCompaction.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/ldb/RocksDBManualCompaction.java index b20a0d968a28..7840b1126ad3 100644 --- a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/ldb/RocksDBManualCompaction.java +++ b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/ldb/RocksDBManualCompaction.java @@ -26,6 +26,7 @@ import org.apache.hadoop.hdds.utils.db.managed.ManagedRocksDB; import org.apache.hadoop.ozone.debug.RocksDBUtils; import org.apache.hadoop.ozone.repair.RepairTool; +import org.apache.hadoop.util.Time; import org.rocksdb.ColumnFamilyDescriptor; import org.rocksdb.ColumnFamilyHandle; import org.rocksdb.RocksDBException; @@ -36,8 +37,9 @@ */ @CommandLine.Command( name = "compact", - description = "CLI to compact a column-family in the DB. " + - "Note: If om.db is compacted then it will impact efficient snapshot diff.", + description = "CLI to compact a column-family in the DB. while the service is offline." + + "Note: If om.db is compacted with this tool then it will negatively impact " + + "the Ozone Manager's efficient snapshot diff.", mixinStandardHelpOptions = true, versionProvider = HddsVersionProvider.class ) @@ -48,7 +50,7 @@ public class RocksDBManualCompaction extends RepairTool { description = "Database File Path") private String dbPath; - @CommandLine.Option(names = {"--column_family", "--column-family", "--cf"}, + @CommandLine.Option(names = {"--column-family", "--column_family", "--cf"}, required = true, description = "Column family name") private String columnFamilyName; @@ -67,17 +69,20 @@ public void execute() throws Exception { } info("Running compaction on " + columnFamilyName); + long startTime = Time.monotonicNow(); if (!isDryRun()) { ManagedCompactRangeOptions compactOptions = new ManagedCompactRangeOptions(); compactOptions.setBottommostLevelCompaction(ManagedCompactRangeOptions.BottommostLevelCompaction.kForce); db.get().compactRange(cfh, null, null, compactOptions); } - info("Compaction completed."); + long duration = Time.monotonicNow() - startTime; + info("Compaction completed in " + duration + "ms."); } catch (RocksDBException exception) { - error("Failed to compact the RocksDB for the given path: %s, column-family:%s", dbPath, columnFamilyName); error("Exception: " + exception); - throw new IOException("Failed to compact RocksDB.", exception); + String errorMsg = "Failed to compact RocksDB for the given path: " + dbPath + + ", column-family:" + columnFamilyName; + throw new IOException(errorMsg, exception); } finally { IOUtils.closeQuietly(cfHandleList); } From 5b8e4e39a8106ddaf96a5107d4b43d53cd2cb9eb Mon Sep 17 00:00:00 2001 From: tejaskriya Date: Thu, 13 Mar 2025 20:42:06 +0530 Subject: [PATCH 7/8] Improve help messsages --- .../apache/hadoop/ozone/repair/ldb/RocksDBManualCompaction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/ldb/RocksDBManualCompaction.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/ldb/RocksDBManualCompaction.java index 7840b1126ad3..5ea80e214540 100644 --- a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/ldb/RocksDBManualCompaction.java +++ b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/ldb/RocksDBManualCompaction.java @@ -37,7 +37,7 @@ */ @CommandLine.Command( name = "compact", - description = "CLI to compact a column-family in the DB. while the service is offline." + + description = "CLI to compact a column-family in the DB. while the service is offline. \n" + "Note: If om.db is compacted with this tool then it will negatively impact " + "the Ozone Manager's efficient snapshot diff.", mixinStandardHelpOptions = true, From f1d88d0f8225a8ef88adbae7eb4f47cb691e6231 Mon Sep 17 00:00:00 2001 From: tejaskriya Date: Fri, 14 Mar 2025 12:12:23 +0530 Subject: [PATCH 8/8] Punctuation and space fixes --- .../hadoop/ozone/repair/ldb/RocksDBManualCompaction.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/ldb/RocksDBManualCompaction.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/ldb/RocksDBManualCompaction.java index 5ea80e214540..382bf8d06e54 100644 --- a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/ldb/RocksDBManualCompaction.java +++ b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/ldb/RocksDBManualCompaction.java @@ -37,7 +37,7 @@ */ @CommandLine.Command( name = "compact", - description = "CLI to compact a column-family in the DB. while the service is offline. \n" + + description = "CLI to compact a column-family in the DB while the service is offline.\n" + "Note: If om.db is compacted with this tool then it will negatively impact " + "the Ozone Manager's efficient snapshot diff.", mixinStandardHelpOptions = true, @@ -81,7 +81,7 @@ public void execute() throws Exception { } catch (RocksDBException exception) { error("Exception: " + exception); String errorMsg = "Failed to compact RocksDB for the given path: " + dbPath + - ", column-family:" + columnFamilyName; + ", column family: " + columnFamilyName; throw new IOException(errorMsg, exception); } finally { IOUtils.closeQuietly(cfHandleList);