hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raghu Angadi (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-3073) SocketOutputStream.close() should close the channel.
Date Wed, 26 Mar 2008 23:17:26 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-3073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12582475#action_12582475
] 

Raghu Angadi commented on HADOOP-3073:
--------------------------------------

I think this findbugs warning need to be waived. close() removed below was added to fix the
same findbugs warning in HADOOP-2346 as described in a [comment|http://issues.apache.org/jira/browse/HADOOP-2346?focusedCommentId=12575116#action_12575116].

affected code: {noformat}
-      try {
-        //write the header.
-        out.writeShort( DATA_TRANSFER_VERSION );
-        out.write( OP_READ_BLOCK );
-        out.writeLong( blockId );
-        out.writeLong( startOffset );
-        out.writeLong( len );
-        out.flush();
-      } finally {
-        IOUtils.closeStream(out);
-      }
+      //write the header.
+      out.writeShort( DATA_TRANSFER_VERSION );
+      out.write( OP_READ_BLOCK );
+      out.writeLong( blockId );
+      out.writeLong( startOffset );
+      out.writeLong( len );
+      out.flush();
{noformat}

> SocketOutputStream.close() should close the channel.
> ----------------------------------------------------
>
>                 Key: HADOOP-3073
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3073
>             Project: Hadoop Core
>          Issue Type: Bug
>    Affects Versions: 0.17.0
>            Reporter: Raghu Angadi
>            Assignee: Raghu Angadi
>            Priority: Blocker
>             Fix For: 0.17.0
>
>         Attachments: HADOOP-3073.patch
>
>
> When the stream returned by Socket.getOutputStream() is closed, it closes the socket
too. So hadoop.SocketOutputStream and hadoop.SocketInputStream should do the same.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message