hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ych...@apache.org
Subject hive git commit: HIVE-16313: Flaky test: TestBeeLineDriver[drop_with_concurrency] (Peter Vary via Yongzhi Chen)
Date Wed, 29 Mar 2017 17:22:40 GMT
Repository: hive
Updated Branches:
  refs/heads/master 6e4dc6712 -> b176d072e


HIVE-16313: Flaky test: TestBeeLineDriver[drop_with_concurrency] (Peter Vary via Yongzhi Chen)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/b176d072
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/b176d072
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/b176d072

Branch: refs/heads/master
Commit: b176d072ed2ed33cd53f7e5189d93650246714d6
Parents: 6e4dc67
Author: Yongzhi Chen <ychena@apache.org>
Authored: Wed Mar 29 13:08:21 2017 -0400
Committer: Yongzhi Chen <ychena@apache.org>
Committed: Wed Mar 29 13:13:35 2017 -0400

----------------------------------------------------------------------
 .../org/apache/hive/beeline/qfile/QFile.java    | 23 +++++++++++++++-----
 .../beeline/drop_with_concurrency.q.out         |  3 ---
 .../beeline/escape_comments.q.out               | 15 -------------
 3 files changed, 17 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/b176d072/itests/util/src/main/java/org/apache/hive/beeline/qfile/QFile.java
----------------------------------------------------------------------
diff --git a/itests/util/src/main/java/org/apache/hive/beeline/qfile/QFile.java b/itests/util/src/main/java/org/apache/hive/beeline/qfile/QFile.java
index 890a167..ae5a349 100644
--- a/itests/util/src/main/java/org/apache/hive/beeline/qfile/QFile.java
+++ b/itests/util/src/main/java/org/apache/hive/beeline/qfile/QFile.java
@@ -170,17 +170,27 @@ public final class QFile {
     return Shell.WINDOWS ? String.format("\"%s\"", file.getAbsolutePath()) : file.getAbsolutePath();
   }
 
