diff --git a/parquet-hadoop/src/main/java/org/apache/parquet/crypto/InternalFileDecryptor.java b/parquet-hadoop/src/main/java/org/apache/parquet/crypto/InternalFileDecryptor.java index 993eca02ea..eb0e59e741 100755 --- a/parquet-hadoop/src/main/java/org/apache/parquet/crypto/InternalFileDecryptor.java +++ b/parquet-hadoop/src/main/java/org/apache/parquet/crypto/InternalFileDecryptor.java @@ -232,7 +232,7 @@ public InternalColumnDecryptionSetup setColumnCryptoMetadata( "Re-use: wrong encryption key (column vs footer). Column: " + path); } if (!encryptedWithFooterKey && !Arrays.equals(columnDecryptionSetup.getKeyMetadata(), keyMetadata)) { - throw new ParquetCryptoRuntimeException("Decryptor re-use: Different footer key metadata "); + throw new ParquetCryptoRuntimeException("Decryptor re-use: Different footer key metadata"); } } return columnDecryptionSetup; @@ -244,7 +244,8 @@ public InternalColumnDecryptionSetup setColumnCryptoMetadata( } else { if (encryptedWithFooterKey) { if (null == footerKey) { - throw new ParquetCryptoRuntimeException("Column " + path + " is encrypted with NULL footer key"); + throw new ParquetCryptoRuntimeException( + "Column " + path + " is encrypted with footer key, but the provided footer key is NULL"); } columnDecryptionSetup = new InternalColumnDecryptionSetup( path, @@ -269,7 +270,8 @@ public InternalColumnDecryptionSetup setColumnCryptoMetadata( } } if (null == columnKeyBytes) { - throw new ParquetCryptoRuntimeException("Column " + path + "is encrypted with NULL column key"); + throw new ParquetCryptoRuntimeException("Column " + path + + " is encrypted with column-specific key, but the provided column key is NULL"); } columnDecryptionSetup = new InternalColumnDecryptionSetup( path,