hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1649265 - in /hive/branches/HIVE-8065: itests/src/test/resources/ ql/src/test/queries/clientpositive/ ql/src/test/results/clientpositive/encrypted/
Date Sat, 03 Jan 2015 23:27:09 GMT
Author: brock
Date: Sat Jan  3 23:27:09 2015
New Revision: 1649265

URL: http://svn.apache.org/r1649265
Log:
HIVE-8816 - Create unit test join of two encrypted tables with different keys (Ferdinand Xu
via Brock)

Added:
    hive/branches/HIVE-8065/ql/src/test/queries/clientpositive/encryption_join_with_different_encryption_keys.q
    hive/branches/HIVE-8065/ql/src/test/results/clientpositive/encrypted/encryption_join_with_different_encryption_keys.q.out
Modified:
    hive/branches/HIVE-8065/itests/src/test/resources/testconfiguration.properties

Modified: hive/branches/HIVE-8065/itests/src/test/resources/testconfiguration.properties
URL: http://svn.apache.org/viewvc/hive/branches/HIVE-8065/itests/src/test/resources/testconfiguration.properties?rev=1649265&r1=1649264&r2=1649265&view=diff
==============================================================================
--- hive/branches/HIVE-8065/itests/src/test/resources/testconfiguration.properties (original)
+++ hive/branches/HIVE-8065/itests/src/test/resources/testconfiguration.properties Sat Jan
 3 23:27:09 2015
@@ -273,7 +273,8 @@ minitez.query.files=bucket_map_join_tez1
 
 encrypted.query.files.shared=join_unencrypted_encrypted_tbls.q,\
   encryption_insert_partition_static.q,\
-  encryption_insert_partition_dynamic.q
+  encryption_insert_partition_dynamic.q,\
+  encryption_join_with_different_encryption_keys.q
 
 beeline.positive.exclude=add_part_exist.q,\
   alter1.q,\

Added: hive/branches/HIVE-8065/ql/src/test/queries/clientpositive/encryption_join_with_different_encryption_keys.q
URL: http://svn.apache.org/viewvc/hive/branches/HIVE-8065/ql/src/test/queries/clientpositive/encryption_join_with_different_encryption_keys.q?rev=1649265&view=auto
==============================================================================
--- hive/branches/HIVE-8065/ql/src/test/queries/clientpositive/encryption_join_with_different_encryption_keys.q
(added)
+++ hive/branches/HIVE-8065/ql/src/test/queries/clientpositive/encryption_join_with_different_encryption_keys.q
Sat Jan  3 23:27:09 2015
@@ -0,0 +1,24 @@
+--SORT_QUERY_RESULTS
+
+-- Java JCE must be installed in order to hava a key length of 256 bits
+DROP TABLE IF EXISTS table_key_1;
+CREATE TABLE table_key_1 (key INT, value STRING) LOCATION '/user/hive/warehouse/table_key_1';
+CRYPTO CREATE_KEY --keyName key_1 --bitLength 128;
+CRYPTO CREATE_ZONE --keyName key_1 --path /user/hive/warehouse/table_key_1;
+
+DROP TABLE IF EXISTS table_key_2;
+CREATE TABLE table_key_2 (key INT, value STRING) LOCATION '/user/hive/warehouse/table_key_2';
+CRYPTO CREATE_KEY --keyName key_2 --bitLength 256;
+CRYPTO CREATE_ZONE --keyName key_2 --path /user/hive/warehouse/table_key_2;
+
+INSERT OVERWRITE TABLE table_key_1 SELECT * FROM src;
+INSERT OVERWRITE TABLE table_key_2 SELECT * FROM src;
+
+EXPLAIN EXTENDED SELECT * FROM table_key_1 t1 JOIN table_key_2 t2 WHERE (t1.key = t2.key);
+SELECT * FROM table_key_1 t1 JOIN table_key_2 t2 WHERE (t1.key = t2.key);
+
+DROP TABLE table_key_1;
+DROP TABLE table_key_2;
+
+CRYPTO DELETE_KEY --keyName key_1;
+CRYPTO DELETE_KEY --keyName key_2;
\ No newline at end of file

