Print usage string.
()
| 900 | * Print usage string. |
| 901 | */ |
| 902 | public static void usage() |
| 903 | { |
| 904 | System.out.println("\n"+getVersionString()+"\n"); |
| 905 | System.out.println("USAGE: Pig [options] [-] : Run interactively in grunt shell."); |
| 906 | System.out.println(" Pig [options] -e[xecute] cmd [cmd ...] : Run cmd(s)."); |
| 907 | System.out.println(" Pig [options] [-f[ile]] file : Run cmds found in file."); |
| 908 | System.out.println(" options include:"); |
| 909 | System.out.println(" -4, -log4jconf - Log4j configuration file, overrides log conf"); |
| 910 | System.out.println(" -b, -brief - Brief logging (no timestamps)"); |
| 911 | System.out.println(" -c, -check - Syntax check"); |
| 912 | System.out.println(" -d, -debug - Debug level, INFO is default"); |
| 913 | System.out.println(" -e, -execute - Commands to execute (within quotes)"); |
| 914 | System.out.println(" -f, -file - Path to the script to execute"); |
| 915 | System.out.println(" -g, -embedded - ScriptEngine classname or keyword for the ScriptEngine"); |
| 916 | System.out.println(" -h, -help - Display this message. You can specify topic to get help for that topic."); |
| 917 | System.out.println(" properties is the only topic currently supported: -h properties."); |
| 918 | System.out.println(" -i, -version - Display version information"); |
| 919 | System.out.println(" -l, -logfile - Path to client side log file; default is current working directory."); |
| 920 | System.out.println(" -m, -param_file - Path to the parameter file"); |
| 921 | System.out.println(" -p, -param - Key value pair of the form param=val"); |
| 922 | System.out.println(" -r, -dryrun - Produces script with substituted parameters. Script is not executed."); |
| 923 | System.out.println(" -t, -optimizer_off - Turn optimizations off. The following values are supported:"); |
| 924 | System.out.println(" ConstantCalculator - Calculate constants at compile time"); |
| 925 | System.out.println(" SplitFilter - Split filter conditions"); |
| 926 | System.out.println(" PushUpFilter - Filter as early as possible"); |
| 927 | System.out.println(" MergeFilter - Merge filter conditions"); |
| 928 | System.out.println(" PushDownForeachFlatten - Join or explode as late as possible"); |
| 929 | System.out.println(" LimitOptimizer - Limit as early as possible"); |
| 930 | System.out.println(" ColumnMapKeyPrune - Remove unused data"); |
| 931 | System.out.println(" AddForEach - Add ForEach to remove unneeded columns"); |
| 932 | System.out.println(" MergeForEach - Merge adjacent ForEach"); |
| 933 | System.out.println(" GroupByConstParallelSetter - Force parallel 1 for \"group all\" statement"); |
| 934 | System.out.println(" PartitionFilterOptimizer - Pushdown partition filter conditions to loader implementing LoadMetaData"); |
| 935 | System.out.println(" PredicatePushdownOptimizer - Pushdown filter predicates to loader implementing LoadPredicatePushDown"); |
| 936 | System.out.println(" All - Disable all optimizations"); |
| 937 | System.out.println(" All optimizations listed here are enabled by default. Optimization values are case insensitive."); |
| 938 | System.out.println(" -v, -verbose - Print all error messages to screen"); |
| 939 | System.out.println(" -w, -warning - Turn warning logging on; also turns warning aggregation off"); |
| 940 | System.out.println(" -x, -exectype - Set execution mode: local|mapreduce|tez, default is mapreduce."); |
| 941 | System.out.println(" -F, -stop_on_failure - Aborts execution on the first failed job; default is off"); |
| 942 | System.out.println(" -M, -no_multiquery - Turn multiquery optimization off; default is on"); |
| 943 | System.out.println(" -N, -no_fetch - Turn fetch optimization off; default is on"); |
| 944 | System.out.println(" -P, -propertyFile - Path to property file"); |
| 945 | System.out.println(" -printCmdDebug - Overrides anything else and prints the actual command used to run Pig, including"); |
| 946 | System.out.println(" any environment variables that are set by the pig command."); |
| 947 | } |
| 948 | |
| 949 | public static void printProperties(){ |
| 950 | System.out.println("The following properties are supported:"); |