FAQ
Author: hashutosh
Date: Thu Sep 19 20:39:26 2013
New Revision: 1524830

URL: http://svn.apache.org/r1524830
Log:
HIVE-5086 : Fix scriptfile1.q on Windows (Daniel Dai via Ashutosh Chauhan)

Added:
     hive/trunk/ql/src/test/queries/clientpositive/scriptfile1_win.q
     hive/trunk/ql/src/test/results/clientpositive/scriptfile1_win.q.out
     hive/trunk/ql/src/test/scripts/testgrep_win.bat
Modified:
     hive/trunk/build-common.xml
     hive/trunk/ql/src/test/queries/clientpositive/scriptfile1.q
     hive/trunk/ql/src/test/results/clientpositive/scriptfile1.q.out

Modified: hive/trunk/build-common.xml
URL: http://svn.apache.org/viewvc/hive/trunk/build-common.xml?rev=1524830&r1=1524829&r2=1524830&view=diff
==============================================================================
--- hive/trunk/build-common.xml (original)
+++ hive/trunk/build-common.xml Thu Sep 19 20:39:26 2013
@@ -59,7 +59,7 @@
    <property name="test.output" value="true"/>
    <property name="test.junit.output.format" value="xml"/>
    <property name="test.junit.output.usefile" value="true"/>
- <property name="minimr.query.files" value="list_bucket_dml_10.q,input16_cc.q,scriptfile1.q,bucket4.q,bucketmapjoin6.q,disable_merge_for_bucketing.q,reduce_deduplicate.q,smb_mapjoin_8.q,join1.q,groupby2.q,bucketizedhiveinputformat.q,bucketmapjoin7.q,optrstat_groupby.q,bucket_num_reducers.q,bucket5.q,load_fs2.q,bucket_num_reducers2.q,infer_bucket_sort_merge.q,infer_bucket_sort_reducers_power_two.q,infer_bucket_sort_dyn_part.q,infer_bucket_sort_bucketed_table.q,infer_bucket_sort_map_operators.q,infer_bucket_sort_num_buckets.q,leftsemijoin_mr.q,schemeAuthority.q,schemeAuthority2.q,truncate_column_buckets.q,remote_script.q,,load_hdfs_file_with_space_in_the_name.q,parallel_orderby.q"/>
+ <property name="minimr.query.files" value="list_bucket_dml_10.q,input16_cc.q,scriptfile1.q,scriptfile1_win.q,bucket4.q,bucketmapjoin6.q,disable_merge_for_bucketing.q,reduce_deduplicate.q,smb_mapjoin_8.q,join1.q,groupby2.q,bucketizedhiveinputformat.q,bucketmapjoin7.q,optrstat_groupby.q,bucket_num_reducers.q,bucket5.q,load_fs2.q,bucket_num_reducers2.q,infer_bucket_sort_merge.q,infer_bucket_sort_reducers_power_two.q,infer_bucket_sort_dyn_part.q,infer_bucket_sort_bucketed_table.q,infer_bucket_sort_map_operators.q,infer_bucket_sort_num_buckets.q,leftsemijoin_mr.q,schemeAuthority.q,schemeAuthority2.q,truncate_column_buckets.q,remote_script.q,,load_hdfs_file_with_space_in_the_name.q,parallel_orderby.q"/>
    <property name="minimr.query.negative.files" value="cluster_tasklog_retrieval.q,minimr_broken_pipe.q,mapreduce_stack_trace.q,mapreduce_stack_trace_turnoff.q,mapreduce_stack_trace_hadoop20.q,mapreduce_stack_trace_turnoff_hadoop20.q" />
    <property name="test.silent" value="true"/>
    <property name="hadoopVersion" value="${hadoop.version.ant-internal}"/>

Modified: hive/trunk/ql/src/test/queries/clientpositive/scriptfile1.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/scriptfile1.q?rev=1524830&r1=1524829&r2=1524830&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/scriptfile1.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/scriptfile1.q Thu Sep 19 20:39:26 2013
@@ -1,4 +1,6 @@
  set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
+
+-- EXCLUDE_OS_WINDOWS
  CREATE TABLE dest1(key INT, value STRING);

  ADD FILE src/test/scripts/testgrep;

