kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject [1/3] incubator-kudu git commit: [docs] Improve formatting of CREATE TABLE statements
Date Thu, 17 Mar 2016 03:31:35 GMT
Repository: incubator-kudu
Updated Branches:
  refs/heads/master 830c3e4fe -> d7de21009


[docs] Improve formatting of CREATE TABLE statements

Change-Id: Ic9e3b3c196caeaa6bb7132ad02e6528e3bb342cd
Reviewed-on: http://gerrit.cloudera.org:8080/2523
Tested-by: Kudu Jenkins
Reviewed-by: David Ribeiro Alves <david.alves@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kudu/commit/9f93dd4f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kudu/tree/9f93dd4f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kudu/diff/9f93dd4f

Branch: refs/heads/master
Commit: 9f93dd4f0f07696fb8140a58bd88a1acb6b04261
Parents: 830c3e4
Author: Misty Stanley-Jones <mstanleyjones@cloudera.com>
Authored: Thu Mar 10 09:49:59 2016 -0800
Committer: Misty Stanley-Jones <misty@apache.org>
Committed: Thu Mar 17 02:30:02 2016 +0000

----------------------------------------------------------------------
 docs/kudu_impala_integration.adoc | 100 ++++++++++++++++++++-------------
 1 file changed, 62 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9f93dd4f/docs/kudu_impala_integration.adoc
----------------------------------------------------------------------
diff --git a/docs/kudu_impala_integration.adoc b/docs/kudu_impala_integration.adoc
index 9444343..9dff8b7 100755
--- a/docs/kudu_impala_integration.adoc
+++ b/docs/kudu_impala_integration.adoc
@@ -367,9 +367,10 @@ buckets by hashing the `id` column, for simplicity. See
 
 [source,sql]
 ----
