toddlipcon commented on a change in pull request #597: HDFS-3246: pRead 
equivalent for direct read path
URL: https://github.com/apache/hadoop/pull/597#discussion_r269397696
 
 

 ##########
 File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoInputStream.java
 ##########
 @@ -375,7 +399,72 @@ private void decrypt(long position, byte[] buffer, int 
offset, int length)
       returnDecryptor(decryptor);
     }
   }
-  
+
+  /**
+   * Decrypt n bytes in buf starting at start. Output is also put into buf
+   * starting at current position. buf.position() and buf.limit() should be
 
 Review comment:
   This doc is confusing me a bit (haven't looked at the impl yet). It seems 
this both reads and writes to the same buf, but the read is happening from the 
'start' whereas the write is happening at 'buf.position()'? That seems somewhat 
unexpected and opens up some questions about whether the output range and input 
range can overlap

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to