Author: gates
Date: Mon Jul 28 15:36:36 2008
New Revision: 680546

URL: http://svn.apache.org/viewvc?rev=680546&view=rev
Log:
Fixed progress indicator so that we get whole percentages (33%) instead of 
double (33.33333333333%).


Modified:
    
incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/LocalLauncher.java
    
incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MapReduceLauncher.java

Modified: 
incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/LocalLauncher.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/LocalLauncher.java?rev=680546&r1=680545&r2=680546&view=diff
==============================================================================
--- 
incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/LocalLauncher.java
 (original)
+++ 
incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/LocalLauncher.java
 Mon Jul 28 15:36:36 2008
@@ -25,7 +25,7 @@
 
 
 public class LocalLauncher extends Launcher{
-    private static final Log log = LogFactory.getLog(Launcher.class);
+    private static final Log log = LogFactory.getLog(LocalLauncher.class);
     
     @Override
     public boolean launchPig(PhysicalPlan php,
@@ -62,7 +62,7 @@
             } catch (InterruptedException e) {}
             double prog = calculateProgress(jc, jobClient)/numMRJobs;
             if(prog>lastProg)
-                log.info(prog * 100 + "% complete");
+                log.info((int)(prog * 100) + "% complete");
             lastProg = prog;
         }
         lastProg = calculateProgress(jc, jobClient)/numMRJobs;
@@ -137,7 +137,7 @@
             }
             double prog = calculateProgress(jc, jobClient) / numMRJobs;
             if (prog > lastProg)
-                log.info(prog * 100 + "% complete");
+                log.info((int)(prog * 100) + "% complete");
             lastProg = prog;
         }
         lastProg = calculateProgress(jc, jobClient) / numMRJobs;

Modified: 
incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MapReduceLauncher.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MapReduceLauncher.java?rev=680546&r1=680545&r2=680546&view=diff
==============================================================================
--- 
incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MapReduceLauncher.java
 (original)
+++ 
incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MapReduceLauncher.java
 Mon Jul 28 15:36:36 2008
@@ -29,7 +29,7 @@
  *
  */
 public class MapReduceLauncher extends Launcher{
-    private static final Log log = LogFactory.getLog(Launcher.class);
+    private static final Log log = LogFactory.getLog(MapReduceLauncher.class);
     @Override
     public boolean launchPig(PhysicalPlan php,
                              String grpName,
@@ -63,7 +63,7 @@
             } catch (InterruptedException e) {}
             double prog = calculateProgress(jc, jobClient)/numMRJobs;
             if(prog>lastProg)
-                log.info(prog * 100 + "% complete");
+                log.info((int)(prog * 100) + "% complete");
             lastProg = prog;
         }
         lastProg = calculateProgress(jc, jobClient)/numMRJobs;


Reply via email to