pig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From roh...@apache.org
Subject svn commit: r1717857 - in /pig/trunk: CHANGES.txt test/perf/pigmix/bin/runpigmix.pl
Date Thu, 03 Dec 2015 22:31:18 GMT
Author: rohini
Date: Thu Dec  3 22:31:17 2015
New Revision: 1717857

URL: http://svn.apache.org/viewvc?rev=1717857&view=rev
Log:
PIG-4753: Pigmix should have option to delete outputs after completing the tests (mitdesai
via rohini)

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=1717857&r1=1717856&r2=1717857&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Thu Dec  3 22:31:17 2015
@@ -24,6 +24,8 @@ INCOMPATIBLE CHANGES
 
 IMPROVEMENTS
 
+PIG-4753: Pigmix should have option to delete outputs after completing the tests (mitdesai
via rohini)
+
 PIG-4744: Honor tez.staging-dir setting in tez-site.xml (rohini via daijy)
 
 PIG-4742: Document Pig's Register Artifact Command added in PIG-4417 (akshayrai09 via daijy)

Modified: pig/trunk/test/perf/pigmix/bin/runpigmix.pl
URL: http://svn.apache.org/viewvc/pig/trunk/test/perf/pigmix/bin/runpigmix.pl?rev=1717857&r1=1717856&r2=1717857&view=diff
==============================================================================
--- pig/trunk/test/perf/pigmix/bin/runpigmix.pl (original)
+++ pig/trunk/test/perf/pigmix/bin/runpigmix.pl Thu Dec  3 22:31:17 2015
@@ -2,7 +2,7 @@
 
 if(scalar(@ARGV) < 6 )
 {
-    print STDERR "Usage: $0 <pig_home> <pig_bin> <pigmix_jar> <hadoop_home>
<hadoop_bin> <pig mix scripts dir> <hdfs_root> <pigmix_output> [parallel]
[numruns] [runmapreduce] \n";
+    print STDERR "Usage: $0 <pig_home> <pig_bin> <pigmix_jar> <hadoop_home>
<hadoop_bin> <pig mix scripts dir> <hdfs_root> <pigmix_output> [parallel]
[numruns] [runmapreduce] [cleanup_after_test]\n";
     exit(-1);
 }
 my $pighome = shift;
@@ -16,6 +16,7 @@ my $pigmixoutput = shift;
 my $parallel = shift;
 my $runs = shift;
 my $runmapreduce = shift;
+my $cleanup_after_tests = shift;
 my $pigjar = "$pighome/pig-withouthadoop.jar";
 if(!defined($parallel)) {
     $parallel = 40;
@@ -26,6 +27,9 @@ if(!defined($runs)) {
 if(!defined($runmapreduce)) {
     $runmapreduce = 1;
 }
+if(!defined($cleanup_after_test)) {
+    $cleanup_after_test = 0;
+}
 
 $ENV{'HADOOP_HOME'} = $hadoophome;
 $ENV{'HADOOP_CLIENT_OPTS'}="-Xmx1024m";
@@ -110,5 +114,9 @@ sub cleanup {
     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`;
+    }
 }
 



Mime
View raw message