org.apache.hadoop.crypto.key.KeyProviderFactory Java Examples
The following examples show how to use
org.apache.hadoop.crypto.key.KeyProviderFactory.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TestSaslFanOutOneBlockAsyncDFSOutput.java From hbase with Apache License 2.0 | 5 votes |
private static void setUpKeyProvider(Configuration conf) throws Exception { URI keyProviderUri = new URI("jceks://file" + UTIL.getDataTestDir("test.jks").toUri().toString()); conf.set("dfs.encryption.key.provider.uri", keyProviderUri.toString()); KeyProvider keyProvider = KeyProviderFactory.get(keyProviderUri, conf); keyProvider.createKey(TEST_KEY_NAME, KeyProvider.options(conf)); keyProvider.flush(); keyProvider.close(); }