private void createEncryptionZone(String[] params) throws Exception {
    CommandLine args = parseCommandArgs(CREATE_ZONE_OPTIONS, params);

    String keyName = args.getOptionValue("keyName");
    String cryptoZoneStr = args.getOptionValue("path");
    if (cryptoZoneStr == null) {
      throw new Exception("Cannot create encryption zone: Invalid path 'null'");
    }
    Path cryptoZone = new Path(cryptoZoneStr);

    try {
      encryptionShim.createEncryptionZone(cryptoZone, keyName);
    } catch (IOException e) {
      throw new Exception("Cannot create encryption zone: " + e.getMessage());
    }

    writeTestOutput("Encryption zone created: '" + cryptoZone + "' using key: '" + keyName + "'");
  }
Creates an encryption zone using the parameters passed through the 'create_zone' action.

@param params Parameters passed to the 'create_zone' command action.
@throws Exception If zone creation failed.
ql/src/java/org/apache/hadoop/hive/ql/processors/CryptoProcessor.java