Impala

https://github.com/apache/incubator-impala

https://impala.apache.org/

impala的client: impala-shell

Cloudera公司的CDH集成了Impala.


impala-shell/beeline

impala-shell

1
$ impala-shell

beeline

1
2
3
4
$ beeline --silent=true
beeline> !connect jdbc:hive2://[ip]:21050[/database];auth=noSasl [username] [password]

$ beeline -u "jdbc:hive2://[ip]:21050[/database];auth=noSasl" -n [username] -p [password] -e "USE [database]; ..."

sql

normal table:

1
> create table {table_name} (var type, var1 type1);

parquet table:

1
> crate table {table_name} (var type, var1 type1) STORED AS PARQUET;

partition table:

1
2
> create table {table_name} (var type, var1 type1) PARTITIONED BY (var2 type2);
> insert into {table_name} PARTITION (var2 = val2) values (val, val1)

parquet partition table:

1
2
> create table {table_name} (var type, var1 type1) PARTITION BY (var2 type2) STORED AS PARQUET;
> insert into {table_name} PARTITION (var2 = val2) values (val, val1)