You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Uma Maheswara Rao G (JIRA)" <ji...@apache.org> on 2012/09/25 02:52:08 UTC
[jira] [Resolved] (HDFS-3965) DFSInputStream should not eat up
exceptions if file is under construction
[ https://issues.apache.org/jira/browse/HDFS-3965?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uma Maheswara Rao G resolved HDFS-3965.
---------------------------------------
Resolution: Duplicate
> DFSInputStream should not eat up exceptions if file is under construction
> -------------------------------------------------------------------------
>
> Key: HDFS-3965
> URL: https://issues.apache.org/jira/browse/HDFS-3965
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: hdfs client
> Affects Versions: 1.0.3
> Reporter: Amareshwari Sriramadasu
>
> Currently DFSclient eats up exceptions if it could not open the file under construction:
> {noformat}
> 1881 try {
> 1882 primary = createClientDatanodeProtocolProxy(primaryNode, conf,
> 1883 last.getBlock(), last.getBlockToken(), socketTimeout);
> 1884 Block newBlock = primary.getBlockInfo(last.getBlock());
> 1885 long newBlockSize = newBlock.getNumBytes();
> 1886 long delta = newBlockSize - last.getBlockSize();
> 1887 // if the size of the block on the datanode is different
> 1888 // from what the NN knows about, the datanode wins!
> 1889 last.getBlock().setNumBytes(newBlockSize);
> 1890 long newlength = newInfo.getFileLength() + delta;
> 1891 newInfo.setFileLength(newlength);
> 1892 LOG.debug("DFSClient setting last block " + last + " to length "
> 1893 + newBlockSize + " filesize is now " + newInfo.getFileLength());
> 1894 } catch (IOException e) {
> 1895 if (e.getMessage().startsWith(
> 1896 "java.io.IOException: java.lang.NoSuchMethodException: "
> 1897 + "org.apache.hadoop.hdfs.protocol"
> 1898 + ".ClientDatanodeProtocol.getBlockInfo")) {
> 1899 // We're talking to a server that doesn't implement HDFS-200.
> 1900 serverSupportsHdfs200 = false;
> 1901 } else {
> 1902 LOG.debug("DFSClient file " + src
> 1903 + " is being concurrently append to" + " but datanode "
> 1904 + primaryNode.getHostName() + " probably does not have block "
> 1905 + last.getBlock());
> 1906 }
> 1907 }
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira