You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by kg...@apache.org on 2020/05/09 09:31:01 UTC

[hive] 01/02: HIVE-23369: schq_ingest may run twice during a test execution (Zoltan Haindrich reviewed by Miklos Gergely)

This is an automated email from the ASF dual-hosted git repository.

kgyrtkirk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git

commit 220351f23c79bae8849f8c00cc59bb8ebb18b6ca
Author: Zoltan Haindrich <ki...@rxd.hu>
AuthorDate: Sat May 9 08:50:07 2020 +0000

    HIVE-23369: schq_ingest may run twice during a test execution (Zoltan Haindrich reviewed by Miklos Gergely)
    
    Signed-off-by: Zoltan Haindrich <ki...@rxd.hu>
---
 ql/src/test/queries/clientpositive/schq_analyze.q               | 4 ++--
 ql/src/test/queries/clientpositive/schq_ingest.q                | 4 ++--
 ql/src/test/queries/clientpositive/schq_materialized.q          | 4 ++--
 ql/src/test/results/clientpositive/llap/schq_analyze.q.out      | 4 ++--
 ql/src/test/results/clientpositive/llap/schq_ingest.q.out       | 4 ++--
 ql/src/test/results/clientpositive/llap/schq_materialized.q.out | 6 +++---
 6 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/ql/src/test/queries/clientpositive/schq_analyze.q b/ql/src/test/queries/clientpositive/schq_analyze.q
index 246a215..7d8fa8b 100644
--- a/ql/src/test/queries/clientpositive/schq_analyze.q
+++ b/ql/src/test/queries/clientpositive/schq_analyze.q
@@ -16,8 +16,8 @@ insert into t values (1),(2),(3);
 -- basic stats show that the table has "0" rows
 desc formatted t;
 
--- create a schedule to compute stats
-create scheduled query t_analyze cron '0 */1 * * * ? *' as analyze table t compute statistics for columns;
+-- create a schedule to compute stats in the far future
+create scheduled query t_analyze cron '0 0 0 1 * ? 2030' as analyze table t compute statistics for columns;
 
 alter scheduled query t_analyze execute;
 
diff --git a/ql/src/test/queries/clientpositive/schq_ingest.q b/ql/src/test/queries/clientpositive/schq_ingest.q
index 8ffc722..2357e7e 100644
--- a/ql/src/test/queries/clientpositive/schq_ingest.q
+++ b/ql/src/test/queries/clientpositive/schq_ingest.q
@@ -26,8 +26,8 @@ join t_offset on id>=offset) s1
 insert into t select id,cnt where not first
 insert overwrite table t_offset select max(s1.id);
  
--- configure to run ingestion every 10 minutes
-create scheduled query ingest every 10 minutes defined as
+-- configure to run ingestion - in the far future
+create scheduled query ingest cron '0 0 0 1 * ? 2030' defined as
 from (select id==offset as first,* from s
 join t_offset on id>=offset) s1
 insert into t select id,cnt where not first
diff --git a/ql/src/test/queries/clientpositive/schq_materialized.q b/ql/src/test/queries/clientpositive/schq_materialized.q
index 46b725e..f629bdf 100644
--- a/ql/src/test/queries/clientpositive/schq_materialized.q
+++ b/ql/src/test/queries/clientpositive/schq_materialized.q
@@ -59,8 +59,8 @@ SELECT empid, deptname FROM emps
 JOIN depts ON (emps.deptno = depts.deptno)
 WHERE hire_date >= '2018-01-01';
 
--- create a schedule to rebuild mv
-create scheduled query d cron '0 0 * * * ? *' defined as 
+-- create a schedule to rebuild mv (in the far future)
+create scheduled query d cron '0 0 0 1 * ? 2030' defined as 
   alter materialized view mv1 rebuild;
 
 set hive.support.quoted.identifiers=none;
diff --git a/ql/src/test/results/clientpositive/llap/schq_analyze.q.out b/ql/src/test/results/clientpositive/llap/schq_analyze.q.out
index a083479..4824557 100644
--- a/ql/src/test/results/clientpositive/llap/schq_analyze.q.out
+++ b/ql/src/test/results/clientpositive/llap/schq_analyze.q.out
@@ -53,9 +53,9 @@ Bucket Columns:     	[]
 Sort Columns:       	[]                  	 
 Storage Desc Params:	 	 
 	serialization.format	1                   
