Review Board 1.7.22


SQOOP-690. Fix threading issues in SqoopOutputFormatLoadExecutor

Review Request #8063 - Created Nov. 15, 2012 and updated

Hari Shreedharan
SQOOP-690
Reviewers
Sqoop
sqoop-sqoop2
Improved thread handling in SqoopOutputFormatLoadExecutor. Removed the synchronized blocks and wait/notify.
Ran unit tests, and on a real cluster.

Diff revision 3

This is not the most recent revision of the diff. The latest diff is revision 4. See what's changed.

1 2 3 4
1 2 3 4

  1. execution/mapreduce/src/main/java/org/apache/sqoop/job/io/Data.java: Loading...
  2. execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopOutputFormatLoadExecutor.java: Loading...
execution/mapreduce/src/main/java/org/apache/sqoop/job/io/Data.java
Revision 41fceb8 New Change
[20] 34 lines
[+20]
35

    
   
35

   
36
  // The content is an Object to accommodate different kinds of data.
36
  // The content is an Object to accommodate different kinds of data.
37
  // For example, it can be:
37
  // For example, it can be:
38
  // - Object[] for an array of object record
38
  // - Object[] for an array of object record
39
  // - String for a text of CSV record
39
  // - String for a text of CSV record
40
  private Object content = null;
40
  private volatile Object content = null;
41

    
   
41

   
42
  public static final int EMPTY_DATA = 0;
42
  public static final int EMPTY_DATA = 0;
43
  public static final int CSV_RECORD = 1;
43
  public static final int CSV_RECORD = 1;
44
  public static final int ARRAY_RECORD = 2;
44
  public static final int ARRAY_RECORD = 2;
45
  private int type = EMPTY_DATA;
45
  private int type = EMPTY_DATA;
[+20] [20] 484 lines
execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopOutputFormatLoadExecutor.java
Revision 0d636ae New Change
 
  1. execution/mapreduce/src/main/java/org/apache/sqoop/job/io/Data.java: Loading...
  2. execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopOutputFormatLoadExecutor.java: Loading...