[
https://issues.apache.org/jira/browse/PIG-4965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15408890#comment-15408890
]
liyunzhang_intel commented on PIG-4965:
---------------------------------------
[~daijy] and [~rohini]: As you are familiar with pigmix benchmark, can you
help review this?
> 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
>
> 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)