+  private static class Filter {
+    private final Pattern pattern;
+    private final String replacement;
+
+    public Filter(Pattern pattern, String replacement) {
+      this.pattern = pattern;
+      this.replacement = replacement;
+    }
+  }
+
   private static class RegexFilterSet {
-    private final Map<Pattern, String> regexFilters = new LinkedHashMap<Pattern,
String>();
+    private final List<Filter> regexFilters = new ArrayList<Filter>();
 
     public RegexFilterSet addFilter(String regex, String replacement) {
-      regexFilters.put(Pattern.compile(regex), replacement);
+      regexFilters.add(new Filter(Pattern.compile(regex), replacement));
       return this;
     }
 
     public String filter(String input) {
-      for (Pattern pattern : regexFilters.keySet()) {
-        input = pattern.matcher(input).replaceAll(regexFilters.get(pattern));
+      for (Filter filter : regexFilters) {
+        input = filter.pattern.matcher(input).replaceAll(filter.replacement);
       }
       return input;
     }
@@ -209,8 +219,9 @@ public final class QFile {
 
     return new RegexFilterSet()
         .addFilter(logPattern, "")
-        .addFilter("(?s)\nWaiting to acquire compile lock:.*?Acquired the compile lock.\n",
-            "\nAcquired the compile lock.\n")
+        .addFilter("(?s)\n[^\n]*Waiting to acquire compile lock.*?Acquired the compile lock.\n",
+            "\n")
+        .addFilter("Acquired the compile lock.\n","")
         .addFilter("Getting log thread is interrupted, since query is done!\n", "")
         .addFilter("going to print operations logs\n", "")
         .addFilter("printed operations logs\n", "")

http://git-wip-us.apache.org/repos/asf/hive/blob/b176d072/ql/src/test/results/clientpositive/beeline/drop_with_concurrency.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/beeline/drop_with_concurrency.q.out b/ql/src/test/results/clientpositive/beeline/drop_with_concurrency.q.out
index d22c9ec..993329e 100644
--- a/ql/src/test/results/clientpositive/beeline/drop_with_concurrency.q.out
+++ b/ql/src/test/results/clientpositive/beeline/drop_with_concurrency.q.out
@@ -9,7 +9,6 @@ No rows affected
 No rows affected 
 >>>  
 >>>  drop table if exists drop_with_concurrency_1;
-Acquired the compile lock.
 Compiling commandqueryId=(!!{queryId}!!): drop table if exists drop_with_concurrency_1
 Semantic Analysis Completed
 Returning Hive schema: Schema(fieldSchemas:null, properties:null)
@@ -25,7 +24,6 @@ OK
 Shutting down query drop table if exists drop_with_concurrency_1
 No rows affected 
 >>>  create table drop_with_concurrency_1 (c1 int);
-Acquired the compile lock.
 Compiling commandqueryId=(!!{queryId}!!): create table drop_with_concurrency_1 (c1 int)
 Semantic Analysis Completed
 Returning Hive schema: Schema(fieldSchemas:null, properties:null)
@@ -45,7 +43,6 @@ OK
 Shutting down query create table drop_with_concurrency_1 (c1 int)
 No rows affected 
 >>>  drop table drop_with_concurrency_1;
-Acquired the compile lock.
 Compiling commandqueryId=(!!{queryId}!!): drop table drop_with_concurrency_1
 Semantic Analysis Completed
 Returning Hive schema: Schema(fieldSchemas:null, properties:null)

http://git-wip-us.apache.org/repos/asf/hive/blob/b176d072/ql/src/test/results/clientpositive/beeline/escape_comments.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/beeline/escape_comments.q.out b/ql/src/test/results/clientpositive/beeline/escape_comments.q.out
index 5f9df93..2a05e53 100644
--- a/ql/src/test/results/clientpositive/beeline/escape_comments.q.out
+++ b/ql/src/test/results/clientpositive/beeline/escape_comments.q.out
@@ -1,6 +1,5 @@
 >>>  !run !!{qFileDirectory}!!/escape_comments.q
 >>>  create database escape_comments_db comment 'a\nb';
-Acquired the compile lock.
 Compiling commandqueryId=(!!{queryId}!!): create database escape_comments_db comment 'a\nb'
 Semantic Analysis Completed
 Returning Hive schema: Schema(fieldSchemas:null, properties:null)
@@ -18,7 +17,6 @@ OK
 Shutting down query create database escape_comments_db comment 'a\nb'
 No rows affected 
 >>>  use escape_comments_db;
-Acquired the compile lock.
 Compiling commandqueryId=(!!{queryId}!!): use escape_comments_db
 Semantic Analysis Completed
 Returning Hive schema: Schema(fieldSchemas:null, properties:null)
@@ -38,7 +36,6 @@ No rows affected
 >>>  create table escape_comments_tbl1 
 (col1 string comment 'a\nb\'\;') comment 'a\nb' 
 partitioned by (p1 string comment 'a\nb');
-Acquired the compile lock.
 Compiling commandqueryId=(!!{queryId}!!): create table escape_comments_tbl1 
 (col1 string comment 'a\nb\'\;') comment 'a\nb' 
 partitioned by (p1 string comment 'a\nb')
@@ -69,7 +66,6 @@ partitioned by (p1 string comment 'a\nb')
 No rows affected 
 >>>  create view escape_comments_view1 (col1 comment 'a\nb') comment 'a\nb' 
 as select col1 from escape_comments_tbl1;
-Acquired the compile lock.
 Compiling commandqueryId=(!!{queryId}!!): create view escape_comments_view1 (col1 comment
'a\nb') comment 'a\nb' 
 as select col1 from escape_comments_tbl1
 Semantic Analysis Completed
@@ -98,7 +94,6 @@ Shutting down query create view escape_comments_view1 (col1 comment 'a\nb')
comm
 as select col1 from escape_comments_tbl1
 No rows affected 
 >>>  create index index2 on table escape_comments_tbl1(col1) as 'COMPACT' with deferred
rebuild comment 'a\nb';
-Acquired the compile lock.
 Compiling commandqueryId=(!!{queryId}!!): create index index2 on table escape_comments_tbl1(col1)
as 'COMPACT' with deferred rebuild comment 'a\nb'
 Semantic Analysis Completed
 Returning Hive schema: Schema(fieldSchemas:null, properties:null)
@@ -118,7 +113,6 @@ Shutting down query create index index2 on table escape_comments_tbl1(col1)
as '
 No rows affected 
 >>>  
 >>>  describe database extended escape_comments_db;
-Acquired the compile lock.
 Compiling commandqueryId=(!!{queryId}!!): describe database extended escape_comments_db
 Semantic Analysis Completed
 Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:db_name, type:string, comment:from
deserializer), FieldSchema(name:comment, type:string, comment:from deserializer), FieldSchema(name:location,
type:string, comment:from deserializer), FieldSchema(name:owner_name, type:string, comment:from
deserializer), FieldSchema(name:owner_type, type:string, comment:from deserializer), FieldSchema(name:parameters,
type:string, comment:from deserializer)], properties:null)
@@ -138,7 +132,6 @@ Shutting down query describe database extended escape_comments_db
 'escape_comments_db','a\nb','location/in/test','user','USER',''
 1 row selected 
 >>>  describe database escape_comments_db;
-Acquired the compile lock.
 Compiling commandqueryId=(!!{queryId}!!): describe database escape_comments_db
 Semantic Analysis Completed
 Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:db_name, type:string, comment:from