Added: hive/branches/HIVE-8065/ql/src/test/results/clientpositive/encrypted/encryption_join_with_different_encryption_keys.q.out
URL: http://svn.apache.org/viewvc/hive/branches/HIVE-8065/ql/src/test/results/clientpositive/encrypted/encryption_join_with_different_encryption_keys.q.out?rev=1649265&view=auto
==============================================================================
--- hive/branches/HIVE-8065/ql/src/test/results/clientpositive/encrypted/encryption_join_with_different_encryption_keys.q.out
(added)
+++ hive/branches/HIVE-8065/ql/src/test/results/clientpositive/encrypted/encryption_join_with_different_encryption_keys.q.out
Sat Jan  3 23:27:09 2015
@@ -0,0 +1,1323 @@
+PREHOOK: query: DROP TABLE IF EXISTS table_key_1
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: DROP TABLE IF EXISTS table_key_1
+POSTHOOK: type: DROPTABLE
+#### A masked pattern was here ####
+PREHOOK: type: CREATETABLE
+PREHOOK: Input: /user/hive/warehouse/table_key_1
+PREHOOK: Output: database:default
+PREHOOK: Output: default@table_key_1
+#### A masked pattern was here ####
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Input: /user/hive/warehouse/table_key_1
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@table_key_1
+Encryption key created: 'key_1'
+Encryption zone created: '/user/hive/warehouse/table_key_1' using key: 'key_1'
+PREHOOK: query: DROP TABLE IF EXISTS table_key_2
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: DROP TABLE IF EXISTS table_key_2
+POSTHOOK: type: DROPTABLE
+#### A masked pattern was here ####
+PREHOOK: type: CREATETABLE
+PREHOOK: Input: /user/hive/warehouse/table_key_2
+PREHOOK: Output: database:default
+PREHOOK: Output: default@table_key_2
+#### A masked pattern was here ####
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Input: /user/hive/warehouse/table_key_2
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@table_key_2
+Encryption key created: 'key_2'
+Encryption zone created: '/user/hive/warehouse/table_key_2' using key: 'key_2'
+PREHOOK: query: INSERT OVERWRITE TABLE table_key_1 SELECT * FROM src
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@table_key_1
+POSTHOOK: query: INSERT OVERWRITE TABLE table_key_1 SELECT * FROM src
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@table_key_1
+POSTHOOK: Lineage: table_key_1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string,
comment:default), ]
+POSTHOOK: Lineage: table_key_1.value SIMPLE [(src)src.FieldSchema(name:value, type:string,
comment:default), ]
+PREHOOK: query: INSERT OVERWRITE TABLE table_key_2 SELECT * FROM src
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@table_key_2
+POSTHOOK: query: INSERT OVERWRITE TABLE table_key_2 SELECT * FROM src
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@table_key_2
+POSTHOOK: Lineage: table_key_2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string,
comment:default), ]
+POSTHOOK: Lineage: table_key_2.value SIMPLE [(src)src.FieldSchema(name:value, type:string,
comment:default), ]
+PREHOOK: query: EXPLAIN EXTENDED SELECT * FROM table_key_1 t1 JOIN table_key_2 t2 WHERE (t1.key
= t2.key)
+PREHOOK: type: QUERY
+POSTHOOK: query: EXPLAIN EXTENDED SELECT * FROM table_key_1 t1 JOIN table_key_2 t2 WHERE
(t1.key = t2.key)
+POSTHOOK: type: QUERY
+ABSTRACT SYNTAX TREE:
+  
+TOK_QUERY
+   TOK_FROM
+      TOK_JOIN
+         TOK_TABREF
+            TOK_TABNAME
+               table_key_1
+            t1
+         TOK_TABREF
+            TOK_TABNAME
+               table_key_2
+            t2
+   TOK_INSERT
+      TOK_DESTINATION
+         TOK_DIR
+            TOK_TMP_FILE
+      TOK_SELECT
+         TOK_SELEXPR
+            TOK_ALLCOLREF
+      TOK_WHERE
+         =
+            .
+               TOK_TABLE_OR_COL
+                  t1
+               key
+            .
+               TOK_TABLE_OR_COL
+                  t2
+               key
+
+
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            alias: t2
+            Statistics: Num rows: 55 Data size: 5812 Basic stats: COMPLETE Column stats:
NONE
+            GatherStats: false
+            Filter Operator
+              isSamplingPred: false
+              predicate: key is not null (type: boolean)
+              Statistics: Num rows: 28 Data size: 2958 Basic stats: COMPLETE Column stats:
NONE
+              Reduce Output Operator
+                key expressions: key (type: int)
+                sort order: +
+                Map-reduce partition columns: key (type: int)
+                Statistics: Num rows: 28 Data size: 2958 Basic stats: COMPLETE Column stats:
NONE
+                tag: 1
+                value expressions: value (type: string)
+                auto parallelism: false
+          TableScan
+            alias: t1
+            Statistics: Num rows: 55 Data size: 5812 Basic stats: COMPLETE Column stats:
NONE
+            GatherStats: false
+            Filter Operator
+              isSamplingPred: false
+              predicate: key is not null (type: boolean)
+              Statistics: Num rows: 28 Data size: 2958 Basic stats: COMPLETE Column stats:
NONE
+              Reduce Output Operator
+                key expressions: key (type: int)
+                sort order: +
+                Map-reduce partition columns: key (type: int)
+                Statistics: Num rows: 28 Data size: 2958 Basic stats: COMPLETE Column stats:
NONE
+                tag: 0
+                value expressions: value (type: string)
+                auto parallelism: false
+      Path -> Alias:
+#### A masked pattern was here ####
+      Path -> Partition:
+#### A masked pattern was here ####
+          Partition
+            base file name: table_key_1
+            input format: org.apache.hadoop.mapred.TextInputFormat
+            output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+            properties:
+              COLUMN_STATS_ACCURATE true
+              bucket_count -1
+              columns key,value
+              columns.comments 
Mime
View raw message