sodonnel commented on a change in pull request #3143:
URL: https://github.com/apache/ozone/pull/3143#discussion_r831315713



##########
File path: 
hadoop-hdds/erasurecode/src/main/java/org/apache/ozone/erasurecode/rawcoder/ByteBufferEncodingState.java
##########
@@ -97,6 +101,7 @@ void checkBuffers(ByteBuffer[] buffers) {
       }
 
       if (buffer.remaining() != encodeLength) {
+        LOG.debug("buffer remaining is {} encodelength is {}", 
buffer.remaining(), encodeLength);
         throw new HadoopIllegalArgumentException(
             "Invalid buffer, not of length " + encodeLength);

Review comment:
       I wonder now if we need this debug message at all. Could we just adjust 
the exception to also include the `buffer.remaining()`, eg:
   
   ```
           throw new HadoopIllegalArgumentException(
               "Invalid buffer remaining " + buffer.remaining() 
               + ", not of length " + encodeLength);
   ```
   
   The exception will propagate up the stack and give us the same information 
as the debug message anyway.




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