hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1205285 - in /hive/trunk: cli/src/java/org/apache/hadoop/hive/cli/ ql/src/test/org/apache/hadoop/hive/ql/hooks/ ql/src/test/queries/clientnegative/ ql/src/test/queries/clientpositive/
Date Wed, 23 Nov 2011 04:50:45 GMT
Author: jvs
Date: Wed Nov 23 04:50:40 2011
New Revision: 1205285

URL: http://svn.apache.org/viewvc?rev=1205285&view=rev
Log:
HIVE-2593 [jira] avoid referencing /tmp in tests

Summary:
Replaced '/tmp' with '${system:test.tmp.dir}' in all q files.

This is what is causing parallel tests to fail when multiple instances run on
the same node.  I grepped for "/tmp" in ql/src/test/queries/clientpositive and
the results match the test failures I'm getting.

Test Plan: EMPTY

Reviewers: JIRA, jsichi

Reviewed By: jsichi

CC: mareksapotafb, jsichi

Differential Revision: 501

Modified:
    hive/trunk/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java
    hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/hooks/VerifyContentSummaryCacheHook.java
    hive/trunk/ql/src/test/queries/clientnegative/archive_multi7.q
    hive/trunk/ql/src/test/queries/clientnegative/duplicate_insert3.q
    hive/trunk/ql/src/test/queries/clientnegative/index_compact_entry_limit.q
    hive/trunk/ql/src/test/queries/clientnegative/index_compact_size_limit.q
    hive/trunk/ql/src/test/queries/clientpositive/hook_context_cs.q
    hive/trunk/ql/src/test/queries/clientpositive/index_auto.q
    hive/trunk/ql/src/test/queries/clientpositive/index_bitmap.q
    hive/trunk/ql/src/test/queries/clientpositive/index_bitmap1.q
    hive/trunk/ql/src/test/queries/clientpositive/index_bitmap2.q
    hive/trunk/ql/src/test/queries/clientpositive/index_bitmap3.q
    hive/trunk/ql/src/test/queries/clientpositive/index_bitmap_auto.q
    hive/trunk/ql/src/test/queries/clientpositive/index_bitmap_rc.q
    hive/trunk/ql/src/test/queries/clientpositive/index_compact.q
    hive/trunk/ql/src/test/queries/clientpositive/index_compact_1.q
    hive/trunk/ql/src/test/queries/clientpositive/index_compact_2.q
    hive/trunk/ql/src/test/queries/clientpositive/index_compact_3.q
    hive/trunk/ql/src/test/queries/clientpositive/insertexternal1.q
    hive/trunk/ql/src/test/queries/clientpositive/load_fs.q
    hive/trunk/ql/src/test/queries/clientpositive/multi_insert.q

Modified: hive/trunk/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java
URL: http://svn.apache.org/viewvc/hive/trunk/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java?rev=1205285&r1=1205284&r2=1205285&view=diff
==============================================================================
--- hive/trunk/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java (original)
+++ hive/trunk/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java Wed Nov 23 04:50:40
2011
@@ -55,6 +55,7 @@ import org.apache.hadoop.hive.ql.exec.Ha
 import org.apache.hadoop.hive.ql.exec.Utilities;
 import org.apache.hadoop.hive.ql.exec.Utilities.StreamPrinter;
 import org.apache.hadoop.hive.ql.parse.ParseDriver;
+import org.apache.hadoop.hive.ql.parse.VariableSubstitution;
 import org.apache.hadoop.hive.ql.processors.CommandProcessor;
 import org.apache.hadoop.hive.ql.processors.CommandProcessorFactory;
 import org.apache.hadoop.hive.ql.session.SessionState;
