Author: cws Date: Tue Sep 4 08:04:59 2012 New Revision: 1380479 URL: http://svn.apache.org/viewvc?rev=1380479&view=rev Log: HIVE-3412. Fix TestCliDriver.repair on Hadoop 0.23.3, 3.0.0, and 2.2.0-alpha (Zhenxiao Luo via cws)
Added: hive/trunk/ql/src/test/queries/clientpositive/repair_hadoop23.q hive/trunk/ql/src/test/results/clientpositive/repair_hadoop23.q.out Modified: hive/trunk/ql/src/test/queries/clientpositive/repair.q hive/trunk/ql/src/test/results/clientpositive/repair.q.out Modified: hive/trunk/ql/src/test/queries/clientpositive/repair.q URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/repair.q?rev=1380479&r1=1380478&r2=1380479&view=diff ============================================================================== --- hive/trunk/ql/src/test/queries/clientpositive/repair.q (original) +++ hive/trunk/ql/src/test/queries/clientpositive/repair.q Tue Sep 4 08:04:59 2012 @@ -2,10 +2,23 @@ CREATE TABLE repairtable(col STRING) PARTITIONED BY (p1 STRING, p2 STRING); +-- EXCLUDE_HADOOP_MAJOR_VERSIONS(0.20, 0.23) + +-- When you invoke the mkdir command using versions of Hadoop up to and including 0.23, +-- they behave as if you had specified the -p option, +-- *but* they don't actually support the -p option. + +-- Support for the -p option first appeared in 1.0 and 2.0, +-- but they maintain backward compatibility with older versions, +-- so they let you include -p, but if you don't they still act like you did. + +-- HADOOP-8551 breaks backward compatibility with 0.23 and older versions by +-- requiring you to explicitly specify -p if you require that behavior. + MSCK TABLE repairtable; -dfs -mkdir ../build/ql/test/data/warehouse/repairtable/p1=a/p2=a; -dfs -mkdir ../build/ql/test/data/warehouse/repairtable/p1=b/p2=a; +dfs -mkdir -p ../build/ql/test/data/warehouse/repairtable/p1=a/p2=a; +dfs -mkdir -p ../build/ql/test/data/warehouse/repairtable/p1=b/p2=a; MSCK TABLE repairtable; Added: hive/trunk/ql/src/test/queries/clientpositive/repair_hadoop23.q URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/repair_hadoop23.q?rev=1380479&view=auto ============================================================================== --- hive/trunk/ql/src/test/queries/clientpositive/repair_hadoop23.q (added) +++ hive/trunk/ql/src/test/queries/clientpositive/repair_hadoop23.q Tue Sep 4 08:04:59 2012 @@ -0,0 +1,28 @@ + + +CREATE TABLE repairtable(col STRING) PARTITIONED BY (p1 STRING, p2 STRING); + +-- INCLUDE_HADOOP_MAJOR_VERSIONS(0.20, 0.23) +-- When you invoke the mkdir command using versions of Hadoop up to and including 0.23, +-- they behave as if you had specified the -p option, +-- *but* they don't actually support the -p option. + +-- Support for the -p option first appeared in 1.0 and 2.0, +-- but they maintain backward compatibility with older versions, +-- so they let you include -p, but if you don't they still act like you did. + +-- HADOOP-8551 breaks backward compatibility with 0.23 and older versions by +-- requiring you to explicitly specify -p if you require that behavior. + +MSCK TABLE repairtable; + +dfs -mkdir ../build/ql/test/data/warehouse/repairtable/p1=a/p2=a; +dfs -mkdir ../build/ql/test/data/warehouse/repairtable/p1=b/p2=a; + +MSCK TABLE repairtable; + +MSCK REPAIR TABLE repairtable; + +MSCK TABLE repairtable; + + Modified: hive/trunk/ql/src/test/results/clientpositive/repair.q.out URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/repair.q.out?rev=1380479&r1=1380478&r2=1380479&view=diff ============================================================================== --- hive/trunk/ql/src/test/results/clientpositive/repair.q.out (original) +++ hive/trunk/ql/src/test/results/clientpositive/repair.q.out Tue Sep 4 08:04:59 2012 @@ -3,9 +3,33 @@ PREHOOK: type: CREATETABLE POSTHOOK: query: CREATE TABLE repairtable(col STRING) PARTITIONED BY (p1 STRING, p2 STRING) POSTHOOK: type: CREATETABLE POSTHOOK: Output: default@repairtable -PREHOOK: query: MSCK TABLE repairtable +PREHOOK: query: -- EXCLUDE_HADOOP_MAJOR_VERSIONS(0.20, 0.23) +-- When you invoke the mkdir command using versions of Hadoop up to and including 0.23, +-- they behave as if you had specified the -p option, +-- *but* they don't actually support the -p option. + +-- Support for the -p option first appeared in 1.0 and 2.0, +-- but they maintain backward compatibility with older versions, +-- so they let you include -p, but if you don't they still act like you did. + +-- HADOOP-8551 breaks backward compatibility with 0.23 and older versions by +-- requiring you to explicitly specify -p if you require that behavior. + +MSCK TABLE repairtable PREHOOK: type: MSCK -POSTHOOK: query: MSCK TABLE repairtable +POSTHOOK: query: -- EXCLUDE_HADOOP_MAJOR_VERSIONS(0.20, 0.23) +-- When you invoke the mkdir command using versions of Hadoop up to and including 0.23, +-- they behave as if you had specified the -p option, +-- *but* they don't actually support the -p option. + +-- Support for the -p option first appeared in 1.0 and 2.0, +-- but they maintain backward compatibility with older versions, +-- so they let you include -p, but if you don't they still act like you did. + +-- HADOOP-8551 breaks backward compatibility with 0.23 and older versions by +-- requiring you to explicitly specify -p if you require that behavior. + +MSCK TABLE repairtable POSTHOOK: type: MSCK PREHOOK: query: MSCK TABLE repairtable PREHOOK: type: MSCK Added: hive/trunk/ql/src/test/results/clientpositive/repair_hadoop23.q.out URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/repair_hadoop23.q.out?rev=1380479&view=auto ============================================================================== --- hive/trunk/ql/src/test/results/clientpositive/repair_hadoop23.q.out (added) +++ hive/trunk/ql/src/test/results/clientpositive/repair_hadoop23.q.out Tue Sep 4 08:04:59 2012 @@ -0,0 +1,49 @@ +PREHOOK: query: CREATE TABLE repairtable(col STRING) PARTITIONED BY (p1 STRING, p2 STRING) +PREHOOK: type: CREATETABLE +POSTHOOK: query: CREATE TABLE repairtable(col STRING) PARTITIONED BY (p1 STRING, p2 STRING) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: default@repairtable +PREHOOK: query: -- INCLUDE_HADOOP_MAJOR_VERSIONS(0.20, 0.23) +-- When you invoke the mkdir command using versions of Hadoop up to and including 0.23, +-- they behave as if you had specified the -p option, +-- *but* they don't actually support the -p option. + +-- Support for the -p option first appeared in 1.0 and 2.0, +-- but they maintain backward compatibility with older versions, +-- so they let you include -p, but if you don't they still act like you did. + +-- HADOOP-8551 breaks backward compatibility with 0.23 and older versions by +-- requiring you to explicitly specify -p if you require that behavior. + +MSCK TABLE repairtable +PREHOOK: type: MSCK +POSTHOOK: query: -- INCLUDE_HADOOP_MAJOR_VERSIONS(0.20, 0.23) +-- When you invoke the mkdir command using versions of Hadoop up to and including 0.23, +-- they behave as if you had specified the -p option, +-- *but* they don't actually support the -p option. + +-- Support for the -p option first appeared in 1.0 and 2.0, +-- but they maintain backward compatibility with older versions, +-- so they let you include -p, but if you don't they still act like you did. + +-- HADOOP-8551 breaks backward compatibility with 0.23 and older versions by +-- requiring you to explicitly specify -p if you require that behavior. + +MSCK TABLE repairtable +POSTHOOK: type: MSCK +PREHOOK: query: MSCK TABLE repairtable +PREHOOK: type: MSCK +POSTHOOK: query: MSCK TABLE repairtable +POSTHOOK: type: MSCK +Partitions not in metastore: repairtable:p1=a/p2=a repairtable:p1=b/p2=a +PREHOOK: query: MSCK REPAIR TABLE repairtable +PREHOOK: type: MSCK +POSTHOOK: query: MSCK REPAIR TABLE repairtable +POSTHOOK: type: MSCK +Partitions not in metastore: repairtable:p1=a/p2=a repairtable:p1=b/p2=a +Repair: Added partition to metastore repairtable:p1=a/p2=a +Repair: Added partition to metastore repairtable:p1=b/p2=a +PREHOOK: query: MSCK TABLE repairtable +PREHOOK: type: MSCK +POSTHOOK: query: MSCK TABLE repairtable +POSTHOOK: type: MSCK