Added: hive/trunk/ql/src/test/queries/clientpositive/scriptfile1_win.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/scriptfile1_win.q?rev=1524830&view=auto
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/scriptfile1_win.q (added)
+++ hive/trunk/ql/src/test/queries/clientpositive/scriptfile1_win.q Thu Sep 19 20:39:26 2013
@@ -0,0 +1,16 @@
+set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
+-- INCLUDE_OS_WINDOWS
+
+CREATE TABLE dest1(key INT, value STRING);
+
+ADD FILE src/test/scripts/testgrep_win.bat;
+
+FROM (
+ FROM src
+ SELECT TRANSFORM(src.key, src.value)
+ USING 'testgrep_win.bat' AS (tkey, tvalue)
+ CLUSTER BY tkey
+) tmap
+INSERT OVERWRITE TABLE dest1 SELECT tmap.tkey, tmap.tvalue;
+
+SELECT dest1.* FROM dest1;

Modified: hive/trunk/ql/src/test/results/clientpositive/scriptfile1.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/scriptfile1.q.out?rev=1524830&r1=1524829&r2=1524830&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/scriptfile1.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/scriptfile1.q.out Thu Sep 19 20:39:26 2013
@@ -1,6 +1,8 @@
-PREHOOK: query: CREATE TABLE dest1(key INT, value STRING)
+PREHOOK: query: -- EXCLUDE_OS_WINDOWS
+CREATE TABLE dest1(key INT, value STRING)
  PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE dest1(key INT, value STRING)
+POSTHOOK: query: -- EXCLUDE_OS_WINDOWS
+CREATE TABLE dest1(key INT, value STRING)
  POSTHOOK: type: CREATETABLE
  POSTHOOK: Output: default@dest1
  PREHOOK: query: FROM (

Added: hive/trunk/ql/src/test/results/clientpositive/scriptfile1_win.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/scriptfile1_win.q.out?rev=1524830&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/scriptfile1_win.q.out (added)
+++ hive/trunk/ql/src/test/results/clientpositive/scriptfile1_win.q.out Thu Sep 19 20:39:26 2013
@@ -0,0 +1,54 @@
+PREHOOK: query: -- INCLUDE_OS_WINDOWS
+
+CREATE TABLE dest1(key INT, value STRING)
+PREHOOK: type: CREATETABLE
+POSTHOOK: query: -- INCLUDE_OS_WINDOWS
+
+CREATE TABLE dest1(key INT, value STRING)
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: default@dest1
+PREHOOK: query: FROM (
+ FROM src
+ SELECT TRANSFORM(src.key, src.value)
+ USING 'testgrep_win.bat' AS (tkey, tvalue)
+ CLUSTER BY tkey
+) tmap
+INSERT OVERWRITE TABLE dest1 SELECT tmap.tkey, tmap.tvalue
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@dest1
+POSTHOOK: query: FROM (
+ FROM src
+ SELECT TRANSFORM(src.key, src.value)
+ USING 'testgrep_win.bat' AS (tkey, tvalue)
+ CLUSTER BY tkey
+) tmap
+INSERT OVERWRITE TABLE dest1 SELECT tmap.tkey, tmap.tvalue
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@dest1
+POSTHOOK: Lineage: dest1.key SCRIPT [(src)src.FieldSchema(name:key, type:string, comment:default), (src)src.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: dest1.value SCRIPT [(src)src.FieldSchema(name:key, type:string, comment:default), (src)src.FieldSchema(name:value, type:string, comment:default), ]
+PREHOOK: query: SELECT dest1.* FROM dest1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@dest1
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT dest1.* FROM dest1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@dest1
+#### A masked pattern was here ####
+POSTHOOK: Lineage: dest1.key SCRIPT [(src)src.FieldSchema(name:key, type:string, comment:default), (src)src.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: dest1.value SCRIPT [(src)src.FieldSchema(name:key, type:string, comment:default), (src)src.FieldSchema(name:value, type:string, comment:default), ]
+NULL NULL
+NULL NULL
+10 val_10
+100 val_100
+100 val_100
+103 val_103
+103 val_103
+104 val_104
+104 val_104
+105 val_105
+310 val_310
+NULL NULL
+NULL NULL

Added: hive/trunk/ql/src/test/scripts/testgrep_win.bat
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/scripts/testgrep_win.bat?rev=1524830&view=auto
==============================================================================
--- hive/trunk/ql/src/test/scripts/testgrep_win.bat (added)
+++ hive/trunk/ql/src/test/scripts/testgrep_win.bat Thu Sep 19 20:39:26 2013
@@ -0,0 +1,17 @@
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+
+findstr "10.*"

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedSep 19, '13 at 8:40p
activeSep 19, '13 at 8:40p
posts1
users1
websitehive.apache.org

1 user in discussion

Hashutosh: 1 post

People

Translate

site design / logo © 2021 Grokbase