You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by ch...@apache.org on 2014/04/29 19:36:50 UTC

svn commit: r1591026 [2/2] - in /pig/branches/tez: ./ bin/ contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/ contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/ contrib/piggybank/java/src/test/java/org/apach...

Modified: pig/branches/tez/test/org/apache/pig/test/TestMRJobStats.java
URL: http://svn.apache.org/viewvc/pig/branches/tez/test/org/apache/pig/test/TestMRJobStats.java?rev=1591026&r1=1591025&r2=1591026&view=diff
==============================================================================
--- pig/branches/tez/test/org/apache/pig/test/TestMRJobStats.java (original)
+++ pig/branches/tez/test/org/apache/pig/test/TestMRJobStats.java Tue Apr 29 17:36:49 2014
@@ -244,9 +244,8 @@ public class TestMRJobStats {
         Configuration conf = new Configuration();
 
         long size = 2L * 1024 * 1024 * 1024;
-        Method getOutputSize = getJobStatsMethod("getOutputSize", POStore.class, Configuration.class);
-        long outputSize = (Long) getOutputSize.invoke(
-                null, createPOStoreForFileBasedSystem(size, new PigStorageWithStatistics(), conf), conf);
+        long outputSize = JobStats.getOutputSize(
+                createPOStoreForFileBasedSystem(size, new PigStorageWithStatistics(), conf), conf);
 
         assertEquals("The returned output size is expected to be the same as the file size",
                 size, outputSize);
@@ -259,9 +258,8 @@ public class TestMRJobStats {
 
         // ClientSystemProps is needed to instantiate HBaseStorage
         UDFContext.getUDFContext().setClientSystemProps(new Properties());
-        Method getOutputSize = getJobStatsMethod("getOutputSize", POStore.class, Configuration.class);
-        long outputSize = (Long) getOutputSize.invoke(
-                null, createPOStoreForNonFileBasedSystem(new HBaseStorage("colName"), conf), conf);
+        long outputSize = JobStats.getOutputSize(
+                createPOStoreForNonFileBasedSystem(new HBaseStorage("colName"), conf), conf);
 
         assertEquals("The default output size reader returns -1 for a non-file-based uri",
                 -1, outputSize);
@@ -276,15 +274,14 @@ public class TestMRJobStats {
 
         // ClientSystemProps is needed to instantiate HBaseStorage
         UDFContext.getUDFContext().setClientSystemProps(new Properties());
-        Method getOutputSize = getJobStatsMethod("getOutputSize", POStore.class, Configuration.class);
-        long outputSize = (Long) getOutputSize.invoke(
-                null, createPOStoreForNonFileBasedSystem(new HBaseStorage("colName"), conf), conf);
+        long outputSize = JobStats.getOutputSize(
+                createPOStoreForNonFileBasedSystem(new HBaseStorage("colName"), conf), conf);
 
         assertEquals("The dummy output size reader always returns " + DummyOutputSizeReader.SIZE,
                 DummyOutputSizeReader.SIZE, outputSize);
     }
 
-    @Test(expected = InvocationTargetException.class)
+    @Test(expected = RuntimeException.class)
     public void testGetOuputSizeUsingNonFileBasedStorage3() throws Exception {
         // Register an invalid output size reader in configuration, and verify
         // that an exception is thrown at run-time.
@@ -293,10 +290,8 @@ public class TestMRJobStats {
 
         // ClientSystemProps is needed to instantiate HBaseStorage
         UDFContext.getUDFContext().setClientSystemProps(new Properties());
-        Method getOutputSize = getJobStatsMethod("getOutputSize", POStore.class, Configuration.class);
-
-        getOutputSize.invoke(
-                null, createPOStoreForNonFileBasedSystem(new HBaseStorage("colName"), conf), conf);
+        JobStats.getOutputSize(
+                createPOStoreForNonFileBasedSystem(new HBaseStorage("colName"), conf), conf);
     }
 
     @Test
@@ -310,9 +305,8 @@ public class TestMRJobStats {
 
         // ClientSystemProps needs to be initialized to instantiate HBaseStorage
         UDFContext.getUDFContext().setClientSystemProps(new Properties());
-        Method getOutputSize = getJobStatsMethod("getOutputSize", POStore.class, Configuration.class);
-        long outputSize = (Long) getOutputSize.invoke(
-                null, createPOStoreForNonFileBasedSystem(new HBaseStorage("colName"), conf), conf);
+        long outputSize = JobStats.getOutputSize(
+                createPOStoreForNonFileBasedSystem(new HBaseStorage("colName"), conf), conf);
 
         assertEquals("The dummy output size reader always returns " + DummyOutputSizeReader.SIZE,
                 DummyOutputSizeReader.SIZE, outputSize);

Propchange: pig/branches/tez/test/org/apache/pig/test/data/bzipdir1.bz2/bzipdir2.bz2/recordLossblockHeaderEndsAt136500.txt.bz2
------------------------------------------------------------------------------
  Merged /pig/trunk/test/org/apache/pig/test/data/bzipdir1.bz2/bzipdir2.bz2/recordLossblockHeaderEndsAt136500.txt.bz2:r1586886-1591006

Modified: pig/branches/tez/test/perf/pigmix/bin/runpigmix.pl
URL: http://svn.apache.org/viewvc/pig/branches/tez/test/perf/pigmix/bin/runpigmix.pl?rev=1591026&r1=1591025&r2=1591026&view=diff
==============================================================================
--- pig/branches/tez/test/perf/pigmix/bin/runpigmix.pl (original)
+++ pig/branches/tez/test/perf/pigmix/bin/runpigmix.pl Tue Apr 29 17:36:49 2014
@@ -82,8 +82,9 @@ for(my $i = 1; $i <= 17; $i++) {
 
 
         my $multiplier=0;
-        if ($mr_times!=0) 
+        if ($mr_times!=0) {
             $multiplier = $pig_times/$mr_times;
+        }
         print "PigMix_$i pig run time: $pig_times, java run time: $mr_times, multiplier: $multiplier\n";
     }
 }