@@ -124,6 +125,7 @@ public class CliDriver {
     } else if (cmd_trimmed.startsWith("!")) {
 
       String shell_cmd = cmd_trimmed.substring(1);
+      shell_cmd = new VariableSubstitution().substitute(ss.getConf(), shell_cmd);
 
       // shell_cmd = "/bin/bash -c \'" + shell_cmd + "\'";
       try {

Modified: hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/hooks/VerifyContentSummaryCacheHook.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/hooks/VerifyContentSummaryCacheHook.java?rev=1205285&r1=1205284&r2=1205285&view=diff
==============================================================================
--- hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/hooks/VerifyContentSummaryCacheHook.java
(original)
+++ hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/hooks/VerifyContentSummaryCacheHook.java
Wed Nov 23 04:50:40 2011
@@ -32,9 +32,10 @@ public class VerifyContentSummaryCacheHo
       Assert.assertEquals(0, inputToCS.size());
     } else {
       Assert.assertEquals(1, inputToCS.size());
+      String tmp_dir = System.getProperty("test.tmp.dir");
       for (String key : inputToCS.keySet()) {
-        if (!key.equals("/tmp/VerifyContentSummaryCacheHook") &&
-            !key.equals("pfile:/tmp/VerifyContentSummaryCacheHook")) {
+        if (!key.equals(tmp_dir + "/VerifyContentSummaryCacheHook") &&
+            !key.equals("pfile:" + tmp_dir + "/VerifyContentSummaryCacheHook")) {
           Assert.fail("VerifyContentSummaryCacheHook fails the input path check");
         }
       }

Modified: hive/trunk/ql/src/test/queries/clientnegative/archive_multi7.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientnegative/archive_multi7.q?rev=1205285&r1=1205284&r2=1205285&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientnegative/archive_multi7.q (original)
+++ hive/trunk/ql/src/test/queries/clientnegative/archive_multi7.q Wed Nov 23 04:50:40 2011
@@ -7,6 +7,6 @@ CREATE TABLE tstsrcpart LIKE srcpart;
 INSERT OVERWRITE TABLE tstsrcpart PARTITION (ds='2008-04-08', hr='11')
 SELECT key, value FROM srcpart WHERE ds='2008-04-08' AND hr='11';
 ALTER TABLE tstsrcpart ADD PARTITION (ds='2008-04-08', hr='12')
-LOCATION "/tmp/tstsrc";
+LOCATION "${system:test.tmp.dir}/tstsrc";
 
 ALTER TABLE tstsrcpart ARCHIVE PARTITION (ds='2008-04-08');

Modified: hive/trunk/ql/src/test/queries/clientnegative/duplicate_insert3.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientnegative/duplicate_insert3.q?rev=1205285&r1=1205284&r2=1205285&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientnegative/duplicate_insert3.q (original)
+++ hive/trunk/ql/src/test/queries/clientnegative/duplicate_insert3.q Wed Nov 23 04:50:40
2011
@@ -1,4 +1,4 @@
 
 from src
-insert overwrite directory '/tmp/dest1' select key, value
-insert overwrite directory '/tmp/dest1' select key, value;
+insert overwrite directory '${system:test.tmp.dir}/dest1' select key, value
+insert overwrite directory '${system:test.tmp.dir}/dest1' select key, value;

Modified: hive/trunk/ql/src/test/queries/clientnegative/index_compact_entry_limit.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientnegative/index_compact_entry_limit.q?rev=1205285&r1=1205284&r2=1205285&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientnegative/index_compact_entry_limit.q (original)
+++ hive/trunk/ql/src/test/queries/clientnegative/index_compact_entry_limit.q Wed Nov 23 04:50:40
2011
@@ -4,8 +4,8 @@ CREATE INDEX src_index ON TABLE src(key)
 ALTER INDEX src_index ON src REBUILD;
 
 SET hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-INSERT OVERWRITE DIRECTORY "/tmp/index_result" SELECT `_bucketname` ,  `_offsets` FROM default__src_src_index__
WHERE key<1000;
-SET hive.index.compact.file=/tmp/index_result;
+INSERT OVERWRITE DIRECTORY "${system:test.tmp.dir}/index_result" SELECT `_bucketname` , 
`_offsets` FROM default__src_src_index__ WHERE key<1000;
+SET hive.index.compact.file=${system:test.tmp.dir}/index_result;
 SET hive.input.format=org.apache.hadoop.hive.ql.index.compact.HiveCompactIndexInputFormat;
 SET hive.index.compact.query.max.entries=5;
 SELECT key, value FROM src WHERE key=100 ORDER BY key;

Modified: hive/trunk/ql/src/test/queries/clientnegative/index_compact_size_limit.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientnegative/index_compact_size_limit.q?rev=1205285&r1=1205284&r2=1205285&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientnegative/index_compact_size_limit.q (original)
+++ hive/trunk/ql/src/test/queries/clientnegative/index_compact_size_limit.q Wed Nov 23 04:50:40
2011
@@ -4,8 +4,8 @@ CREATE INDEX src_index ON TABLE src(key)
 ALTER INDEX src_index ON src REBUILD;
 
 SET hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-INSERT OVERWRITE DIRECTORY "/tmp/index_result" SELECT `_bucketname` ,  `_offsets` FROM default__src_src_index__
WHERE key<1000;
-SET hive.index.compact.file=/tmp/index_result;
+INSERT OVERWRITE DIRECTORY "${system:test.tmp.dir}/index_result" SELECT `_bucketname` , 
`_offsets` FROM default__src_src_index__ WHERE key<1000;
+SET hive.index.compact.file=${system:test.tmp.dir}/index_result;
 SET hive.input.format=org.apache.hadoop.hive.ql.index.compact.HiveCompactIndexInputFormat;
 SET hive.index.compact.query.max.size=1024;
 SELECT key, value FROM src WHERE key=100 ORDER BY key;

Modified: hive/trunk/ql/src/test/queries/clientpositive/hook_context_cs.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/hook_context_cs.q?rev=1205285&r1=1205284&r2=1205285&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/hook_context_cs.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/hook_context_cs.q Wed Nov 23 04:50:40 2011
@@ -1,6 +1,6 @@
 drop table vcsc;
 CREATE TABLE vcsc (c STRING) PARTITIONED BY (ds STRING);
-ALTER TABLE vcsc ADD partition (ds='dummy') location '/tmp/VerifyContentSummaryCacheHook';
+ALTER TABLE vcsc ADD partition (ds='dummy') location '${system:test.tmp.dir}/VerifyContentSummaryCacheHook';
 
 set hive.exec.pre.hooks=org.apache.hadoop.hive.ql.hooks.VerifyContentSummaryCacheHook;
 SELECT a.c, b.c FROM vcsc a JOIN vcsc b ON a.ds = 'dummy' AND b.ds = 'dummy' AND a.c = b.c;

Modified: hive/trunk/ql/src/test/queries/clientpositive/index_auto.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/index_auto.q?rev=1205285&r1=1205284&r2=1205285&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/index_auto.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/index_auto.q Wed Nov 23 04:50:40 2011
@@ -9,8 +9,8 @@ ALTER INDEX src_index ON src REBUILD;
 SET hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
 
 -- manual indexing
-INSERT OVERWRITE DIRECTORY "/tmp/index_where" SELECT `_bucketname` ,  `_offsets` FROM default__src_src_index__
WHERE key > 80 AND key < 100;
-SET hive.index.compact.file=/tmp/index_where;
+INSERT OVERWRITE DIRECTORY "${system:test.tmp.dir}/index_where" SELECT `_bucketname` ,  `_offsets`
FROM default__src_src_index__ WHERE key > 80 AND key < 100;
+SET hive.index.compact.file=${system:test.tmp.dir}/index_where;
 SET hive.optimize.index.filter=false;
 SET hive.input.format=org.apache.hadoop.hive.ql.index.compact.HiveCompactIndexInputFormat;
 

Modified: hive/trunk/ql/src/test/queries/clientpositive/index_bitmap.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/index_bitmap.q?rev=1205285&r1=1205284&r2=1205285&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/index_bitmap.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/index_bitmap.q Wed Nov 23 04:50:40 2011
@@ -7,18 +7,18 @@ ALTER INDEX srcpart_index_proj ON srcpar
 SELECT x.* FROM default__srcpart_srcpart_index_proj__ x WHERE x.ds = '2008-04-08' and x.hr
= 11 ORDER BY key;
 
 SET hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-INSERT OVERWRITE DIRECTORY "/tmp/index_test_index_result" SELECT `_bucketname`,
+INSERT OVERWRITE DIRECTORY "${system:test.tmp.dir}/index_test_index_result" SELECT `_bucketname`,
 COLLECT_SET(`_offset`) as `_offsets` FROM default__srcpart_srcpart_index_proj__
 x WHERE NOT EWAH_BITMAP_EMPTY(`_bitmaps`) AND x.key=100 AND x.ds = '2008-04-08' GROUP BY
`_bucketname`;
-SET hive.index.blockfilter.file=/tmp/index_test_index_result;
+SET hive.index.blockfilter.file=${system:test.tmp.dir}/index_test_index_result;
 SET hive.input.format=org.apache.hadoop.hive.ql.index.HiveIndexedInputFormat;
 SELECT key, value FROM srcpart WHERE key=100 AND ds = '2008-04-08' ORDER BY key;
 
 SET hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-INSERT OVERWRITE DIRECTORY "/tmp/index_test_index_result" SELECT `_bucketname` ,
+INSERT OVERWRITE DIRECTORY "${system:test.tmp.dir}/index_test_index_result" SELECT `_bucketname`
,
 COLLECT_SET(`_offset`) as `_offsets` FROM default__srcpart_srcpart_index_proj__
 x WHERE NOT EWAH_BITMAP_EMPTY(`_bitmaps`) AND x.key=100 AND x.ds = '2008-04-08' and x.hr
= 11 GROUP BY `_bucketname`;
-SET hive.index.blockfilter.file=/tmp/index_test_index_result;
+SET hive.index.blockfilter.file=${system:test.tmp.dir}/index_test_index_result;
 SET hive.input.format=org.apache.hadoop.hive.ql.index.HiveIndexedInputFormat;
 SELECT key, value FROM srcpart WHERE key=100 AND ds = '2008-04-08' and hr = 11 ORDER BY key;
 
@@ -34,10 +34,10 @@ ALTER  INDEX srcpart_index_proj ON srcpa
 SELECT x.* FROM default__srcpart_srcpart_index_proj__ x;
 
 SET hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-INSERT OVERWRITE DIRECTORY "/tmp/index_result" SELECT `_bucketname` ,
+INSERT OVERWRITE DIRECTORY "${system:test.tmp.dir}/index_result" SELECT `_bucketname` ,
 COLLECT_SET(`_offset`) as `_offsets` FROM default__srcpart_srcpart_index_proj__
 WHERE NOT EWAH_BITMAP_EMPTY(`_bitmaps`) AND key=100 GROUP BY `_bucketname`;
-SET hive.index.blockfilter.file=/tmp/index_result;
+SET hive.index.blockfilter.file=${system:test.tmp.dir}/index_result;
 SET hive.input.format=org.apache.hadoop.hive.ql.index.HiveIndexedInputFormat;
 SELECT key, value FROM srcpart WHERE key=100 ORDER BY key;
 

Modified: hive/trunk/ql/src/test/queries/clientpositive/index_bitmap1.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/index_bitmap1.q?rev=1205285&r1=1205284&r2=1205285&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/index_bitmap1.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/index_bitmap1.q Wed Nov 23 04:50:40 2011
@@ -5,10 +5,10 @@ ALTER INDEX src_index ON src REBUILD;
 SELECT x.* FROM default__src_src_index__ x ORDER BY key;
 
 SET hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-INSERT OVERWRITE DIRECTORY "/tmp/index_result" SELECT `_bucketname`,
+INSERT OVERWRITE DIRECTORY "${system:test.tmp.dir}/index_result" SELECT `_bucketname`,
 COLLECT_SET(`_offset`) as `_offsets` FROM default__src_src_index__ WHERE NOT
 EWAH_BITMAP_EMPTY(`_bitmaps`) AND key=100 GROUP BY `_bucketname`;
-SET hive.index.blockfilter.file=/tmp/index_result;
+SET hive.index.blockfilter.file=${system:test.tmp.dir}/index_result;
 SET hive.input.format=org.apache.hadoop.hive.ql.index.HiveIndexedInputFormat;
 SELECT key, value FROM src WHERE key=100 ORDER BY key;
 

Modified: hive/trunk/ql/src/test/queries/clientpositive/index_bitmap2.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/index_bitmap2.q?rev=1205285&r1=1205284&r2=1205285&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/index_bitmap2.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/index_bitmap2.q Wed Nov 23 04:50:40 2011
@@ -12,7 +12,7 @@ SELECT * FROM default__src_src2_index__ 
 
 SET hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
 
-INSERT OVERWRITE DIRECTORY "/tmp/index_result" 
+INSERT OVERWRITE DIRECTORY "${system:test.tmp.dir}/index_result" 
 SELECT t.bucketname as `_bucketname`, COLLECT_SET(t.offset) AS `_offsets` FROM
   (SELECT `_bucketname` AS bucketname, `_offset` AS offset
       FROM default__src_src1_index__ 
@@ -22,7 +22,7 @@ SELECT t.bucketname as `_bucketname`, CO
       WHERE value = "val2" AND NOT EWAH_BITMAP_EMPTY(`_bitmaps`)) t
 GROUP BY t.bucketname;
 
-SET hive.index.blockfilter.file=/tmp/index_result;
+SET hive.index.blockfilter.file=${system:test.tmp.dir}/index_result;
 SET hive.input.format=org.apache.hadoop.hive.ql.index.HiveIndexedInputFormat;
 
 SELECT key, value FROM src WHERE key=0 OR value = "val_2" ORDER BY key;

Modified: hive/trunk/ql/src/test/queries/clientpositive/index_bitmap3.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/index_bitmap3.q?rev=1205285&r1=1205284&r2=1205285&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/index_bitmap3.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/index_bitmap3.q Wed Nov 23 04:50:40 2011
@@ -23,7 +23,7 @@ FROM (SELECT `_bucketname` AS bucketname
     a.bucketname = b.bucketname AND a.offset = b.offset WHERE NOT
 EWAH_BITMAP_EMPTY(EWAH_BITMAP_AND(a.bitmaps, b.bitmaps)) GROUP BY a.bucketname;
 
-INSERT OVERWRITE DIRECTORY "/tmp/index_result" 
+INSERT OVERWRITE DIRECTORY "${system:test.tmp.dir}/index_result" 
 SELECT a.bucketname AS `_bucketname`, COLLECT_SET(a.offset) as `_offsets`
 FROM (SELECT `_bucketname` AS bucketname, `_offset` AS offset, `_bitmaps` AS bitmaps FROM
default__src_src1_index__
         WHERE key = 0) a
@@ -34,7 +34,7 @@ FROM (SELECT `_bucketname` AS bucketname
     a.bucketname = b.bucketname AND a.offset = b.offset WHERE NOT
 EWAH_BITMAP_EMPTY(EWAH_BITMAP_AND(a.bitmaps, b.bitmaps)) GROUP BY a.bucketname;
 
-SET hive.index.blockfilter.file=/tmp/index_result;
+SET hive.index.blockfilter.file=${system:test.tmp.dir}/index_result;
 SET hive.input.format=org.apache.hadoop.hive.ql.index.HiveIndexedInputFormat;
 
 SELECT key, value FROM src WHERE key=0 AND value = "val_0" ORDER BY key;

Modified: hive/trunk/ql/src/test/queries/clientpositive/index_bitmap_auto.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/index_bitmap_auto.q?rev=1205285&r1=1205284&r2=1205285&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/index_bitmap_auto.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/index_bitmap_auto.q Wed Nov 23 04:50:40
2011
@@ -29,7 +29,7 @@ FROM (SELECT `_bucketname` AS bucketname
     a.bucketname = b.bucketname AND a.offset = b.offset WHERE NOT
 EWAH_BITMAP_EMPTY(EWAH_BITMAP_AND(a.bitmaps, b.bitmaps)) GROUP BY a.bucketname;
 
-INSERT OVERWRITE DIRECTORY "/tmp/index_result" 
+INSERT OVERWRITE DIRECTORY "${system:test.tmp.dir}/index_result" 
 SELECT a.bucketname AS `_bucketname`, COLLECT_SET(a.offset) as `_offsets`
 FROM (SELECT `_bucketname` AS bucketname, `_offset` AS offset, `_bitmaps` AS bitmaps FROM
default__src_src1_index__
         WHERE key = 0) a

Modified: hive/trunk/ql/src/test/queries/clientpositive/index_bitmap_rc.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/index_bitmap_rc.q?rev=1205285&r1=1205284&r2=1205285&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/index_bitmap_rc.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/index_bitmap_rc.q Wed Nov 23 04:50:40 2011
@@ -12,18 +12,18 @@ ALTER INDEX srcpart_rc_index ON srcpart_
 SELECT x.* FROM default__srcpart_rc_srcpart_rc_index__ x WHERE x.ds = '2008-04-08' and x.hr
= 11 ORDER BY key;
 
 SET hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-INSERT OVERWRITE DIRECTORY "/tmp/index_test_index_result" SELECT `_bucketname`,
+INSERT OVERWRITE DIRECTORY "${system:test.tmp.dir}/index_test_index_result" SELECT `_bucketname`,
 COLLECT_SET(`_offset`) as `_offsets` FROM default__srcpart_rc_srcpart_rc_index__
 x WHERE NOT EWAH_BITMAP_EMPTY(`_bitmaps`) AND x.key=100 AND x.ds = '2008-04-08' GROUP BY
`_bucketname`;
-SET hive.index.blockfilter.file=/tmp/index_test_index_result;
+SET hive.index.blockfilter.file=${system:test.tmp.dir}/index_test_index_result;
 SET hive.input.format=org.apache.hadoop.hive.ql.index.HiveIndexedInputFormat;
 SELECT key, value FROM srcpart_rc WHERE key=100 AND ds = '2008-04-08' ORDER BY key;
 
 SET hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-INSERT OVERWRITE DIRECTORY "/tmp/index_test_index_result" SELECT `_bucketname` ,
+INSERT OVERWRITE DIRECTORY "${system:test.tmp.dir}/index_test_index_result" SELECT `_bucketname`
,
 COLLECT_SET(`_offset`) as `_offsets` FROM default__srcpart_rc_srcpart_rc_index__
 x WHERE NOT EWAH_BITMAP_EMPTY(`_bitmaps`) AND x.key=100 AND x.ds = '2008-04-08' and x.hr
= 11 GROUP BY `_bucketname`;
-SET hive.index.blockfilter.file=/tmp/index_test_index_result;
+SET hive.index.blockfilter.file=${system:test.tmp.dir}/index_test_index_result;
 SET hive.input.format=org.apache.hadoop.hive.ql.index.HiveIndexedInputFormat;
 SELECT key, value FROM srcpart_rc WHERE key=100 AND ds = '2008-04-08' and hr = 11 ORDER BY
key;
 
@@ -39,10 +39,10 @@ ALTER  INDEX srcpart_rc_index ON srcpart
 SELECT x.* FROM default__srcpart_rc_srcpart_rc_index__ x WHERE x.key = 100;
 
 SET hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-INSERT OVERWRITE DIRECTORY "/tmp/index_result" SELECT `_bucketname` ,
+INSERT OVERWRITE DIRECTORY "${system:test.tmp.dir}/index_result" SELECT `_bucketname` ,
 COLLECT_SET(`_offset`) as `_offsets` FROM default__srcpart_rc_srcpart_rc_index__
 WHERE NOT EWAH_BITMAP_EMPTY(`_bitmaps`) AND key=100 GROUP BY `_bucketname`;
-SET hive.index.blockfilter.file=/tmp/index_result;
+SET hive.index.blockfilter.file=${system:test.tmp.dir}/index_result;
 SET hive.input.format=org.apache.hadoop.hive.ql.index.HiveIndexedInputFormat;
 SELECT key, value FROM srcpart_rc WHERE key=100 ORDER BY key;
 

Modified: hive/trunk/ql/src/test/queries/clientpositive/index_compact.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/index_compact.q?rev=1205285&r1=1205284&r2=1205285&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/index_compact.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/index_compact.q Wed Nov 23 04:50:40 2011
@@ -7,14 +7,14 @@ ALTER INDEX srcpart_index_proj ON srcpar
 SELECT x.* FROM default__srcpart_srcpart_index_proj__ x WHERE x.ds = '2008-04-08' and x.hr
= 11 ORDER BY key;
 
 SET hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-INSERT OVERWRITE DIRECTORY "/tmp/index_test_index_result" SELECT `_bucketname` ,  `_offsets`
FROM default__srcpart_srcpart_index_proj__ x WHERE x.key=100 AND x.ds = '2008-04-08';
-SET hive.index.compact.file=/tmp/index_test_index_result;
+INSERT OVERWRITE DIRECTORY "${system:test.tmp.dir}/index_test_index_result" SELECT `_bucketname`
,  `_offsets` FROM default__srcpart_srcpart_index_proj__ x WHERE x.key=100 AND x.ds = '2008-04-08';
+SET hive.index.compact.file=${system:test.tmp.dir}/index_test_index_result;
 SET hive.input.format=org.apache.hadoop.hive.ql.index.compact.HiveCompactIndexInputFormat;
 SELECT key, value FROM srcpart WHERE key=100 AND ds = '2008-04-08' ORDER BY key;
 
 SET hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-INSERT OVERWRITE DIRECTORY "/tmp/index_test_index_result" SELECT `_bucketname` ,  `_offsets`
FROM default__srcpart_srcpart_index_proj__ x WHERE x.key=100 AND x.ds = '2008-04-08' and x.hr
= 11;
-SET hive.index.compact.file=/tmp/index_test_index_result;
+INSERT OVERWRITE DIRECTORY "${system:test.tmp.dir}/index_test_index_result" SELECT `_bucketname`
,  `_offsets` FROM default__srcpart_srcpart_index_proj__ x WHERE x.key=100 AND x.ds = '2008-04-08'
and x.hr = 11;
+SET hive.index.compact.file=${system:test.tmp.dir}/index_test_index_result;
 SET hive.input.format=org.apache.hadoop.hive.ql.index.compact.HiveCompactIndexInputFormat;
 SELECT key, value FROM srcpart WHERE key=100 AND ds = '2008-04-08' and hr = 11 ORDER BY key;
 
@@ -30,8 +30,8 @@ ALTER  INDEX srcpart_index_proj ON srcpa
 SELECT x.* FROM default__srcpart_srcpart_index_proj__ x;
 
 SET hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-INSERT OVERWRITE DIRECTORY "/tmp/index_result" SELECT `_bucketname` ,  `_offsets` FROM default__srcpart_srcpart_index_proj__
WHERE key=100;
-SET hive.index.compact.file=/tmp/index_result;
+INSERT OVERWRITE DIRECTORY "${system:test.tmp.dir}/index_result" SELECT `_bucketname` , 
`_offsets` FROM default__srcpart_srcpart_index_proj__ WHERE key=100;
+SET hive.index.compact.file=${system:test.tmp.dir}/index_result;
 SET hive.input.format=org.apache.hadoop.hive.ql.index.compact.HiveCompactIndexInputFormat;
 SELECT key, value FROM srcpart WHERE key=100 ORDER BY key;
 

Modified: hive/trunk/ql/src/test/queries/clientpositive/index_compact_1.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/index_compact_1.q?rev=1205285&r1=1205284&r2=1205285&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/index_compact_1.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/index_compact_1.q Wed Nov 23 04:50:40 2011
@@ -5,8 +5,8 @@ ALTER INDEX src_index ON src REBUILD;
 SELECT x.* FROM default__src_src_index__ x ORDER BY key;
 
 SET hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-INSERT OVERWRITE DIRECTORY "/tmp/index_result" SELECT `_bucketname` ,  `_offsets` FROM default__src_src_index__
WHERE key=100;
-SET hive.index.compact.file=/tmp/index_result;
+INSERT OVERWRITE DIRECTORY "${system:test.tmp.dir}/index_result" SELECT `_bucketname` , 
`_offsets` FROM default__src_src_index__ WHERE key=100;
+SET hive.index.compact.file=${system:test.tmp.dir}/index_result;
 SET hive.input.format=org.apache.hadoop.hive.ql.index.compact.HiveCompactIndexInputFormat;
 SELECT key, value FROM src WHERE key=100 ORDER BY key;
 

Modified: hive/trunk/ql/src/test/queries/clientpositive/index_compact_2.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/index_compact_2.q?rev=1205285&r1=1205284&r2=1205285&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/index_compact_2.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/index_compact_2.q Wed Nov 23 04:50:40 2011
@@ -10,14 +10,14 @@ ALTER INDEX srcpart_rc_index ON srcpart_
 SELECT x.* FROM default__srcpart_rc_srcpart_rc_index__ x WHERE x.ds = '2008-04-08' and x.hr
= 11 ORDER BY key;
 
 SET hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-INSERT OVERWRITE DIRECTORY "/tmp/index_test_index_result" SELECT `_bucketname` ,  `_offsets`
FROM default__srcpart_rc_srcpart_rc_index__ x WHERE x.key=100 AND x.ds = '2008-04-08';
-SET hive.index.compact.file=/tmp/index_test_index_result;
+INSERT OVERWRITE DIRECTORY "${system:test.tmp.dir}/index_test_index_result" SELECT `_bucketname`
,  `_offsets` FROM default__srcpart_rc_srcpart_rc_index__ x WHERE x.key=100 AND x.ds = '2008-04-08';
+SET hive.index.compact.file=${system:test.tmp.dir}/index_test_index_result;
 SET hive.input.format=org.apache.hadoop.hive.ql.index.compact.HiveCompactIndexInputFormat;
 SELECT key, value FROM srcpart_rc WHERE key=100 AND ds = '2008-04-08' ORDER BY key;
 
 SET hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-INSERT OVERWRITE DIRECTORY "/tmp/index_test_index_result" SELECT `_bucketname` ,  `_offsets`
FROM default__srcpart_rc_srcpart_rc_index__ x WHERE x.key=100 AND x.ds = '2008-04-08' and
x.hr = 11;
-SET hive.index.compact.file=/tmp/index_test_index_result;
+INSERT OVERWRITE DIRECTORY "${system:test.tmp.dir}/index_test_index_result" SELECT `_bucketname`
,  `_offsets` FROM default__srcpart_rc_srcpart_rc_index__ x WHERE x.key=100 AND x.ds = '2008-04-08'
and x.hr = 11;
+SET hive.index.compact.file=${system:test.tmp.dir}/index_test_index_result;
 SET hive.input.format=org.apache.hadoop.hive.ql.index.compact.HiveCompactIndexInputFormat;
 SELECT key, value FROM srcpart_rc WHERE key=100 AND ds = '2008-04-08' and hr = 11 ORDER BY
key;
 
@@ -33,8 +33,8 @@ ALTER  INDEX srcpart_rc_index ON srcpart
 SELECT x.* FROM default__srcpart_rc_srcpart_rc_index__ x ORDER BY key;
 
 SET hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-INSERT OVERWRITE DIRECTORY "/tmp/index_result" SELECT `_bucketname` ,  `_offsets` FROM default__srcpart_rc_srcpart_rc_index__
WHERE key=100;
-SET hive.index.compact.file=/tmp/index_result;
+INSERT OVERWRITE DIRECTORY "${system:test.tmp.dir}/index_result" SELECT `_bucketname` , 
`_offsets` FROM default__srcpart_rc_srcpart_rc_index__ WHERE key=100;
+SET hive.index.compact.file=${system:test.tmp.dir}/index_result;
 SET hive.input.format=org.apache.hadoop.hive.ql.index.compact.HiveCompactIndexInputFormat;
 SELECT key, value FROM srcpart_rc WHERE key=100 ORDER BY key;
 

Modified: hive/trunk/ql/src/test/queries/clientpositive/index_compact_3.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/index_compact_3.q?rev=1205285&r1=1205284&r2=1205285&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/index_compact_3.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/index_compact_3.q Wed Nov 23 04:50:40 2011
@@ -7,8 +7,8 @@ ALTER INDEX src_index ON src_index_test_
 SELECT x.* FROM default__src_index_test_rc_src_index__ x ORDER BY key;
 
 SET hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-INSERT OVERWRITE DIRECTORY "/tmp/index_result" SELECT `_bucketname` ,  `_offsets` FROM default__src_index_test_rc_src_index__
WHERE key=100;
-SET hive.index.compact.file=/tmp/index_result;
+INSERT OVERWRITE DIRECTORY "${system:test.tmp.dir}/index_result" SELECT `_bucketname` , 
`_offsets` FROM default__src_index_test_rc_src_index__ WHERE key=100;
+SET hive.index.compact.file=${system:test.tmp.dir}/index_result;
 SET hive.input.format=org.apache.hadoop.hive.ql.index.compact.HiveCompactIndexInputFormat;
 SELECT key, value FROM src_index_test_rc WHERE key=100 ORDER BY key;
 

Modified: hive/trunk/ql/src/test/queries/clientpositive/insertexternal1.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/insertexternal1.q?rev=1205285&r1=1205284&r2=1205285&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/insertexternal1.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/insertexternal1.q Wed Nov 23 04:50:40 2011
@@ -2,12 +2,12 @@
 
 create table texternal(key string, val string) partitioned by (insertdate string);
 
-!rm -fr /tmp/texternal;
-!mkdir -p /tmp/texternal/2008-01-01;
+!rm -fr ${system:test.tmp.dir}/texternal;
+!mkdir -p ${system:test.tmp.dir}/texternal/2008-01-01;
 
-alter table texternal add partition (insertdate='2008-01-01') location 'pfile:///tmp/texternal/2008-01-01';
+alter table texternal add partition (insertdate='2008-01-01') location 'pfile://${system:test.tmp.dir}/texternal/2008-01-01';
 from src insert overwrite table texternal partition (insertdate='2008-01-01') select *;
 
 select * from texternal where insertdate='2008-01-01';
 
-!rm -fr /tmp/texternal;
+!rm -fr ${system:test.tmp.dir}/texternal;

Modified: hive/trunk/ql/src/test/queries/clientpositive/load_fs.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/load_fs.q?rev=1205285&r1=1205284&r2=1205285&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/load_fs.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/load_fs.q Wed Nov 23 04:50:40 2011
@@ -1,6 +1,6 @@
 
-create table load_overwrite (key string, value string) stored as textfile location 'file:/tmp/load_overwrite';
-create table load_overwrite2 (key string, value string) stored as textfile location 'file:/tmp/load2_overwrite2';
+create table load_overwrite (key string, value string) stored as textfile location 'file:${system:test.tmp.dir}/load_overwrite';
+create table load_overwrite2 (key string, value string) stored as textfile location 'file:${system:test.tmp.dir}/load2_overwrite2';
 
 load data local inpath '../data/files/kv1.txt' into table load_overwrite;
 load data local inpath '../data/files/kv2.txt' into table load_overwrite;
@@ -10,12 +10,12 @@ show table extended like load_overwrite;
 desc extended load_overwrite;
 select count(*) from load_overwrite;
 
-load data inpath '/tmp/load_overwrite/kv*.txt' overwrite into table load_overwrite2;
+load data inpath '${system:test.tmp.dir}/load_overwrite/kv*.txt' overwrite into table load_overwrite2;
 
 show table extended like load_overwrite2;
 desc extended load_overwrite2;
 select count(*) from load_overwrite2;
 
-load data inpath '/tmp/load2_*' overwrite into table load_overwrite;
+load data inpath '${system:test.tmp.dir}/load2_*' overwrite into table load_overwrite;
 show table extended like load_overwrite;
 select count(*) from load_overwrite;

Modified: hive/trunk/ql/src/test/queries/clientpositive/multi_insert.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/multi_insert.q?rev=1205285&r1=1205284&r2=1205285&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/multi_insert.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/multi_insert.q Wed Nov 23 04:50:40 2011
@@ -196,38 +196,38 @@ select * from src_multi2 order by key, v
 set hive.merge.mapfiles=false;
 set hive.merge.mapredfiles=false;
 
-!rm -fr /tmp/hive_test/multiins_local;
+!rm -fr ${system:test.tmp.dir}/hive_test/multiins_local;
 
 explain
 from src 
-insert overwrite local directory '/tmp/hive_test/multiins_local/0' select * where key = 0
-insert overwrite local directory '/tmp/hive_test/multiins_local/2' select * where key = 2
-insert overwrite local directory '/tmp/hive_test/multiins_local/4' select * where key = 4;
+insert overwrite local directory '${system:test.tmp.dir}/hive_test/multiins_local/0' select
* where key = 0
+insert overwrite local directory '${system:test.tmp.dir}/hive_test/multiins_local/2' select
* where key = 2
+insert overwrite local directory '${system:test.tmp.dir}/hive_test/multiins_local/4' select
* where key = 4;
 
 from src 
-insert overwrite local directory '/tmp/hive_test/multiins_local/0' select * where key = 0
-insert overwrite local directory '/tmp/hive_test/multiins_local/2' select * where key = 2
-insert overwrite local directory '/tmp/hive_test/multiins_local/4' select * where key = 4;
+insert overwrite local directory '${system:test.tmp.dir}/hive_test/multiins_local/0' select
* where key = 0
+insert overwrite local directory '${system:test.tmp.dir}/hive_test/multiins_local/2' select
* where key = 2
+insert overwrite local directory '${system:test.tmp.dir}/hive_test/multiins_local/4' select
* where key = 4;
 
-!ls /tmp/hive_test/multiins_local;
-!rm -fr /tmp/hive_test/multiins_local;
+!ls ${system:test.tmp.dir}/hive_test/multiins_local;
+!rm -fr ${system:test.tmp.dir}/hive_test/multiins_local;
 
 set hive.merge.mapfiles=true;
 set hive.merge.mapredfiles=false;
 
 explain
 from src 
-insert overwrite local directory '/tmp/hive_test/multiins_local/0' select * where key = 0
-insert overwrite local directory '/tmp/hive_test/multiins_local/2' select * where key = 2
-insert overwrite local directory '/tmp/hive_test/multiins_local/4' select * where key = 4;
+insert overwrite local directory '${system:test.tmp.dir}/hive_test/multiins_local/0' select
* where key = 0
+insert overwrite local directory '${system:test.tmp.dir}/hive_test/multiins_local/2' select
* where key = 2
+insert overwrite local directory '${system:test.tmp.dir}/hive_test/multiins_local/4' select
* where key = 4;
 
 from src 
-insert overwrite local directory '/tmp/hive_test/multiins_local/0' select * where key = 0
-insert overwrite local directory '/tmp/hive_test/multiins_local/2' select * where key = 2
-insert overwrite local directory '/tmp/hive_test/multiins_local/4' select * where key = 4;
+insert overwrite local directory '${system:test.tmp.dir}/hive_test/multiins_local/0' select
* where key = 0
+insert overwrite local directory '${system:test.tmp.dir}/hive_test/multiins_local/2' select
* where key = 2
+insert overwrite local directory '${system:test.tmp.dir}/hive_test/multiins_local/4' select
* where key = 4;
 
-!ls /tmp/hive_test/multiins_local;
-!rm -fr /tmp/hive_test/multiins_local;
+!ls ${system:test.tmp.dir}/hive_test/multiins_local;
+!rm -fr ${system:test.tmp.dir}/hive_test/multiins_local;
 
 set hive.merge.mapfiles=false;
 set hive.merge.mapredfiles=true;
@@ -235,31 +235,31 @@ set hive.merge.mapredfiles=true;
 
 explain
 from src 
-insert overwrite local directory '/tmp/hive_test/multiins_local/0' select * where key = 0
-insert overwrite local directory '/tmp/hive_test/multiins_local/2' select * where key = 2
-insert overwrite local directory '/tmp/hive_test/multiins_local/4' select * where key = 4;
+insert overwrite local directory '${system:test.tmp.dir}/hive_test/multiins_local/0' select
* where key = 0
+insert overwrite local directory '${system:test.tmp.dir}/hive_test/multiins_local/2' select
* where key = 2
+insert overwrite local directory '${system:test.tmp.dir}/hive_test/multiins_local/4' select
* where key = 4;
 
 from src 
-insert overwrite local directory '/tmp/hive_test/multiins_local/0' select * where key = 0
-insert overwrite local directory '/tmp/hive_test/multiins_local/2' select * where key = 2
-insert overwrite local directory '/tmp/hive_test/multiins_local/4' select * where key = 4;
+insert overwrite local directory '${system:test.tmp.dir}/hive_test/multiins_local/0' select
* where key = 0
+insert overwrite local directory '${system:test.tmp.dir}/hive_test/multiins_local/2' select
* where key = 2
+insert overwrite local directory '${system:test.tmp.dir}/hive_test/multiins_local/4' select
* where key = 4;
 
-!ls /tmp/hive_test/multiins_local;
-!rm -fr /tmp/hive_test/multiins_local;
+!ls ${system:test.tmp.dir}/hive_test/multiins_local;
+!rm -fr ${system:test.tmp.dir}/hive_test/multiins_local;
 
 set hive.merge.mapfiles=true;
 set hive.merge.mapredfiles=true;
 
 explain
 from src 
-insert overwrite local directory '/tmp/hive_test/multiins_local/0' select * where key = 0
-insert overwrite local directory '/tmp/hive_test/multiins_local/2' select * where key = 2
-insert overwrite local directory '/tmp/hive_test/multiins_local/4' select * where key = 4;
+insert overwrite local directory '${system:test.tmp.dir}/hive_test/multiins_local/0' select
* where key = 0
+insert overwrite local directory '${system:test.tmp.dir}/hive_test/multiins_local/2' select
* where key = 2
+insert overwrite local directory '${system:test.tmp.dir}/hive_test/multiins_local/4' select
* where key = 4;
 
 from src 
-insert overwrite local directory '/tmp/hive_test/multiins_local/0' select * where key = 0
-insert overwrite local directory '/tmp/hive_test/multiins_local/2' select * where key = 2
-insert overwrite local directory '/tmp/hive_test/multiins_local/4' select * where key = 4;
+insert overwrite local directory '${system:test.tmp.dir}/hive_test/multiins_local/0' select
* where key = 0
+insert overwrite local directory '${system:test.tmp.dir}/hive_test/multiins_local/2' select
* where key = 2
+insert overwrite local directory '${system:test.tmp.dir}/hive_test/multiins_local/4' select
* where key = 4;
 
-!ls /tmp/hive_test/multiins_local;
-!rm -fr /tmp/hive_test/multiins_local;
+!ls ${system:test.tmp.dir}/hive_test/multiins_local;
+!rm -fr ${system:test.tmp.dir}/hive_test/multiins_local;



Mime
View raw message