颍上县住房和城乡建设局网站爱情链接
Impala的内部shell,就是已经进入到Impala,可输入的命令
选项 | 描述 |
---|---|
help | 显示帮助信息 |
explain <sql> | 显示执行计划 |
profile (查询完成后执行) | 查询最近一次查询的底层信息 |
shell <shell> | 不退出impala-shell执行shell命令 |
version | 显示impala-shell和impala的版本信息 |
connect | 连接impalad主机,默认端口21000(同于impala-shell -i),如 connect had103; |
refresh <tablename> | 增量刷新元数据库 |
invalidate metadata | 全量刷新元数据库(慎用)(同于 impala-shell -r) |
history | 历史命令 |
1.查看执行计划
explain select * from student;
2.查询最近一次查询的底层信息
[hadoop103:21000] > select count(*) from student;
[hadoop103:21000] > profile;
3.查看hdfs及linux文件系统
[hadoop103:21000] > shell hadoop fs -ls /;
[hadoop103:21000] > shell ls -al ./;
4.刷新指定表的元数据
hive> load data local inpath '/opt/module/datas/student.txt' into table student;
[hadoop103:21000] > select * from student;
[hadoop103:21000] > refresh student;
[hadoop103:21000] > select * from student;
5.查看历史命令
[hadoop103:21000] > history;