| 800 | } |
| 801 | |
| 802 | @SuppressWarnings("static-access") |
| 803 | static Options createOptions() { |
| 804 | Options result = new Options(); |
| 805 | |
| 806 | // add -d and --data to print the rows |
| 807 | result.addOption(Option.builder("d") |
| 808 | .longOpt("data") |
| 809 | .desc("Should the data be printed") |
| 810 | .build()); |
| 811 | |
| 812 | // to avoid breaking unit tests (when run in different time zones) for file dump, printing |
| 813 | // of timezone is made optional |
| 814 | result.addOption(Option.builder("t") |
| 815 | .longOpt("timezone") |
| 816 | .desc("Print writer's time zone") |
| 817 | .build()); |
| 818 | |
| 819 | result.addOption(Option.builder("h") |
| 820 | .longOpt("help") |
| 821 | .desc("Print help message") |
| 822 | .build()); |
| 823 | |
| 824 | result.addOption(Option.builder("r") |
| 825 | .longOpt("rowindex") |
| 826 | .argName("comma separated list of column ids for which row index should be printed") |
| 827 | .desc("Dump stats for column number(s)") |
| 828 | .hasArg() |
| 829 | .build()); |
| 830 | |
| 831 | result.addOption(Option.builder("j") |
| 832 | .longOpt("json") |
| 833 | .desc("Print metadata in JSON format") |
| 834 | .build()); |
| 835 | |
| 836 | result.addOption(Option.builder("p") |
| 837 | .longOpt("pretty") |
| 838 | .desc("Pretty print json metadata output") |
| 839 | .build()); |
| 840 | |
| 841 | result.addOption(Option.builder() |
| 842 | .longOpt("recover") |
| 843 | .desc("recover corrupted orc files generated by streaming") |
| 844 | .build()); |
| 845 | |
| 846 | result.addOption(Option.builder() |
| 847 | .longOpt("skip-dump") |
| 848 | .desc("used along with --recover to directly recover files without dumping") |
| 849 | .build()); |
| 850 | |
| 851 | result.addOption(Option.builder() |
| 852 | .longOpt("backup-path") |
| 853 | .desc("specify a backup path to store the corrupted files (default: /tmp)") |
| 854 | .hasArg() |
| 855 | .build()); |
| 856 | |
| 857 | result.addOption(Option.builder() |
| 858 | .longOpt("column-type") |
| 859 | .desc("Print the column id, name and type of each column") |