Skip to content

Commit

Permalink
[feature] [action] Adding line breaks to action prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
yangjf2019 committed Feb 8, 2025
1 parent 58cab01 commit 07d45be
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,31 +68,31 @@ public void printHelp() {

System.out.println("Syntax:");
System.out.println(
" clone --warehouse <warehouse_path> "
+ "[--database <database_name>] "
+ "[--table <table_name>] "
+ "[--catalog_conf <source-paimon-catalog-conf> [--catalog_conf <source-paimon-catalog-conf> ...]] "
+ "--target_warehouse <target_warehouse_path> "
+ "[--target_database <target_database_name>] "
+ "[--target_table <target_table_name>] "
+ "[--target_catalog_conf <target-paimon-catalog-conf> [--target_catalog_conf <target-paimon-catalog-conf> ...]] "
" clone --warehouse <warehouse_path> \n"
+ "[--database <database_name>] \n"
+ "[--table <table_name>] \n"
+ "[--catalog_conf <source-paimon-catalog-conf> [--catalog_conf <source-paimon-catalog-conf> ...]] \n"
+ "--target_warehouse <target_warehouse_path> \n"
+ "[--target_database <target_database_name>] \n"
+ "[--target_table <target_table_name>] \n"
+ "[--target_catalog_conf <target-paimon-catalog-conf> [--target_catalog_conf <target-paimon-catalog-conf> ...]] \n"
+ "[--parallelism <parallelism>]");

System.out.println();

System.out.println("Examples:");
System.out.println(
" clone --warehouse s3:///path1/from/warehouse "
+ "--database test_db "
+ "--table test_table "
+ "--catalog_conf s3.endpoint=https://****.com "
+ "--catalog_conf s3.access-key=***** "
+ "--catalog_conf s3.secret-key=***** "
+ "--target_warehouse s3:///path2/to/warehouse "
+ "--target_database test_db_copy "
+ "--target_table test_table_copy "
+ "--target_catalog_conf s3.endpoint=https://****.com "
+ "--target_catalog_conf s3.access-key=***** "
" clone --warehouse s3:///path1/from/warehouse \\\n"
+ "--database test_db \\\n"
+ "--table test_table \\\n"
+ "--catalog_conf s3.endpoint=https://****.com \\\n"
+ "--catalog_conf s3.access-key=***** \\\n"
+ "--catalog_conf s3.secret-key=***** \\\n"
+ "--target_warehouse s3:///path2/to/warehouse \\\n"
+ "--target_database test_db_copy \\\n"
+ "--target_table test_table_copy \\\n"
+ "--target_catalog_conf s3.endpoint=https://****.com \\\n"
+ "--target_catalog_conf s3.access-key=***** \\\n"
+ "--target_catalog_conf s3.secret-key=***** ");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ public void printHelp() {

System.out.println("Syntax:");
System.out.println(
" compact --warehouse <warehouse_path> --database <database_name> "
+ "--table <table_name> [--partition <partition_name>]"
+ "[--order_strategy <order_strategy>]"
+ "[--table_conf <key>=<value>]"
+ "[--order_by <order_columns>]"
+ "[--partition_idle_time <partition_idle_time>]"
" compact --warehouse <warehouse_path> --database <database_name> \n"
+ "--table <table_name> [--partition <partition_name>] \n"
+ "[--order_strategy <order_strategy>] \n"
+ "[--table_conf <key>=<value>] \n"
+ "[--order_by <order_columns>] \n"
+ "[--partition_idle_time <partition_idle_time>] \n"
+ "[--compact_strategy <compact_strategy>]");
System.out.println(
" compact --warehouse s3://path/to/warehouse --database <database_name> "
Expand Down Expand Up @@ -140,14 +140,14 @@ public void printHelp() {
+ "`full` : Only supports batch mode. All files will be selected for merging."
+ "`minor`: Pick the set of files that need to be merged based on specified conditions.");
System.out.println(
" compact --warehouse s3:///path/to/warehouse "
+ "--database test_db "
+ "--table test_table "
+ "--order_strategy zorder "
+ "--order_by a,b,c "
+ "--table_conf sink.parallelism=9 "
+ "--catalog_conf s3.endpoint=https://****.com "
+ "--catalog_conf s3.access-key=***** "
" compact --warehouse s3:///path/to/warehouse \\\n"
+ "--database test_db \\\n"
+ "--table test_table \\\n"
+ "--order_strategy zorder \\\n"
+ "--order_by a,b,c \\\n"
+ "--table_conf sink.parallelism=9 \\\n"
+ "--catalog_conf s3.endpoint=https://****.com \\\n"
+ "--catalog_conf s3.access-key=***** \\\n"
+ "--catalog_conf s3.secret-key=***** ");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ public void printHelp() {

System.out.println("Syntax:");
System.out.println(
" compact_database --warehouse <warehouse_path> --including_databases <database-name|name-regular-expr> "
+ "[--including_tables <paimon_table_name|name_regular_expr>] "
+ "[--excluding_tables <paimon_table_name|name_regular_expr>] "
+ "[--mode <compact_mode>]"
+ "[--partition_idle_time <partition_idle_time>]"
" compact_database --warehouse <warehouse_path> --including_databases <database-name|name-regular-expr> \n"
+ "[--including_tables <paimon_table_name|name_regular_expr>] \n"
+ "[--excluding_tables <paimon_table_name|name_regular_expr>] \n"
+ "[--mode <compact_mode>] \n"
+ "[--partition_idle_time <partition_idle_time>] \n"
+ "[--compact_strategy <compact_strategy>]");
System.out.println(
" compact_database --warehouse s3://path/to/warehouse --including_databases <database-name|name-regular-expr> "
Expand Down Expand Up @@ -109,10 +109,10 @@ public void printHelp() {
System.out.println(
" compact_database --warehouse hdfs:///path/to/warehouse --including_databases test_db");
System.out.println(
" compact_database --warehouse s3:///path/to/warehouse "
+ "--including_databases test_db "
+ "--catalog_conf s3.endpoint=https://****.com "
+ "--catalog_conf s3.access-key=***** "
" compact_database --warehouse s3:///path/to/warehouse \\\n"
+ "--including_databases test_db \\\n"
+ "--catalog_conf s3.endpoint=https://****.com \\\n"
+ "--catalog_conf s3.access-key=***** \\\n"
+ "--catalog_conf s3.secret-key=***** ");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ public void printHelp() {

System.out.println("Syntax:");
System.out.println(
" create_tag_from_timestamp --warehouse <warehouse_path> "
+ "--database <database_name>"
+ "--table <table_name> "
+ "--tag <tag> "
+ "--timestamp <timestamp> "
+ "[--timeRetained <duration>] "
" create_tag_from_timestamp --warehouse <warehouse_path> \n"
+ "--database <database_name> \n"
+ "--table <table_name> \n"
+ "--tag <tag> \n"
+ "--timestamp <timestamp> \n"
+ "[--timeRetained <duration>] \n"
+ "[--options <key>=<value>,<key>=<value>,...]");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ public void printHelp() {

System.out.println("Syntax:");
System.out.println(
" create_tag_from_watermark --warehouse <warehouse_path> "
+ "--database <database_name>"
+ "--table <table_name> "
+ "--tag <tag> "
+ "--watermark <watermark> "
+ "[--timeRetained <duration>] "
" create_tag_from_watermark --warehouse <warehouse_path> \n"
+ "--database <database_name> \n"
+ "--table <table_name> \n"
+ "--tag <tag> \n"
+ "--watermark <watermark> \n"
+ "[--timeRetained <duration>] \n"
+ "[--options <key>=<value>,<key>=<value>,...]");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ public void printHelp() {

System.out.println("Syntax:");
System.out.println(
" expire_tags --warehouse <warehouse_path> "
+ "--database <database>"
+ "--table <table> "
" expire_tags --warehouse <warehouse_path> \n"
+ "--database <database> \n"
+ "--table <table> \n"
+ "[--older_than <older_than>]");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ public void printHelp() {

System.out.println("Syntax:");
System.out.println(
" migrate_file --warehouse <warehouse_path> --source_type hive "
+ "--source_table <database.table_name> "
+ "--target_table <database.table_name> "
+ "--delete_origin true "
+ "[--catalog_conf <key>=<value] "
" migrate_file --warehouse <warehouse_path> --source_type hive \n"
+ "--source_table <database.table_name> \n"
+ "--target_table <database.table_name> \n"
+ "--delete_origin true \n"
+ "[--catalog_conf <key>=<value] \n"
+ "[--options <key>=<value>,<key>=<value>,...]");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ public void printHelp() {

System.out.println("Syntax:");
System.out.println(
" migrate_table --warehouse <warehouse_path> --source_type hive "
+ "--table <database.table_name> "
+ "[--catalog_conf <key>=<value] "
" migrate_table --warehouse <warehouse_path> \n"
+ "--source_type hive \n"
+ "--table <database.table_name> \n"
+ "[--catalog_conf <key>=<value] \n"
+ "[--options <key>=<value>,<key>=<value>,...]");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,11 @@ public void printHelp() {

System.out.println("Syntax:");
System.out.println(
" remove_unexisting_files --warehouse <warehouse_path> --database <database_name> "
+ "--table <table_name> [--partition <partition_name> [--partition <partition_name>]] "
+ "[--dry_run <false/true>] "
" remove_unexisting_files \n"
+ "--warehouse <warehouse_path> \n"
+ "--database <database_name> \n"
+ "--table <table_name> [--partition <partition_name> [--partition <partition_name>]] \n"
+ "[--dry_run <false/true>] \n"
+ "[--parallelism <parallelism>]");
System.out.println(
"If partitions are not specified, this action will remove unexisting files from all partitions.");
Expand Down

0 comments on commit 07d45be

Please sign in to comment.