szetszwo commented on a change in pull request #2978:
URL: https://github.com/apache/ozone/pull/2978#discussion_r783649225



##########
File path: 
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockDataStreamOutput.java
##########
@@ -392,7 +398,8 @@ private void executePutBlock(boolean close,
     final List<StreamBuffer> byteBufferList;
     if (!force) {
       Preconditions.checkNotNull(bufferList);
-      byteBufferList = bufferList;
+      byteBufferList = buffersForPutBlock;
+      buffersForPutBlock = null;
       Preconditions.checkNotNull(byteBufferList);

Review comment:
       @sadanand48 , there is a NPE
   ```
   java.lang.NullPointerException
   at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:880)
   at 
org.apache.hadoop.hdds.scm.storage.BlockDataStreamOutput.executePutBlock(BlockDataStreamOutput.java:403)
   at 
org.apache.hadoop.hdds.scm.storage.BlockDataStreamOutput.handleFlush(BlockDataStreamOutput.java:489)
   at 
org.apache.hadoop.hdds.scm.storage.BlockDataStreamOutput.close(BlockDataStreamOutput.java:509)
   at 
org.apache.hadoop.ozone.client.io.BlockDataStreamOutputEntry.close(BlockDataStreamOutputEntry.java:122)
   at 
org.apache.hadoop.ozone.client.io.KeyDataStreamOutput.handleStreamAction(KeyDataStreamOutput.java:460)
   ...
   ```
   It seems the preconditions is incorrect.
   ```
         Preconditions.checkNotNull(byteBufferList);
   ```
   Please take a look.  Thanks.




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to