-PREHOOK: query: create scheduled query t_analyze cron '0 */1 * * * ? *' as analyze table t compute statistics for columns
+PREHOOK: query: create scheduled query t_analyze cron '0 0 0 1 * ? 2030' as analyze table t compute statistics for columns
 PREHOOK: type: CREATE SCHEDULED QUERY
-POSTHOOK: query: create scheduled query t_analyze cron '0 */1 * * * ? *' as analyze table t compute statistics for columns
+POSTHOOK: query: create scheduled query t_analyze cron '0 0 0 1 * ? 2030' as analyze table t compute statistics for columns
 POSTHOOK: type: CREATE SCHEDULED QUERY
 PREHOOK: query: alter scheduled query t_analyze execute
 PREHOOK: type: ALTER SCHEDULED QUERY
diff --git a/ql/src/test/results/clientpositive/llap/schq_ingest.q.out b/ql/src/test/results/clientpositive/llap/schq_ingest.q.out
index 19d2b11..8e5c123 100644
--- a/ql/src/test/results/clientpositive/llap/schq_ingest.q.out
+++ b/ql/src/test/results/clientpositive/llap/schq_ingest.q.out
@@ -76,13 +76,13 @@ POSTHOOK: Lineage: t.cnt SIMPLE [(s)s.FieldSchema(name:cnt, type:int, comment:nu
 POSTHOOK: Lineage: t.id SIMPLE [(s)s.FieldSchema(name:id, type:int, comment:null), ]
 POSTHOOK: Lineage: t_offset.offset EXPRESSION [(s)s.FieldSchema(name:id, type:int, comment:null), ]
 Warning: Shuffle Join MERGEJOIN[34][tables = [s, t_offset]] in Stage 'Reducer 2' is a cross product
-PREHOOK: query: create scheduled query ingest every 10 minutes defined as
+PREHOOK: query: create scheduled query ingest cron '0 0 0 1 * ? 2030' defined as
 from (select id==offset as first,* from s
 join t_offset on id>=offset) s1
 insert into t select id,cnt where not first
 insert overwrite table t_offset select max(s1.id)
 PREHOOK: type: CREATE SCHEDULED QUERY
-POSTHOOK: query: create scheduled query ingest every 10 minutes defined as
+POSTHOOK: query: create scheduled query ingest cron '0 0 0 1 * ? 2030' defined as
 from (select id==offset as first,* from s
 join t_offset on id>=offset) s1
 insert into t select id,cnt where not first
diff --git a/ql/src/test/results/clientpositive/llap/schq_materialized.q.out b/ql/src/test/results/clientpositive/llap/schq_materialized.q.out
index ff86bb5..43631b5 100644
--- a/ql/src/test/results/clientpositive/llap/schq_materialized.q.out
+++ b/ql/src/test/results/clientpositive/llap/schq_materialized.q.out
@@ -263,10 +263,10 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-PREHOOK: query: create scheduled query d cron '0 0 * * * ? *' defined as 
+PREHOOK: query: create scheduled query d cron '0 0 0 1 * ? 2030' defined as 
   alter materialized view mv1 rebuild
 PREHOOK: type: CREATE SCHEDULED QUERY
-POSTHOOK: query: create scheduled query d cron '0 0 * * * ? *' defined as 
+POSTHOOK: query: create scheduled query d cron '0 0 0 1 * ? 2030' defined as 
   alter materialized view mv1 rebuild
 POSTHOOK: type: CREATE SCHEDULED QUERY
 PREHOOK: query: select `(NEXT_EXECUTION|SCHEDULED_QUERY_ID)?+.+` from sys.scheduled_queries
@@ -277,7 +277,7 @@ POSTHOOK: query: select `(NEXT_EXECUTION|SCHEDULED_QUERY_ID)?+.+` from sys.sched
 POSTHOOK: type: QUERY
 POSTHOOK: Input: sys@scheduled_queries
 #### A masked pattern was here ####
-d	true	hive	0 0 * * * ? *	hive_admin_user	alter materialized view `default`.`mv1` rebuild	NULL
+d	true	hive	0 0 0 1 * ? 2030	hive_admin_user	alter materialized view `default`.`mv1` rebuild	NULL
 PREHOOK: query: alter scheduled query d execute
 PREHOOK: type: ALTER SCHEDULED QUERY
 POSTHOOK: query: alter scheduled query d execute