Review Board 1.7.22


SQOOP-676 Add lastUpdateDate to MSubmission

Review Request #7904 - Created Nov. 6, 2012 and submitted

Jarek Cecho
SQOOP-676
Reviewers
Sqoop
sqoop-sqoop2
I've added proposed new field. Right now it's not serialized into repository which makes it little bit useless, but that task i already covered by another JIRA.
I've added unit tests and tested it on testing cluster.
client/src/main/java/org/apache/sqoop/client/utils/SubmissionDisplayer.java
Revision a7b4bcaeeb3ee1f41d4c059e037bc349a3600308 New Change
[20] 21 lines
[+20]
22
import org.apache.sqoop.submission.counter.Counter;
22
import org.apache.sqoop.submission.counter.Counter;
23
import org.apache.sqoop.submission.counter.CounterGroup;
23
import org.apache.sqoop.submission.counter.CounterGroup;
24
import org.apache.sqoop.submission.counter.Counters;
24
import org.apache.sqoop.submission.counter.Counters;
25
import org.codehaus.groovy.tools.shell.IO;
25
import org.codehaus.groovy.tools.shell.IO;
26

    
   
26

   

    
   
27
import java.text.SimpleDateFormat;

    
   
28

   
27
/**
29
/**
28
 *
30
 *
29
 */
31
 */
30
public final class SubmissionDisplayer {
32
public final class SubmissionDisplayer {
31

    
   
33

   
32
  public static void display(IO io, MSubmission submission) {
34
  public static void display(IO io, MSubmission submission) {

    
   
35

   

    
   
36
    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-mm-dd HH:mm:ss z");
33
    io.out.println("@|bold Submission details|@");
37
    io.out.println("@|bold Submission details|@");
34

    
   
38

   
35
    io.out.print("Job id: ");
39
    io.out.print("Job id: ");
36
    io.out.println(submission.getJobId());
40
    io.out.println(submission.getJobId());
37

    
   
41

   
38
    io.out.print("Status: ");
42
    io.out.print("Status: ");
39
    printColoredStatus(io, submission.getStatus());
43
    printColoredStatus(io, submission.getStatus());
40
    io.out.println();
44
    io.out.println();
41

    
   
45

   

    
   
46
    io.out.print("Creation date: ");

    
   
47
    io.out.println(dateFormat.format(submission.getCreationDate()));

    
   
48

   

    
   
49
    io.out.print("Last update date: ");

    
   
50
    io.out.println(dateFormat.format(submission.getLastUpdateDate()));

    
   
51

   
42
    String externalId = submission.getExternalId();
52
    String externalId = submission.getExternalId();
43
    if(externalId != null) {
53
    if(externalId != null) {
44
      io.out.print("External Id: ");
54
      io.out.print("External Id: ");
45
      io.out.println(externalId);
55
      io.out.println(externalId);
46

    
   
56

   
[+20] [20] 53 lines
common/src/main/java/org/apache/sqoop/json/SubmissionBean.java
Revision 08804189606b7fee8fd54860787eee4e8aced7f5 New Change
 
common/src/main/java/org/apache/sqoop/model/MSubmission.java
Revision c8ba0e28df241330d625f608faf2095e863ad2d2 New Change
 
common/src/test/java/org/apache/sqoop/json/TestSubmissionBean.java
Revision 9732fa1ab3a5173d12d2a6c3f12130975dbb3aec New Change
 
core/src/main/java/org/apache/sqoop/framework/FrameworkManager.java
Revision 7e10ddc35ea189d606b8045a981e9b049485f5fb New Change
 
repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java
Revision 9db1a4bcd30e11ea04f451c0870a29931bcffd4b New Change
 
  1. client/src/main/java/org/apache/sqoop/client/utils/SubmissionDisplayer.java: Loading...
  2. common/src/main/java/org/apache/sqoop/json/SubmissionBean.java: Loading...
  3. common/src/main/java/org/apache/sqoop/model/MSubmission.java: Loading...
  4. common/src/test/java/org/apache/sqoop/json/TestSubmissionBean.java: Loading...
  5. core/src/main/java/org/apache/sqoop/framework/FrameworkManager.java: Loading...
  6. repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java: Loading...