You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by Shashi Vishwakarma <sh...@gmail.com> on 2016/04/22 11:45:47 UTC

HDFS Encryption using Java

Hi

I want to invoke below command using java .

hadoop key create myKey
hdfs crypto -createZone -keyName myKey -path /zone

Can someone point to java api documentation for this or any example to
implement this in java?

Thanks in advance.

Shashi

Re: HDFS Encryption using Java

Posted by Larry McCay <lm...@hortonworks.com>.
Hi Shashi -

For the Key Provider API, I would personally use the code in KeyShell.java [1] and the tests in TestKeyProviderFactory.java [2] as examples for creating the key.

Unfortunately, I don’t have pointers for the createZone step for you but hope that is helpful.

—larry

[1]. https://git-wip-us.apache.org/repos/asf?p=hadoop.git;a=blob;f=hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/KeyShell.java;h=c69dc82a6032f7cbd989cd5f89dfa7719297f9b7;hb=HEAD

[2]. https://git-wip-us.apache.org/repos/asf?p=hadoop.git;a=blob;f=hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/crypto/key/TestKeyProviderFactory.java;h=ef09d94739643a3a7ee642921d394b0d8c45acee;hb=HEAD

On Apr 22, 2016, at 5:45 AM, Shashi Vishwakarma <sh...@gmail.com>> wrote:

Hi

I want to invoke below command using java .


hadoop key create myKey
hdfs crypto -createZone -keyName myKey -path /zone

Can someone point to java api documentation for this or any example to implement this in java?

Thanks in advance.

Shashi



Re: HDFS Encryption using Java

Posted by Larry McCay <lm...@hortonworks.com>.
Hi Shashi -

For the Key Provider API, I would personally use the code in KeyShell.java [1] and the tests in TestKeyProviderFactory.java [2] as examples for creating the key.

Unfortunately, I don’t have pointers for the createZone step for you but hope that is helpful.

—larry

[1]. https://git-wip-us.apache.org/repos/asf?p=hadoop.git;a=blob;f=hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/KeyShell.java;h=c69dc82a6032f7cbd989cd5f89dfa7719297f9b7;hb=HEAD

[2]. https://git-wip-us.apache.org/repos/asf?p=hadoop.git;a=blob;f=hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/crypto/key/TestKeyProviderFactory.java;h=ef09d94739643a3a7ee642921d394b0d8c45acee;hb=HEAD

On Apr 22, 2016, at 5:45 AM, Shashi Vishwakarma <sh...@gmail.com>> wrote:

Hi

I want to invoke below command using java .


hadoop key create myKey
hdfs crypto -createZone -keyName myKey -path /zone

Can someone point to java api documentation for this or any example to implement this in java?

Thanks in advance.

Shashi



Re: HDFS Encryption using Java

Posted by Larry McCay <lm...@hortonworks.com>.
Hi Shashi -

For the Key Provider API, I would personally use the code in KeyShell.java [1] and the tests in TestKeyProviderFactory.java [2] as examples for creating the key.

Unfortunately, I don’t have pointers for the createZone step for you but hope that is helpful.

—larry

[1]. https://git-wip-us.apache.org/repos/asf?p=hadoop.git;a=blob;f=hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/KeyShell.java;h=c69dc82a6032f7cbd989cd5f89dfa7719297f9b7;hb=HEAD

[2]. https://git-wip-us.apache.org/repos/asf?p=hadoop.git;a=blob;f=hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/crypto/key/TestKeyProviderFactory.java;h=ef09d94739643a3a7ee642921d394b0d8c45acee;hb=HEAD

On Apr 22, 2016, at 5:45 AM, Shashi Vishwakarma <sh...@gmail.com>> wrote:

Hi

I want to invoke below command using java .


hadoop key create myKey
hdfs crypto -createZone -keyName myKey -path /zone

Can someone point to java api documentation for this or any example to implement this in java?

Thanks in advance.

Shashi



Re: HDFS Encryption using Java

Posted by Larry McCay <lm...@hortonworks.com>.
Hi Shashi -

For the Key Provider API, I would personally use the code in KeyShell.java [1] and the tests in TestKeyProviderFactory.java [2] as examples for creating the key.

Unfortunately, I don’t have pointers for the createZone step for you but hope that is helpful.

—larry

[1]. https://git-wip-us.apache.org/repos/asf?p=hadoop.git;a=blob;f=hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/KeyShell.java;h=c69dc82a6032f7cbd989cd5f89dfa7719297f9b7;hb=HEAD

[2]. https://git-wip-us.apache.org/repos/asf?p=hadoop.git;a=blob;f=hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/crypto/key/TestKeyProviderFactory.java;h=ef09d94739643a3a7ee642921d394b0d8c45acee;hb=HEAD

On Apr 22, 2016, at 5:45 AM, Shashi Vishwakarma <sh...@gmail.com>> wrote:

Hi

I want to invoke below command using java .


hadoop key create myKey
hdfs crypto -createZone -keyName myKey -path /zone

Can someone point to java api documentation for this or any example to implement this in java?

Thanks in advance.

Shashi