Skip to content

HDDS-11747. Add debug CLI to show full path of keys present in specific containers #7465

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 11 commits into from
Prev Previous commit
Next Next commit
implement DebugSubcommand instead of SubcommandWithParent
  • Loading branch information
adoroszlai committed Dec 7, 2024
commit 5b4f1fdf1ba6d5789dcb2c4a6d4dc06439c82035
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.hadoop.hdds.cli.SubcommandWithParent;
import org.apache.hadoop.hdds.cli.DebugSubcommand;
import org.apache.hadoop.hdds.conf.ConfigurationSource;
import org.apache.hadoop.hdds.conf.OzoneConfiguration;
import org.apache.hadoop.hdds.utils.db.DBColumnFamilyDefinition;
Expand All @@ -59,8 +59,8 @@
@CommandLine.Command(
name = "retrieve-key-fullpath",
description = "retrieve full key path with matching criteria")
@MetaInfServices(SubcommandWithParent.class)
public class KeyPathRetriever implements Callable<Void>, SubcommandWithParent {
@MetaInfServices(DebugSubcommand.class)
public class KeyPathRetriever implements Callable<Void>, DebugSubcommand {
private static final String DIRTREEDBNAME = "omdirtree.db";
private static final DBColumnFamilyDefinition<Long, String> DIRTREE_COLUMN_FAMILY
= new DBColumnFamilyDefinition<>("dirTreeTable", LongCodec.get(), StringCodec.get());
Expand All @@ -86,11 +86,6 @@ public class KeyPathRetriever implements Callable<Void>, SubcommandWithParent {
private DBStore dirTreeDbStore = null;
private Table<Long, String> dirTreeTable = null;

@Override
public Class<?> getParentType() {
return OzoneDebug.class;
}

public void setDirTreeTable(Table<Long, String> table) {
this.dirTreeTable = table;
}
Expand Down
Loading