FAQ
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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedJan 15, '15 at 5:00a
activeJan 15, '15 at 5:00a
posts1
users1
websitehive.apache.org

1 user in discussion

Brock: 1 post

People

Translate

site design / logo © 2021 Grokbase