hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashutosh Chauhan (JIRA)" <>
Subject [jira] [Commented] (HIVE-3204) Windows: Fix the unit tests which contains “!<cmd>” commands (Unix shell commands)
Date Wed, 11 Jul 2012 06:15:34 GMT


Ashutosh Chauhan commented on HIVE-3204:

[] : Few comments:
* I see that you have added temp subdir in few places and then do rm immediately. As you noted
I believe this is the case when dir doesnt exist dfs -rmr throws some exception while !rm
-rf was not. If thats the case then I think we should remove !rm -rf statement altogether
since there is no point in removing non-existent dir. Also, its confusing to create a dir
and then remove it immediately. 
* In few .q.out files, output has changed from 1 2 4 to "Found 3 items" this looks suspicious.
Do you know why that has happened ?
* Try to minimize white space changes in patch. There were quite bunch of them in this patch.

> Windows: Fix the unit tests which contains “!<cmd>” commands (Unix shell commands)
> ----------------------------------------------------------------------------------
>                 Key: HIVE-3204
>                 URL:
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Tests, Windows
>    Affects Versions: 0.10.0
>            Reporter: Kanna Karanam
>            Assignee: Kanna Karanam
>             Fix For: 0.10.0
>         Attachments: HIVE-3204.1.patch.txt
> Possible solution 1: (Preferred one)
> !<Unix cmd | Windows cmd> => Keeping the same syntax. Hive uses Java runtime
to launch the shell command  so any attempt to run windows commands on Unix will fail and
vice versa.
> To deal with unit tests. Unix commands in each .q file will be modified as shown below.
I will filter out the !commands which can’t be run on the current .
> Original entry in.q file:
> !rm -rf ../build/ql/test/data/exports/exim_department;
> It will be replaced with the following entries.
> UNIX::!rm -rf ../build/ql/test/data/exports/exim_department;
> WINDOWS::!del ../build/ql/test/data/exports/exim_department
> Possible solution 2:
> Provide a Shell UDF library(JAVA Based code)to support platform independent shell functionality
> Cons – 
> 1) Difficult to provide full shell functionality
> 2) Takes long time
> 3) Difficult to manage

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message