hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jothi Padmanabhan (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-3580) Using a har file as input for the Sort example fails
Date Tue, 17 Jun 2008 11:51:45 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-3580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12605562#action_12605562
] 

Jothi Padmanabhan commented on HADOOP-3580:
-------------------------------------------

Array out of bounds is because of the following line in FileInputFormat.java (Line 334)

BlockLocation last = blkLocations[blkLocations.length];

which should be

BlockLocation last = blkLocations[blkLocations.length -1];

However, even after this fix, we would still get an IllegalArgumentException. 

In getBlockIndex, the offset of blkLocations[0] != 0. Hence, offset of 0 is treated as an
IllegalArgument.

> Using a har file as input for the Sort example fails
> ----------------------------------------------------
>
>                 Key: HADOOP-3580
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3580
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: tools/harchive
>            Reporter: Jothi Padmanabhan
>             Fix For: 0.18.0
>
>
> Using a har file as input for the Sort example fails
> I ran the randomwriter example and then ran the archive on the output of randomwriter
to create a new HAR file. I specified this har file as the input for sort program and it failed.
> STEP1: bin/hadoop jar hadoop-0.18.0-dev-examples.jar randomwriter input
> STEP2: bin/hadoop archive -archiveName foo.har /user/jothipn/input /user/jothipn
> STEP3:  bin/hadoop jar hadoop-0.18.0-dev-examples.jar sort har:///user/jothipn/foo.har/user/jothipn/input
output
> java.lang.ArrayIndexOutOfBoundsException: 17
>         at org.apache.hadoop.mapred.FileInputFormat.getBlockIndex(FileInputFormat.java:334)
>         at org.apache.hadoop.mapred.FileInputFormat.getSplits(FileInputFormat.java:248)
>         at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:686)
>         at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:966)
>         at org.apache.hadoop.examples.Sort.run(Sort.java:147)
>         at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
>         at org.apache.hadoop.examples.Sort.main(Sort.java:158)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68)
>         at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139)
>         at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:53)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:155)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message