| 命令 | 说明 |
|---|---|
| -t -h <Inceptor Server IP > | 进入Inceptor交互式shell |
| -H, --help | 帮助 |
| -e | 行内嵌入Inceptor SQL命令 |
| -f <文件名> | 运行指定脚本 |
| --hiveconf | 指定配置文件 |
| -i<文件名> | 初始化指定文件 |
| -S | 安静模式,也就是不输出操作运行时的信息 |
| -v | 详细模式 |
transwarp -e select a.col from tab1 a
transwarp -e 'select a.col from tab1 a' --hiveconf hive.exec.scratchdir=/home/my/hive_scratch --hiveconf mapred.reduce.tasks=32
transwarp -S -e 'select a.col from tab1 a' > a.txt
transwarp -f /home/my/script.sql
transwarp -i /home/my/init.sql
transwarp -t -h (inceptor_server_ip),就可以进入Inceptor 交互式shell,以下是在交互式shell中可以用的命令。我们可以是通过shell和Inceptor进行交互,发出Inceptor SQL命令。和Inceptor进行交互时,命令结尾要以分号结尾来表示命令结束。
| 命令 | 描述 |
|---|---|
| quit, exit | 退出交互式shell |
| reset | 将配置重置为默认值 |
| set <key>=<value> | 设置某个配置变量的值。注意:如果配置变量名拼错了,CLI不会报错。 |
| set | 打印一列被用户或者Inceptor覆盖的配置变量。 |
| set -v | 打印所有Hadoop和Hive的配置变量。 |
| add FILE[S] <filepath> <filepath>* add JAR[S] <filepath> <filepath>* add ARCHIVE[S] <filepath> <filepath>* | 将一个或多个文件、jar包或者档案加进分布式缓存的资源列表中。 |
| list FILE[S] list JAR[S] list ARCHIVE[S] | 列出已经加入分布式缓存的资源。 |
| list FILE[S] <filepath>* list JAR[S] <filepath>* list ARCHIVE[S] <filepath>* | 检查给出的资源是否已经被加入分布式缓存。 |
| delete FILE[S] <filepath>* delete JAR[S] <filepath>* delete ARCHIVE[S]<filepath>* | 将资源从分布式缓存中移除 |
| ! <command> | 从Inceptor交互式shell运行Transwarp CLI的指令 |
| dfs <dfs command> | 从Inceptor交互式shell运行DFS指令 |
| <query string> | 运行Inceptor SQL指令并将结果打印到standard output |
| source FILE <filepath> | 在交互式shell里运行脚本 |