public static class HadoopShims.NoopHdfsEncryptionShim extends Object implements HadoopShims.HdfsEncryptionShim
Constructor and Description |
---|
NoopHdfsEncryptionShim() |
Modifier and Type | Method and Description |
---|---|
boolean |
arePathsOnSameEncryptionZone(org.apache.hadoop.fs.Path path1,
org.apache.hadoop.fs.Path path2)
Checks if two HDFS paths are on the same encrypted or unencrypted zone.
|
boolean |
arePathsOnSameEncryptionZone(org.apache.hadoop.fs.Path path1,
org.apache.hadoop.fs.Path path2,
HadoopShims.HdfsEncryptionShim encryptionShim2)
Checks if two HDFS paths are on the same encrypted or unencrypted zone.
|
int |
comparePathKeyStrength(org.apache.hadoop.fs.Path path1,
org.apache.hadoop.fs.Path path2,
HadoopShims.HdfsEncryptionShim encryptionShim2)
Compares two encrypted path strengths.
|
void |
createEncryptionZone(org.apache.hadoop.fs.Path path,
String keyName)
Create encryption zone by path and keyname.
|
void |
createKey(String keyName,
int bitLength)
Creates an encryption key.
|
void |
deleteKey(String keyName) |
org.apache.hadoop.hdfs.protocol.EncryptionZone |
getEncryptionZoneForPath(org.apache.hadoop.fs.Path path)
Get encryption zone by path.
|
List<String> |
getKeys() |
boolean |
isPathEncrypted(org.apache.hadoop.fs.Path path)
Checks if a given HDFS path is encrypted.
|
public boolean isPathEncrypted(org.apache.hadoop.fs.Path path) throws IOException
HadoopShims.HdfsEncryptionShim
isPathEncrypted
in interface HadoopShims.HdfsEncryptionShim
path
- Path to HDFS file systemIOException
- If an error occurred attempting to get encryption informationpublic boolean arePathsOnSameEncryptionZone(org.apache.hadoop.fs.Path path1, org.apache.hadoop.fs.Path path2) throws IOException
HadoopShims.HdfsEncryptionShim
arePathsOnSameEncryptionZone
in interface HadoopShims.HdfsEncryptionShim
path1
- Path to HDFS file systempath2
- Path to HDFS file systemIOException
- If an error occurred attempting to get encryption informationpublic boolean arePathsOnSameEncryptionZone(org.apache.hadoop.fs.Path path1, org.apache.hadoop.fs.Path path2, HadoopShims.HdfsEncryptionShim encryptionShim2) throws IOException
HadoopShims.HdfsEncryptionShim
arePathsOnSameEncryptionZone
in interface HadoopShims.HdfsEncryptionShim
path1
- Path to HDFS file systempath2
- Path to HDFS file systemencryptionShim2
- The encryption-shim corresponding to path2.IOException
- If an error occurred attempting to get encryption informationpublic int comparePathKeyStrength(org.apache.hadoop.fs.Path path1, org.apache.hadoop.fs.Path path2, HadoopShims.HdfsEncryptionShim encryptionShim2) throws IOException
HadoopShims.HdfsEncryptionShim
comparePathKeyStrength
in interface HadoopShims.HdfsEncryptionShim
path1
- HDFS path to compare.path2
- HDFS path to compare.encryptionShim2
- The encryption-shim corresponding to path2.IOException
- If an error occurred attempting to get encryption/key metadatapublic void createEncryptionZone(org.apache.hadoop.fs.Path path, String keyName)
HadoopShims.HdfsEncryptionShim
createEncryptionZone
in interface HadoopShims.HdfsEncryptionShim
path
- HDFS path to create encryption zonekeyName
- keynamepublic org.apache.hadoop.hdfs.protocol.EncryptionZone getEncryptionZoneForPath(org.apache.hadoop.fs.Path path) throws IOException
HadoopShims.HdfsEncryptionShim
getEncryptionZoneForPath
in interface HadoopShims.HdfsEncryptionShim
path
- HDFS path to create encryption zone.IOException
public void createKey(String keyName, int bitLength)
HadoopShims.HdfsEncryptionShim
createKey
in interface HadoopShims.HdfsEncryptionShim
keyName
- Name of the keybitLength
- Key encryption length in bits (128 or 256).public void deleteKey(String keyName) throws IOException
deleteKey
in interface HadoopShims.HdfsEncryptionShim
IOException
public List<String> getKeys() throws IOException
getKeys
in interface HadoopShims.HdfsEncryptionShim
IOException
Copyright © 2023 The Apache Software Foundation. All rights reserved.