ehiggs commented on a change in pull request #575: HADOOP-13327 Output Stream 
Specification
URL: https://github.com/apache/hadoop/pull/575#discussion_r264136554
 
 

 ##########
 File path: 
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3ABlockOutputStream.java
 ##########
 @@ -273,14 +268,47 @@ public synchronized void write(int b) throws IOException 
{
    * @throws IOException on any problem
    */
   @Override
-  public synchronized void write(byte[] source, int offset, int len)
+  public void write(byte[] source, int offset, int len)
       throws IOException {
 
     S3ADataBlocks.validateWriteArgs(source, offset, len);
-    checkOpen();
     if (len == 0) {
       return;
     }
+    acquireLock(true);
 
 Review comment:
   This can lock and then throw. Should it be inside the try so the finally 
block can unlock?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to