wgtmac commented on code in PR #3745:
URL: https://github.com/apache/parquet-java/pull/3745#discussion_r3854349985


##########
parquet-hadoop/src/main/java/org/apache/parquet/crypto/keytools/FileKeyUnwrapper.java:
##########
@@ -157,10 +157,13 @@ KeyToolkit.KmsClientAndDetails 
getKmsClientFromConfigOrKeyMaterial(KeyMaterial k
 
     String kmsInstanceURL = 
hadoopConfiguration.getTrimmed(KeyToolkit.KMS_INSTANCE_URL_PROPERTY_NAME);
     if (stringIsEmpty(kmsInstanceURL)) {
-      kmsInstanceURL = keyMaterial.getKmsInstanceURL();
+      if (hadoopConfiguration.getBoolean(
+          KeyToolkit.KMS_ENABLE_URL_READ_PROPERTY_NAME, 
KeyToolkit.KMS_ENABLE_URL_READ_DEFAULT)) {
+        kmsInstanceURL = keyMaterial.getKmsInstanceURL();
+      }
+
       if (null == kmsInstanceURL) {
-        throw new ParquetCryptoRuntimeException(
-            "KMS instance URL is missing both in properties and file key 
material");
+        kmsInstanceURL = KmsClient.KMS_INSTANCE_URL_DEFAULT;

Review Comment:
   Why do we need to change this line?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to