| 44 | |
| 45 | |
| 46 | def parse_args(): |
| 47 | parser = argparse.ArgumentParser( |
| 48 | formatter_class=argparse.ArgumentDefaultsHelpFormatter |
| 49 | ) |
| 50 | parser.add_argument( |
| 51 | "--app", |
| 52 | type=str, |
| 53 | required=True, |
| 54 | default="{}", |
| 55 | help="The fully-specified name of your java app", |
| 56 | ) |
| 57 | parser.add_argument( |
| 58 | "--jar_path", |
| 59 | type=str, |
| 60 | required=True, |
| 61 | default="{}", |
| 62 | help="The path where your packed jar resides.", |
| 63 | ) |
| 64 | parser.add_argument( |
| 65 | "--arguments", |
| 66 | type=str, |
| 67 | default="{}", |
| 68 | help="The params you want to pass to this app's context, format them like 'src=4,threadNum=1'", |
| 69 | ) |
| 70 | parser.add_argument( |
| 71 | "--directed", type=bool, default=False, help="Run on directed graph or not" |
| 72 | ) |
| 73 | return parser.parse_args() |
| 74 | |
| 75 | |
| 76 | def parse_java_app(java_app_class: str, java_jar_full_path: str): |