[
https://issues.apache.org/jira/browse/HADOOP-12810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15153983#comment-15153983
]
Brahma Reddy Battula commented on HADOOP-12810:
-----------------------------------------------
Following testcase is failing after this jira in.
{noformat}
FAILED: org.apache.hadoop.mapred.TestFileInputFormat.testSplitLocationInfo[0]
Error Message:
expected:<2> but was:<1>
Stack Trace:
java.lang.AssertionError: expected:<2> but was:<1>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:743)
at org.junit.Assert.assertEquals(Assert.java:118)
at org.junit.Assert.assertEquals(Assert.java:555)
at org.junit.Assert.assertEquals(Assert.java:542)
at
org.apache.hadoop.mapred.TestFileInputFormat.testSplitLocationInfo(TestFileInputFormat.java:115)
{noformat}
> FileSystem#listLocatedStatus causes unnecessary RPC calls
> ---------------------------------------------------------
>
> Key: HADOOP-12810
> URL: https://issues.apache.org/jira/browse/HADOOP-12810
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs, fs/s3
> Affects Versions: 2.7.2
> Reporter: Ryan Blue
> Assignee: Ryan Blue
> Fix For: 2.7.3
>
> Attachments: HADOOP-12810.1.patch
>
>
> {{FileSystem#listLocatedStatus}} lists the files in a directory and then
> calls {{getFileBlockLocations(stat.getPath(), ...)}} for each instead of
> {{getFileBlockLocations(stat, ...)}}. That function with the path arg just
> calls {{getFileStatus}} to get another file status from the path and calls
> the file status version, so this ends up calling {{getFileStatus}}
> unnecessarily.
> This is particularly bad for S3, where {{getFileStatus}} is expensive.
> Avoiding the extra call improved input split calculation time for a data set
> in S3 by ~20x: from 10 minutes to 25 seconds.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)