deserializer), FieldSchema(name:comment, type:string, comment:from deserializer), FieldSchema(name:location,
type:string, comment:from deserializer), FieldSchema(name:owner_name, type:string, comment:from
deserializer), FieldSchema(name:owner_type, type:string, comment:from deserializer), FieldSchema(name:parameters,
type:string, comment:from deserializer)], properties:null)
@@ -158,7 +151,6 @@ Shutting down query describe database escape_comments_db
 'escape_comments_db','a\nb','location/in/test','user','USER',''
 1 row selected 
 >>>  show create table escape_comments_tbl1;
-Acquired the compile lock.
 Compiling commandqueryId=(!!{queryId}!!): show create table escape_comments_tbl1
 Semantic Analysis Completed
 Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:createtab_stmt, type:string,
comment:from deserializer)], properties:null)
@@ -192,7 +184,6 @@ Shutting down query show create table escape_comments_tbl1
 '  'transient_lastDdlTime'='!!UNIXTIME!!')'
 15 rows selected 
 >>>  describe formatted escape_comments_tbl1;
-Acquired the compile lock.
 Compiling commandqueryId=(!!{queryId}!!): describe formatted escape_comments_tbl1
 Semantic Analysis Completed
 Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:col_name, type:string, comment:from
deserializer), FieldSchema(name:data_type, type:string, comment:from deserializer), FieldSchema(name:comment,
type:string, comment:from deserializer)], properties:null)
@@ -247,7 +238,6 @@ Shutting down query describe formatted escape_comments_tbl1
 '','serialization.format','1                   '
 36 rows selected 
 >>>  describe pretty escape_comments_tbl1;
-Acquired the compile lock.
 Compiling commandqueryId=(!!{queryId}!!): describe pretty escape_comments_tbl1
 Semantic Analysis Completed
 Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:col_name, type:string, comment:from
deserializer), FieldSchema(name:data_type, type:string, comment:from deserializer), FieldSchema(name:comment,
type:string, comment:from deserializer)], properties:null)
@@ -278,7 +268,6 @@ Shutting down query describe pretty escape_comments_tbl1
 '         ','              ','b'
 12 rows selected 
 >>>  describe escape_comments_tbl1;
-Acquired the compile lock.
 Compiling commandqueryId=(!!{queryId}!!): describe escape_comments_tbl1
 Semantic Analysis Completed
 Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:col_name, type:string, comment:from
deserializer), FieldSchema(name:data_type, type:string, comment:from deserializer), FieldSchema(name:comment,
type:string, comment:from deserializer)], properties:null)
@@ -304,7 +293,6 @@ Shutting down query describe escape_comments_tbl1
 'p1','string','a\nb'
 7 rows selected 
 >>>  show create table escape_comments_view1;
-Acquired the compile lock.
 Compiling commandqueryId=(!!{queryId}!!): show create table escape_comments_view1
 Semantic Analysis Completed
 Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:createtab_stmt, type:string,
comment:from deserializer)], properties:null)
@@ -324,7 +312,6 @@ Shutting down query show create table escape_comments_view1
 'CREATE VIEW `escape_comments_view1` AS SELECT `col1` AS `col1` FROM (select `escape_comments_tbl1`.`col1`
from `escape_comments_db`.`escape_comments_tbl1`) `escape_comments_db.escape_comments_view1`'
 1 row selected 
 >>>  describe formatted escape_comments_view1;
-Acquired the compile lock.
 Compiling commandqueryId=(!!{queryId}!!): describe formatted escape_comments_view1
 Semantic Analysis Completed
 Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:col_name, type:string, comment:from
deserializer), FieldSchema(name:data_type, type:string, comment:from deserializer), FieldSchema(name:comment,
type:string, comment:from deserializer)], properties:null)
@@ -371,7 +358,6 @@ Shutting down query describe formatted escape_comments_view1
 'View Rewrite Enabled:','No                  ','NULL'
 28 rows selected 
 >>>  show formatted index on escape_comments_tbl1;
-Acquired the compile lock.
 Compiling commandqueryId=(!!{queryId}!!): show formatted index on escape_comments_tbl1
 Semantic Analysis Completed
 Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:idx_name, type:string, comment:from
deserializer), FieldSchema(name:tab_name, type:string, comment:from deserializer), FieldSchema(name:col_names,
type:string, comment:from deserializer), FieldSchema(name:idx_tab_name, type:string, comment:from
deserializer), FieldSchema(name:idx_type, type:string, comment:from deserializer), FieldSchema(name:comment,
type:string, comment:from deserializer)], properties:null)
@@ -393,7 +379,6 @@ Shutting down query show formatted index on escape_comments_tbl1
 4 rows selected 
 >>>  
 >>>  drop database escape_comments_db cascade;
-Acquired the compile lock.
 Compiling commandqueryId=(!!{queryId}!!): drop database escape_comments_db cascade
 Semantic Analysis Completed
 Returning Hive schema: Schema(fieldSchemas:null, properties:null)


Mime
View raw message