pig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject svn commit: r1755520 - in /pig/trunk: CHANGES.txt test/perf/pigmix/bin/runpigmix.pl
Date Mon, 08 Aug 2016 17:36:34 GMT
Author: daijy
Date: Mon Aug  8 17:36:33 2016
New Revision: 1755520

URL: http://svn.apache.org/viewvc?rev=1755520&view=rev
Log:
PIG-4965: Refactor test/perf/pigmix/bin/runpigmix.pl to delete the output of single test case
if we enable cleanup_after_test

Modified:
    pig/trunk/CHANGES.txt
    pig/trunk/test/perf/pigmix/bin/runpigmix.pl

Modified: pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1755520&r1=1755519&r2=1755520&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Mon Aug  8 17:36:33 2016
@@ -38,6 +38,9 @@ OPTIMIZATIONS
  
 BUG FIXES
 
+PIG-4965: Refactor test/perf/pigmix/bin/runpigmix.pl to delete the output of single test
case
+  if we enable cleanup_after_test (kellyzly via daijy)
+
 PIG-4966: Fix Pig compatibility with Hive 2.1.0 (zyork via daijy)
 
 PIG-4935: TEZ_USE_CLUSTER_HADOOP_LIBS is always set to true (rohini)

Modified: pig/trunk/test/perf/pigmix/bin/runpigmix.pl
URL: http://svn.apache.org/viewvc/pig/trunk/test/perf/pigmix/bin/runpigmix.pl?rev=1755520&r1=1755519&r2=1755520&view=diff
==============================================================================
--- pig/trunk/test/perf/pigmix/bin/runpigmix.pl (original)
+++ pig/trunk/test/perf/pigmix/bin/runpigmix.pl Mon Aug  8 17:36:33 2016
@@ -60,7 +60,8 @@ for(my $i = 1; $i <= 17; $i++) {
         print STDERR `$cmd 2>&1`;
         my $e = time();
         $pig_times += $e - $s;
-        cleanup($i);
+        my $output="$pigmixoutput/pig";
+        cleanup($output,$i);
     }
     # find avg
     $pig_times = $pig_times/$runs;
@@ -82,7 +83,8 @@ for(my $i = 1; $i <= 17; $i++) {
             print STDERR `$cmd 2>&1`;
             my $e = time();
             $mr_times += $e - $s;
-            cleanup($i);
+            my $output="$pigmixoutput/mapreduce";
+            cleanup($output,$i);
         }
         # find avg
         $mr_times = $mr_times/$runs;
@@ -108,20 +110,19 @@ else {
 }
 
 sub cleanup {
+    my $output = shift;
     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";
+        $cmd = "$pigbin -e rmf $output/L".$suffix."out";
+        print STDERR `$cmd 2>&1`;
+        $cmd = "$pigbin -e rmf $output/highest_value_page_per_user";
+        print STDERR `$cmd 2>&1`;
+        $cmd = "$pigbin -e rmf $output/total_timespent_per_term";
+        print STDERR `$cmd 2>&1`;
+        $cmd = "$pigbin -e rmf $output/queries_per_action";
+        print STDERR `$cmd 2>&1`;
+        $cmd = "$pigbin -e rmf tmp";
         print STDERR `$cmd 2>&1`;
     }
 }



Mime
View raw message