[ https://issues.apache.org/jira/browse/HDFS-2687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13170318#comment-13170318 ]
Uma Maheswara Rao G commented on HDFS-2687: ------------------------------------------- I just debugged the failure *Following is the initial analysis:* Previous behaviour of getListing in ClientNamenodeProtocolTranslatorR23 is It will pass needLocation flag as true and server side will be packed empty LocatedBlocks with HdfsLocatedFileStatus object if getBlocations are null and needLocation flag is true. So, cleint will reconstruct the HdfsLocatedFileStatus directly if HdfsfileStatus is instanceOf HdfsLocatedFileStatus. But with new implementation of protocolBuffers, It is just ignoring the LocatedBlocks are server side if the getBlocklocations are null. At client side, to reconstruct the HDFSFileStatus object, it is depending on locations field. Since there is no locations field here, it is considering HDFSFileStatus as just HDFSFileStatus. Here test assumes that HDFSFileStatus obj will be type of HdfsLocatedFileStatus and trying cast. This is failing here. > Tests are failing with ClassCastException, due to new protocol changes > ----------------------------------------------------------------------- > > Key: HDFS-2687 > URL: https://issues.apache.org/jira/browse/HDFS-2687 > Project: Hadoop HDFS > Issue Type: Bug > Reporter: Uma Maheswara Rao G > > https://builds.apache.org/job/Hadoop-Hdfs-trunk/lastCompletedBuild/testReport/ > java.lang.ClassCastException: org.apache.hadoop.hdfs.protocol.HdfsFileStatus > cannot be cast to org.apache.hadoop.hdfs.protocol.HdfsLocatedFileStatus > at > org.apache.hadoop.hdfs.DistributedFileSystem$1.hasNext(DistributedFileSystem.java:452) > at org.apache.hadoop.fs.FileSystem$5.hasNext(FileSystem.java:1551) > at org.apache.hadoop.fs.FileSystem$5.next(FileSystem.java:1581) > at org.apache.hadoop.fs.FileSystem$5.next(FileSystem.java:1541) > at > org.apache.hadoop.fs.TestListFiles.testDirectory(TestListFiles.java:146) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira