You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ps...@apache.org on 2022/09/14 11:46:26 UTC

[hbase] branch branch-2 updated: HBASE-27317 Rectifying the option for columnfamily as mandatory (#4773)

This is an automated email from the ASF dual-hosted git repository.

psomogyi pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
     new a303a9fd717 HBASE-27317 Rectifying the option for columnfamily as mandatory (#4773)
a303a9fd717 is described below

commit a303a9fd7179c51dfb07dbd74c1542f18bc4a421
Author: Abhradeep Kundu <ab...@gmail.com>
AuthorDate: Wed Sep 14 17:11:02 2022 +0530

    HBASE-27317 Rectifying the option for columnfamily as mandatory (#4773)
    
    Signed-off-by: Peter Somogyi <ps...@apache.org>
---
 .../storefiletracker/StoreFileListFilePrettyPrinter.java  | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/storefiletracker/StoreFileListFilePrettyPrinter.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/storefiletracker/StoreFileListFilePrettyPrinter.java
index 9338f2f6332..1025a4759cf 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/storefiletracker/StoreFileListFilePrettyPrinter.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/storefiletracker/StoreFileListFilePrettyPrinter.java
@@ -61,6 +61,8 @@ public class StoreFileListFilePrettyPrinter extends Configured implements Tool {
   private final String regionOption = "r";
   private final String tableNameOption = "t";
 
+  private final String cmdString = "sft";
+
   private String namespace;
   private String regionName;
   private String columnFamily;
@@ -96,9 +98,7 @@ public class StoreFileListFilePrettyPrinter extends Configured implements Tool {
   public boolean parseOptions(String[] args) throws ParseException, IOException {
     HelpFormatter formatter = new HelpFormatter();
     if (args.length == 0) {
-      formatter
-        .printHelp("sft [--file=</path/to/tracker/file> | --table=<namespace:tablename|tablename>"
-          + " --region=<regionname> [--columnFamily=<columnfamily>] ]", options, true);
+      formatter.printHelp(cmdString, options, true);
       return false;
     }
 
@@ -111,22 +111,19 @@ public class StoreFileListFilePrettyPrinter extends Configured implements Tool {
       regionName = cmd.getOptionValue(regionOption);
       if (StringUtils.isEmpty(regionName)) {
         err.println("Region name is not specified.");
-        formatter.printHelp("sft [--file=</path/to/tracker/file> | --table=<namespace:tablename|"
-          + "tablename> --region=<regionname> [--columnFamily=<columnfamily>] ]", options, true);
+        formatter.printHelp(cmdString, options, true);
         System.exit(1);
       }
       columnFamily = cmd.getOptionValue(columnFamilyOption);
       if (StringUtils.isEmpty(columnFamily)) {
         err.println("Column family is not specified.");
-        formatter.printHelp("sft [--file=</path/to/tracker/file> | --table=<namespace:tablename|"
-          + "tablename> --region=<regionname> [--columnFamily=<columnfamily>] ]", options, true);
+        formatter.printHelp(cmdString, options, true);
         System.exit(1);
       }
       String tableNameWtihNS = cmd.getOptionValue(tableNameOption);
       if (StringUtils.isEmpty(tableNameWtihNS)) {
         err.println("Table name is not specified.");
-        formatter.printHelp("sft [--file=</path/to/tracker/file> | --table=<namespace:tablename|"
-          + "tablename> --region=<regionname> [--columnFamily=<columnfamily>] ]", options, true);
+        formatter.printHelp(cmdString, options, true);
         System.exit(1);
       }
       TableName tn = TableName.valueOf(tableNameWtihNS);