[ 
https://issues.apache.org/jira/browse/HBASE-14901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15034951#comment-15034951
 ] 

Gary Helmling commented on HBASE-14901:
---------------------------------------

How about renaming EncryptionUtils.getgetKeyFromBytesOrMasterKey(...) to just 
EncryptionUtils.unwrapKey(Configuration, byte[]), since it's just delegating to 
unwrap key with known config values.  Since it's a public method it should have 
some javadoc as well.  The rest of the refactor looks good to me.

Seems okay to me to relocate these to the hbase-client module since the other 
unwrapKey() methods are already there.  

[~apurtell] any thoughts?

> There is duplicated code to create/manage encryption keys
> ---------------------------------------------------------
>
>                 Key: HBASE-14901
>                 URL: https://issues.apache.org/jira/browse/HBASE-14901
>             Project: HBase
>          Issue Type: Bug
>          Components: encryption
>    Affects Versions: 2.0.0
>            Reporter: Nate Edel
>            Assignee: Nate Edel
>            Priority: Minor
>             Fix For: 2.0.0
>
>         Attachments: HBASE-14901.1.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> There is duplicated code from MobUtils.createEncryptionContext in HStore, and 
> there is a subset of that code in HFileReaderImpl.
> Refactored key selection 
> Moved both to EncryptionUtil.java
> Can't figure out how to write a unit test for this, but there's no new code 
> just refactoring.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to