Class KeyManager
java.lang.Object
org.apache.hadoop.hdfs.server.balancer.KeyManager
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.hdfs.protocol.datatransfer.sasl.DataEncryptionKeyFactory
@Private
public class KeyManager
extends Object
implements Closeable, org.apache.hadoop.hdfs.protocol.datatransfer.sasl.DataEncryptionKeyFactory
The class provides utilities for key and token management.
-
Constructor Summary
ConstructorsConstructorDescriptionKeyManager(String blockpoolID, NamenodeProtocol namenode, boolean encryptDataTransfer, org.apache.hadoop.conf.Configuration conf) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()org.apache.hadoop.security.token.Token<org.apache.hadoop.hdfs.security.token.block.BlockTokenIdentifier>getAccessToken(org.apache.hadoop.hdfs.protocol.ExtendedBlock eb, org.apache.hadoop.fs.StorageType[] storageTypes, String[] storageIds) Get an access token for a block.org.apache.hadoop.hdfs.security.token.block.DataEncryptionKeyvoid
-
Constructor Details
-
KeyManager
public KeyManager(String blockpoolID, NamenodeProtocol namenode, boolean encryptDataTransfer, org.apache.hadoop.conf.Configuration conf) throws IOException - Throws:
IOException
-
-
Method Details
-
startBlockKeyUpdater
public void startBlockKeyUpdater() -
getAccessToken
public org.apache.hadoop.security.token.Token<org.apache.hadoop.hdfs.security.token.block.BlockTokenIdentifier> getAccessToken(org.apache.hadoop.hdfs.protocol.ExtendedBlock eb, org.apache.hadoop.fs.StorageType[] storageTypes, String[] storageIds) throws IOException Get an access token for a block.- Throws:
IOException
-
newDataEncryptionKey
public org.apache.hadoop.hdfs.security.token.block.DataEncryptionKey newDataEncryptionKey()- Specified by:
newDataEncryptionKeyin interfaceorg.apache.hadoop.hdfs.protocol.datatransfer.sasl.DataEncryptionKeyFactory
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-