hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uma Maheswara Rao G (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-3965) DFSInputStream should not eat up exceptions if file is under construction
Date Fri, 21 Sep 2012 09:26:07 GMT

    [ https://issues.apache.org/jira/browse/HDFS-3965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13460386#comment-13460386
] 

Uma Maheswara Rao G commented on HDFS-3965:
-------------------------------------------

Hi Amareshwari,
 
 Looks like this issue is similar to HDFS-3701 right?
 Could you check whether the fix of HDFS-3701 can solve your issue?
 Additionally It solves some other bugs in that area as well.

Thanks,
Uma
                
> 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

Mime
View raw message