Review Board 1.7.22


SQOOP-603: Support small intervals in IntegerSplitter implementation

Review Request #7193 - Created Sept. 20, 2012 and submitted

Jarek Cecho
SQOOP-603
Reviewers
Sqoop
sqoop-trunk
I've decided to alter method split() to add one maxVal in case that there is less or equal split points then requested split count.
* ant test
* Real MySQL instance in couple of scenarios
src/java/org/apache/sqoop/mapreduce/db/DataDrivenDBInputFormat.java
Revision 35b74eb New Change
[20] 316 lines
[+20] [+] public static class DataDrivenDBInputSplit
317
     * on the 'upper' end.
317
     * on the 'upper' end.
318
     */
318
     */
319
    public DataDrivenDBInputSplit(final String lower, final String upper) {
319
    public DataDrivenDBInputSplit(final String lower, final String upper) {
320
      this.lowerBoundClause = lower;
320
      this.lowerBoundClause = lower;
321
      this.upperBoundClause = upper;
321
      this.upperBoundClause = upper;

    
   
322

   

    
   
323
      LOG.debug("Creating input split with lower bound '" + lower

    
   
324
        + "' and upper bound '" + upper + "'");
322
    }
325
    }
323

    
   
326

   
324
    /**
327
    /**
325
     * @return The total row count in this split.
328
     * @return The total row count in this split.
326
     */
329
     */
[+20] [20] 28 lines
src/java/org/apache/sqoop/mapreduce/db/IntegerSplitter.java
Revision 8e7a096 New Change
 
src/test/org/apache/sqoop/mapreduce/db/TestIntegerSplitter.java
Revision 22d5140 New Change
 
  1. src/java/org/apache/sqoop/mapreduce/db/DataDrivenDBInputFormat.java: Loading...
  2. src/java/org/apache/sqoop/mapreduce/db/IntegerSplitter.java: Loading...
  3. src/test/org/apache/sqoop/mapreduce/db/TestIntegerSplitter.java: Loading...