Return-Path: X-Original-To: apmail-hive-commits-archive@www.apache.org Delivered-To: apmail-hive-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5B8DC1731C for ; Thu, 15 Jan 2015 05:00:19 +0000 (UTC) Received: (qmail 69963 invoked by uid 500); 15 Jan 2015 05:00:20 -0000 Delivered-To: apmail-hive-commits-archive@hive.apache.org Received: (qmail 69917 invoked by uid 500); 15 Jan 2015 05:00:20 -0000 Mailing-List: contact commits-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hive-dev@hive.apache.org Delivered-To: mailing list commits@hive.apache.org Received: (qmail 69905 invoked by uid 99); 15 Jan 2015 05:00:20 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jan 2015 05:00:20 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id DFF9FAC09AD; Thu, 15 Jan 2015 05:00:15 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1651948 - in /hive/branches/HIVE-8065: itests/util/src/main/java/org/apache/hadoop/hive/ql/ ql/src/test/queries/clientpositive/ ql/src/test/results/clientpositive/encrypted/ Date: Thu, 15 Jan 2015 05:00:09 -0000 To: commits@hive.apache.org From: brock@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150115050017.DFF9FAC09AD@hades.apache.org> Author: brock Date: Thu Jan 15 05:00:08 2015 New Revision: 1651948 URL: http://svn.apache.org/r1651948 Log: HIVE-9356 - Fail to handle the case that a qfile contains a semicolon in the annotation (Dong Chen via Brock) Modified: hive/branches/HIVE-8065/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java hive/branches/HIVE-8065/ql/src/test/queries/clientpositive/encryption_load_data_to_encrypted_tables.q hive/branches/HIVE-8065/ql/src/test/results/clientpositive/encrypted/encryption_load_data_to_encrypted_tables.q.out Modified: hive/branches/HIVE-8065/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java URL: http://svn.apache.org/viewvc/hive/branches/HIVE-8065/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java?rev=1651948&r1=1651947&r2=1651948&view=diff ============================================================================== --- hive/branches/HIVE-8065/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java (original) +++ hive/branches/HIVE-8065/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java Thu Jan 15 05:00:08 2015 @@ -950,7 +950,11 @@ public class QTestUtil { command += StringUtils.chop(oneCmd) + "\\;"; continue; } else { - command += oneCmd; + if (isHiveCommand(oneCmd)) { + command = oneCmd; + } else { + command += oneCmd; + } } if (StringUtils.isBlank(command)) { continue; @@ -971,6 +975,17 @@ public class QTestUtil { return rc; } + private boolean isHiveCommand(String command) { + String[] cmd = command.trim().split("\\s+"); + if (HiveCommand.find(cmd) != null) { + return true; + } else if (HiveCommand.find(cmd, HiveCommand.ONLY_FOR_TESTING) != null) { + return true; + } else { + return false; + } + } + private int executeTestCommand(final String command) { String commandName = command.trim().split("\\s+")[0]; String commandArgs = command.trim().substring(commandName.length()); Modified: hive/branches/HIVE-8065/ql/src/test/queries/clientpositive/encryption_load_data_to_encrypted_tables.q URL: http://svn.apache.org/viewvc/hive/branches/HIVE-8065/ql/src/test/queries/clientpositive/encryption_load_data_to_encrypted_tables.q?rev=1651948&r1=1651947&r2=1651948&view=diff ============================================================================== --- hive/branches/HIVE-8065/ql/src/test/queries/clientpositive/encryption_load_data_to_encrypted_tables.q (original) +++ hive/branches/HIVE-8065/ql/src/test/queries/clientpositive/encryption_load_data_to_encrypted_tables.q Thu Jan 15 05:00:08 2015 @@ -2,6 +2,7 @@ DROP TABLE IF EXISTS encrypted_table; CREATE TABLE encrypted_table (key STRING, value STRING) LOCATION '${hiveconf:hive.metastore.warehouse.dir}/encrypted_table'; +-- Create encryption key and zone; crypto create_key --keyName key1; crypto create_zone --keyName key1 --path ${hiveconf:hive.metastore.warehouse.dir}/encrypted_table; Modified: hive/branches/HIVE-8065/ql/src/test/results/clientpositive/encrypted/encryption_load_data_to_encrypted_tables.q.out URL: http://svn.apache.org/viewvc/hive/branches/HIVE-8065/ql/src/test/results/clientpositive/encrypted/encryption_load_data_to_encrypted_tables.q.out?rev=1651948&r1=1651947&r2=1651948&view=diff ============================================================================== --- hive/branches/HIVE-8065/ql/src/test/results/clientpositive/encrypted/encryption_load_data_to_encrypted_tables.q.out (original) +++ hive/branches/HIVE-8065/ql/src/test/results/clientpositive/encrypted/encryption_load_data_to_encrypted_tables.q.out Thu Jan 15 05:00:08 2015 @@ -14,11 +14,13 @@ POSTHOOK: Output: database:default POSTHOOK: Output: default@encrypted_table Encryption key created: 'key1' Encryption zone created: '/build/ql/test/data/warehouse/encrypted_table' using key: 'key1' -PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/kv1.txt' OVERWRITE INTO TABLE encrypted_table +PREHOOK: query: -- Test loading data from the local filesystem; +LOAD DATA LOCAL INPATH '../../data/files/kv1.txt' OVERWRITE INTO TABLE encrypted_table PREHOOK: type: LOAD #### A masked pattern was here #### PREHOOK: Output: default@encrypted_table -POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/kv1.txt' OVERWRITE INTO TABLE encrypted_table +POSTHOOK: query: -- Test loading data from the local filesystem; +LOAD DATA LOCAL INPATH '../../data/files/kv1.txt' OVERWRITE INTO TABLE encrypted_table POSTHOOK: type: LOAD #### A masked pattern was here #### POSTHOOK: Output: default@encrypted_table