[ https://issues.apache.org/jira/browse/HDFS-13924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16618251#comment-16618251 ]
Chao Sun commented on HDFS-13924: --------------------------------- [~vagarychen] yes the stack trace: {code:java} Caused by: org.apache.hadoop.hdfs.BlockMissingException: Could not obtain block: <blockID> file=<filePath> at org.apache.hadoop.hdfs.DFSInputStream.chooseDataNode(DFSInputStream.java:1021) at org.apache.hadoop.hdfs.DFSInputStream.blockSeekTo(DFSInputStream.java:641) at org.apache.hadoop.hdfs.DFSInputStream.readWithStrategy(DFSInputStream.java:920) at org.apache.hadoop.hdfs.DFSInputStream.read(DFSInputStream.java:976) at org.apache.hadoop.hdfs.DFSInputStream.read(DFSInputStream.java:745) at java.io.FilterInputStream.read(FilterInputStream.java:83) at java.io.FilterInputStream.read(FilterInputStream.java:83) at com.facebook.presto.hive.parquet.reader.ParquetMetadataReader.readIntLittleEndian(ParquetMetadataReader.java:293) at com.facebook.presto.hive.parquet.reader.ParquetMetadataReader.readFooter(ParquetMetadataReader.java:88) at com.facebook.presto.hive.parquet.ParquetPageSourceFactory.createParquetPageSource(ParquetPageSourceFactory.java:168) ... 16 more {code} Note that we are using HDFS 2.8.2 with some custom patches, so you should look at the code [here|https://github.com/apache/hadoop/blob/branch-2.8.2/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java#L1010]. Even with retry, I think it will still call {{getBlockLocations}} on the same observer and get the same wrong results. > Handle BlockMissingException when reading from observer > ------------------------------------------------------- > > Key: HDFS-13924 > URL: https://issues.apache.org/jira/browse/HDFS-13924 > Project: Hadoop HDFS > Issue Type: Sub-task > Reporter: Chao Sun > Priority: Major > > Internally we found that reading from ObserverNode may result to > {{BlockMissingException}}. This may happen when the observer sees a smaller > number of DNs than active (maybe due to communication issue with those DNs), > or (we guess) late block reports from some DNs to the observer. This error > happens in > [DFSInputStream#chooseDataNode|https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java#L846], > when no valid DN can be found for the {{LocatedBlock}} got from the NN side. > One potential solution (although a little hacky) is to ask the > {{DFSInputStream}} to retry active when this happens. The retry logic already > present in the code - we just have to dynamically set a flag to ask the > {{ObserverReadProxyProvider}} try active in this case. > cc [~shv], [~xkrogen], [~vagarychen], [~zero45] for discussion. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org