Review Board 1.7.22


SQOOP-893 Fix job submission progress percentage

Review Request #9581 - Created Feb. 25, 2013 and submitted

Jarek Cecho
SQOOP-893
Reviewers
Sqoop
sqoop-sqoop2
The submission engine is returning number from interval <0, 1>, thus this number must be multiplied by 100 on the client side when showing to the user.
Unit tests seems to be passing and I've verified the functionality on real cluster.
client/src/main/java/org/apache/sqoop/client/utils/SubmissionDisplayer.java
Revision dd94f2ee616a220d160d2eb8cd6f3d075c13ee2c New Change
[20] 64 lines
[+20] [+] public static void display(IO io, MSubmission submission) {
65
      double progress = submission.getProgress();
65
      double progress = submission.getProgress();
66
      io.out.print("Progress: ");
66
      io.out.print("Progress: ");
67
      if(progress == -1) {
67
      if(progress == -1) {
68
        io.out.println("Progress is not available");
68
        io.out.println("Progress is not available");
69
      } else {
69
      } else {
70
        io.out.println(String.format("%.2f %%", progress));
70
        io.out.println(String.format("%.2f %%", progress * 100));
71
      }
71
      }
72
    }
72
    }
73

    
   
73

   
74
    Counters counters = submission.getCounters();
74
    Counters counters = submission.getCounters();
75
    if(counters != null) {
75
    if(counters != null) {
[+20] [20] 35 lines
  1. client/src/main/java/org/apache/sqoop/client/utils/SubmissionDisplayer.java: Loading...