[xpand@node1 parcel-cache]$ impala-shell -i localhost:21007 Starting Impala Shell without Kerberos authentication Connected to localhost:21007 Server version: impalad version 2.3.0-IMPALA_KUDU-cdh5 RELEASE (build 95e755e6aea07cff03192fedc3f668dff5ae3bbe) *********************************************************************************** Welcome to the Impala shell. Copyright (c) 2015 Cloudera, Inc. All rights reserved. (Impala Shell v2.4.0-cdh5.6.0 (386c7ff) built on Thu Jan 28 21:19:43 PST 2016) You can run a single query from the command line using the '-q' option. *********************************************************************************** [localhost:21007] > CREATE TABLE a (B int, A BOOLEAN) TBLPROPERTIES('storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler','kudu.table_name' = 'A','kudu.master_addresses' = 'node1:7051','kudu.key_columns' = 'B'); Query: create TABLE a (B int, A BOOLEAN) TBLPROPERTIES('storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler','kudu.table_name' = 'A','kudu.master_addresses' = 'node1:7051','kudu.key_columns' = 'B') Fetched 0 row(s) in 0.98s [localhost:21007] > select * from a; Query: select * from a Fetched 0 row(s) in 4.10s [localhost:21007] > insert into table a values (2,true); Query: insert into table a values (2,true) Inserted 1 row(s) in 0.11s [localhost:21007] > select * from a; Query: select * from a +---+------+ | b | a | +---+------+ | 2 | true | +---+------+ Fetched 1 row(s) in 0.13s [localhost:21007] > compute stats a; Query: compute stats a +-----------------------------------------+ | summary | +-----------------------------------------+ | Updated 1 partition(s) and 2 column(s). | +-----------------------------------------+ Fetched 1 row(s) in 2.02s [localhost:21007] > select * from a; Query: select * from a +---+------+ | b | a | +---+------+ | 2 | true | +---+------+ Fetched 1 row(s) in 0.12s [localhost:21007] > desc formatted a; Query: describe formatted a +------------------------------+------------------------------------------------------------+-------------------------------------------+ | name | type | comment | +------------------------------+------------------------------------------------------------+-------------------------------------------+ | # col_name | data_type | comment | | | NULL | NULL | | b | int | NULL | | a | boolean | NULL | | | NULL | NULL | | # Detailed Table Information | NULL | NULL | | Database: | default | NULL | | Owner: | xpand | NULL | | CreateTime: | Fri Mar 04 12:11:44 UTC 2016 | NULL | | LastAccessTime: | UNKNOWN | NULL | | Protect Mode: | None | NULL | | Retention: | 0 | NULL | | Location: | hdfs://node1.xpedp.com:8020/user/hive/warehouse/a | NULL | | Table Type: | MANAGED_TABLE | NULL | | Table Parameters: | NULL | NULL | | | COLUMN_STATS_ACCURATE | true | | | kudu.key_columns | B | | | kudu.master_addresses | node1:7051 | | | kudu.table_name | A | | | numFiles | 384 | | | numRows | 1 | | | rawDataSize | -1 | | | storage_handler | com.cloudera.kudu.hive.KuduStorageHandler | | | totalSize | 43267 | | | transient_lastDdlTime | 1457093586 | | | NULL | NULL | | # Storage Information | NULL | NULL | | SerDe Library: | org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe | NULL | | InputFormat: | org.apache.hadoop.mapred.TextInputFormat | NULL | | OutputFormat: | org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat | NULL | | Compressed: | No | NULL | | Num Buckets: | 0 | NULL | | Bucket Columns: | [] | NULL | | Sort Columns: | [] | NULL | +------------------------------+------------------------------------------------------------+-------------------------------------------+ Fetched 34 row(s) in 0.01s [localhost:21007] > create table b stored as parquet as select * from a; Query: create table b stored as parquet as select * from a +-------------------+ | summary | +-------------------+ | Inserted 1 row(s) | +-------------------+ Fetched 1 row(s) in 1.78s [localhost:21007] > select * from a; Query: select * from a +---+------+ | b | a | +---+------+ | 2 | true | +---+------+ Fetched 1 row(s) in 0.12s [localhost:21007] > select * from b; Query: select * from b +----+------+ | b | a | +----+------+ | 4 | NULL | | 1 | NULL | | 8 | NULL | | 1 | true | | 2 | true | | 3 | true | | 4 | true | | 10 | NULL | | 2 | true | | 2 | NULL | | 9 | NULL | | 5 | NULL | | 3 | NULL | | 7 | NULL | | 0 | NULL | | 6 | NULL | +----+------+ Fetched 16 row(s) in 0.45s [localhost:21007] > compute stats b; Query: compute stats b +-----------------------------------------+ | summary | +-----------------------------------------+ | Updated 1 partition(s) and 2 column(s). | +-----------------------------------------+ Fetched 1 row(s) in 2.42s [localhost:21007] > desc formatted b; Query: describe formatted b +------------------------------+---------------------------------------------------+----------------------+ | name | type | comment | +------------------------------+---------------------------------------------------+----------------------+ | # col_name | data_type | comment | | | NULL | NULL | | b | int | NULL | | a | boolean | NULL | | | NULL | NULL | | # Detailed Table Information | NULL | NULL | | Database: | default | NULL | | Owner: | xpand | NULL | | CreateTime: | Fri Mar 04 12:14:41 UTC 2016 | NULL | | LastAccessTime: | UNKNOWN | NULL | | Protect Mode: | None | NULL | | Retention: | 0 | NULL | | Location: | hdfs://node1.xpedp.com:8020/user/hive/warehouse/b | NULL | | Table Type: | MANAGED_TABLE | NULL | | Table Parameters: | NULL | NULL | | | COLUMN_STATS_ACCURATE | true | | | numFiles | 354 | | | numRows | 16 | | | rawDataSize | -1 | | | totalSize | 37941 | | | transient_lastDdlTime | 1457093756 | | | NULL | NULL | | # Storage Information | NULL | NULL | | SerDe Library: | parquet.hive.serde.ParquetHiveSerDe | NULL | | InputFormat: | parquet.hive.DeprecatedParquetInputFormat | NULL | | OutputFormat: | parquet.hive.DeprecatedParquetOutputFormat | NULL | | Compressed: | No | NULL | | Num Buckets: | 0 | NULL | | Bucket Columns: | [] | NULL | | Sort Columns: | [] | NULL | +------------------------------+---------------------------------------------------+----------------------+ Fetched 30 row(s) in 0.01s