Amareshwari Sriramadasu created HDFS-3965:
---------------------------------------------

             Summary: 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:

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       }


--
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

Reply via email to