pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "liyunzhang_intel (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (PIG-4965) Refactor test/perf/pigmix/bin/runpigmix.pl to delete the output of single test case if we enable cleanup_after_test
Date Mon, 08 Aug 2016 07:40:20 GMT

     [ https://issues.apache.org/jira/browse/PIG-4965?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

liyunzhang_intel updated PIG-4965:
----------------------------------
    Attachment: PIG-4965.patch

> Refactor test/perf/pigmix/bin/runpigmix.pl to delete the output of single test case if
we enable cleanup_after_test
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-4965
>                 URL: https://issues.apache.org/jira/browse/PIG-4965
>             Project: Pig
>          Issue Type: Bug
>            Reporter: liyunzhang_intel
>            Assignee: liyunzhang_intel
>         Attachments: PIG-4965.patch
>
>
> in  test/perf/pigmix/bin/runpigmix.pl#cleanup
> {code}
> sub cleanup {
>     my $suffix = shift;
>     my $cmd;
>     $cmd = "$pigbin -e rmf L".$suffix."out";
>     print STDERR `$cmd 2>&1`;
>     $cmd = "$pigbin -e rmf highest_value_page_per_user";
>     print STDERR `$cmd 2>&1`;
>     $cmd = "$pigbin -e rmf total_timespent_per_term";
>     print STDERR `$cmd 2>&1`;
>     $cmd = "$pigbin -e rmf queries_per_action";
>     print STDERR `$cmd 2>&1`;
>     $cmd = "$pigbin -e rmf tmp";
>     print STDERR `$cmd 2>&1`;
>     if ($cleanup_after_test) {
>         $cmd = "$hadoopbin fs -rmr $pigmixoutput";
>         print STDERR `$cmd 2>&1`;
>     }   
> }
> {code}
> In PIG-200, it deletes the output of the single script. But the output of a single script
is not [L.$suffix.out|https://github.com/apache/pig/blob/spark/test/perf/pigmix/bin/runpigmix.pl#L113]
so the output is not deleted. The correct output of a single script is PIGMIX_OUTPUT/L.$suffix.out.
In PIG-4753(Pigmix should have option to delete outputs after completing the tests), we can
delete the output if we enable cleanup_after_test.  So i think we can refactor the code as
following:
> {code}
> sub cleanup {
>     if ($cleanup_after_test) {
>         my $suffix = shift;
>         my $cmd;
>         $cmd = "$pigbin -e rmf $pigmixoutput/L".$suffix."out";
>         print STDERR `$cmd 2>&1`;
>         $cmd = "$pigbin -e rmf $pigmixoutput/highest_value_page_per_user";
>         print STDERR `$cmd 2>&1`;
>         $cmd = "$pigbin -e rmf $pigmixoutput/total_timespent_per_term";
>         print STDERR `$cmd 2>&1`;
>         $cmd = "$pigbin -e rmf $pigmixoutput/queries_per_action";
>         print STDERR `$cmd 2>&1`;
>         $cmd = "$pigbin -e rmf tmp";
>         print STDERR `$cmd 2>&1`;
>     }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message