-CREATE TABLE my_first_table (
-id BIGINT,
-name STRING
+CREATE TABLE my_first_table
+(
+  id BIGINT,
+  name STRING
 )
 DISTRIBUTE BY HASH (id) INTO 16 BUCKETS
 TBLPROPERTIES(
@@ -408,7 +409,8 @@ TBLPROPERTIES(
   'kudu.table_name' = 'new_table',
   'kudu.master_addresses' = 'kudu-master.example.com:7051',
   'kudu.key_columns' = 'ts, name'
-) AS SELECT * FROM old_table;
+)
+AS SELECT * FROM old_table;
 ----
 [NOTE]
 ====
@@ -454,13 +456,18 @@ CREATE TABLE cust_behavior (
   fulfilled_date BIGINT
 )
 DISTRIBUTE BY RANGE(_id)
-SPLIT ROWS((1439560049342), (1439566253755), (1439572458168), (1439578662581), (1439584866994),
(1439591071407))
+SPLIT ROWS((1439560049342),
+           (1439566253755),
+           (1439572458168),
+           (1439578662581),
+           (1439584866994),
+           (1439591071407))
 TBLPROPERTIES(
-'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler',
-'kudu.table_name' = 'cust_behavior',
-'kudu.master_addresses' = 'a1216.halxg.cloudera.com:7051',
-'kudu.key_columns' = '_id',
-'kudu.num_tablet_replicas' = '3',
+  'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler',
+  'kudu.table_name' = 'cust_behavior',
+  'kudu.master_addresses' = 'a1216.halxg.cloudera.com:7051',
+  'kudu.key_columns' = '_id',
+  'kudu.num_tablet_replicas' = '3',
 );
 ----
 
@@ -487,8 +494,8 @@ use the following SQL:
 CREATE DATABASE impala_kudu
 USE impala_kudu;
 CREATE TABLE my_first_table (
-id BIGINT,
-name STRING
+  id BIGINT,
+  name STRING
 )
 TBLPROPERTIES(
   'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler',
@@ -597,13 +604,19 @@ CREATE TABLE customers (
   state STRING,
   name STRING,
   purchase_count int32,
-) DISTRIBUTE BY RANGE(state)
-SPLIT ROWS(('al'), ('ak'), ('ar'), .., ('wv'), ('wy'))
+)
+DISTRIBUTE BY RANGE(state)
+SPLIT ROWS(('al'),
+           ('ak'),
+           ('ar'),
+           ...
+           ('wv'),
+           ('wy'))
 TBLPROPERTIES(
-'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler',
-'kudu.table_name' = 'customers',
-'kudu.master_addresses' = 'kudu-master.example.com:7051',
-'kudu.key_columns' = 'state, name'
+  'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler',
+  'kudu.table_name' = 'customers',
+  'kudu.master_addresses' = 'kudu-master.example.com:7051',
+  'kudu.key_columns' = 'state, name'
 );
 ----
 
@@ -655,10 +668,10 @@ CREATE TABLE cust_behavior (
 )
 DISTRIBUTE BY HASH (id) INTO 16 BUCKETS
 TBLPROPERTIES(
-'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler',
-'kudu.table_name' = 'cust_behavior',
-'kudu.master_addresses' = 'kudu-master.example.com:7051',
-'kudu.key_columns' = 'id, sku'
+  'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler',
+  'kudu.table_name' = 'cust_behavior',
+  'kudu.master_addresses' = 'kudu-master.example.com:7051',
+  'kudu.key_columns' = 'id, sku'
 );
 ----
 
@@ -687,13 +700,20 @@ CREATE TABLE customers (
   state STRING,
   name STRING,
   purchase_count int32,
-) DISTRIBUTE BY RANGE(state, name)
-SPLIT ROWS(('al', ''), ('al', 'm'), ('ak', ''), ('ak', 'm'), .., ('wy', ''), ('wy', 'm'))
+)
+DISTRIBUTE BY RANGE(state, name)
+  SPLIT ROWS(('al', ''),
+             ('al', 'm'),
+             ('ak', ''),
+             ('ak', 'm'),
+             ...
+             ('wy', ''),
+             ('wy', 'm'))
 TBLPROPERTIES(
-'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler',
-'kudu.table_name' = 'customers',
-'kudu.master_addresses' = 'kudu-master.example.com:7051',
-'kudu.key_columns' = 'state, name'
+  'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler',
+  'kudu.table_name' = 'customers',
+  'kudu.master_addresses' = 'kudu-master.example.com:7051',
+  'kudu.key_columns' = 'state, name'
 );
 ----
 
@@ -726,12 +746,15 @@ CREATE TABLE cust_behavior (
   fulfilled_date BIGINT
 )
 DISTRIBUTE BY HASH (id) INTO 4 BUCKETS,
-RANGE (sku) SPLIT ROWS(('g'), ('o'), ('u'))
+RANGE (sku)
+  SPLIT ROWS(('g'),
+             ('o'),
+             ('u'))
 TBLPROPERTIES(
-'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler',
-'kudu.table_name' = 'cust_behavior',
-'kudu.master_addresses' = 'kudu-master.example.com:7051',
-'kudu.key_columns' = 'id, sku'
+  'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler',
+  'kudu.table_name' = 'cust_behavior',
+  'kudu.master_addresses' = 'kudu-master.example.com:7051',
+  'kudu.key_columns' = 'id, sku'
 );
 ----
 
@@ -758,12 +781,13 @@ CREATE TABLE cust_behavior (
   rating INT,
   fulfilled_date BIGINT
 )
-DISTRIBUTE BY HASH (id) INTO 4 BUCKETS, HASH (sku) INTO 4 BUCKETS
+DISTRIBUTE BY HASH (id) INTO 4 BUCKETS,
+              HASH (sku) INTO 4 BUCKETS
 TBLPROPERTIES(
-'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler',
-'kudu.table_name' = 'cust_behavior',
-'kudu.master_addresses' = 'kudu-master.example.com:7051',
-'kudu.key_columns' = 'id, sku'
+  'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler',
+  'kudu.table_name' = 'cust_behavior',
+  'kudu.master_addresses' = 'kudu-master.example.com:7051',
+  'kudu.key_columns' = 'id, sku'
 );
 ----
 


Mime
View raw message