[ 
https://issues.apache.org/jira/browse/HADOOP-10632?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yi Liu updated HADOOP-10632:
----------------------------

    Attachment: HADOOP-10632.patch

[~tucu00], thanks for your nice comments.  The new patch includes update for 
all your comments except the last item which I want to discuss with you.

{quote}
CryptoInputStream#decrypt(long position, ...) method, given that this method 
does not change the current position of the stream, wouldn’t be simpler to 
create a new decryptor and use a different set of input/output buffers without 
touching the stream ones? We could also use instance vars for them and init 
them the first time this method is called (if it is).
{quote}

I think they each have their advantages. The approach here, doesn’t touch the 
stream ones, needs to create a new decryptor, and different set of input/output 
buffers, key, iv and some other instance vars.  
The code logic of original one is not complicated too, it needs to restore the 
{{outBuffer}} and {{decryptor}}, but much less code.
Alejandro, I’d personally like to keep the original one.  Do you find some 
potential issue? 


> Minor improvements to Crypto input and output streams
> -----------------------------------------------------
>
>                 Key: HADOOP-10632
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10632
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: security
>    Affects Versions: fs-encryption (HADOOP-10150 and HDFS-6134)
>            Reporter: Alejandro Abdelnur
>            Assignee: Yi Liu
>             Fix For: 3.0.0
>
>         Attachments: HADOOP-10632.patch
>
>
> Minor follow up feedback on the crypto streams



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to