List of usage examples for org.apache.hadoop.hdfs DistributedFileSystem createEncryptionZone
public void createEncryptionZone(final Path path, final String keyName) throws IOException
From source file:org.trustedanalytics.cfbroker.store.hdfs.service.SimpleHdfsClient.java
License:Apache License
@Override public void createKeyAndEncryptedZone(String keyName, Path path) throws IOException { if (fs.exists(path)) { try {//from w w w . j ava 2 s .c o m createEncryptionZoneKey(keyName); } catch (NoSuchAlgorithmException e) { fs.delete(path, true); throw new IOException("Error while creating encryption dir: " + path, e); } DistributedFileSystem dfs = (DistributedFileSystem) fs; dfs.createEncryptionZone(path, keyName); } else { throw new IOException(DIRECTORY_NOT_EXISTS + path); } }