[ 
https://issues.apache.org/jira/browse/SQOOP-2399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14584965#comment-14584965
 ] 

William Volkman edited comment on SQOOP-2399 at 6/14/15 7:24 AM:
-----------------------------------------------------------------

{code}
--- BigDecimalSplitter.java~    2015-06-14 00:16:42.520168744 -0600
+++ BigDecimalSplitter.java     2015-06-14 00:23:58.598331128 -0600
@@ -140,7 +140,7 @@
       curVal = curVal.add(splitSize);
     }
 
-    if (splits.get(splits.size() - 1).compareTo(maxVal) != 0
+    if (splits.size() > 1 && splits.get(splits.size() - 1).compareTo(maxVal) 
!= 0
         || splits.size() <= 1) {
       // We didn't end on the maxVal. Add that to the end of the list.
       splits.add(maxVal);
{code}


was (Author: williamvolkman):
{code}
--- BigDecimalSplitter.java~    2015-06-14 00:16:42.520168744 -0600
+++ BigDecimalSplitter.java     2015-06-14 00:23:58.598331128 -0600
@@ -140,7 +140,7 @@
       curVal = curVal.add(splitSize);
     }
 
-    if (splits.get(splits.size() - 1).compareTo(maxVal) != 0
+    if (splits.size() > 1 && splits.get(splits.size() - 1).compareTo(maxVal) 
!= 0
         || splits.size() == 1) {
       // We didn't end on the maxVal. Add that to the end of the list.
       splits.add(maxVal);
{code}

> BigDecimalSplitter java.lang.ArrayIndexOutOfBoundsException
> -----------------------------------------------------------
>
>                 Key: SQOOP-2399
>                 URL: https://issues.apache.org/jira/browse/SQOOP-2399
>             Project: Sqoop
>          Issue Type: Bug
>    Affects Versions: 1.4.4, 1.4.5
>         Environment: mapr 3.1.0 release hadoop 0.20.2 CentOS 6.5
>            Reporter: William Volkman
>
> With a relatively small table and a text primary key this error happens:
> 15/06/14 03:00:25 WARN db.BigDecimalSplitter: Set BigDecimal splitSize to 
> MIN_INCREMENT
> 15/06/14 03:00:25 INFO mapred.JobClient: Cleaning up the staging area 
> maprfs:/var/mapr/cluster/mapred/jobTracker/staging/mapr/.staging/job_201404251052_5654
> 15/06/14 03:00:25 ERROR sqoop.Sqoop: Got exception running Sqoop: 
> java.lang.ArrayIndexOutOfBoundsException: -1
> java.lang.ArrayIndexOutOfBoundsException: -1
>       at java.util.ArrayList.elementData(ArrayList.java:371)
>       at java.util.ArrayList.get(ArrayList.java:384)
>       at 
> org.apache.sqoop.mapreduce.db.BigDecimalSplitter.split(BigDecimalSplitter.java:143)
>       at 
> org.apache.sqoop.mapreduce.db.TextSplitter.split(TextSplitter.java:151)
>       at 
> org.apache.sqoop.mapreduce.db.TextSplitter.split(TextSplitter.java:113)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to