smaheshwar-pltr commented on code in PR #14751:
URL: https://github.com/apache/iceberg/pull/14751#discussion_r2698616898


##########
azure/src/main/java/org/apache/iceberg/azure/keymanagement/AzureKeyManagementClient.java:
##########
@@ -29,40 +29,65 @@
 import org.apache.iceberg.azure.AzureProperties;
 import org.apache.iceberg.encryption.KeyManagementClient;
 import org.apache.iceberg.util.ByteBuffers;
+import org.apache.iceberg.util.SerializableMap;
 
 /** Azure key management client which connects to Azure Key Vault. */
 public class AzureKeyManagementClient implements KeyManagementClient {
-  private KeyClient keyClient;
-  private KeyWrapAlgorithm keyWrapAlgorithm;
+
+  private Map<String, String> allProperties;
+
+  private transient volatile KeyClient keyClient;
+  private transient volatile KeyWrapAlgorithm keyWrapAlgorithm;

Review Comment:
   Nit: I wonder instead of having two double-checked blocks and 
`AzureProperties` constructions, if something like this might be nicer
   
   ```java
   private transient volatile ClientState state;
   ```
   
   with
   
   ```java
     private ClientState state() { ... }
   
     private static class ClientState {
       final KeyClient keyClient;
       final KeyWrapAlgorithm keyWrapAlgorithm;
   
       ClientState(KeyClient keyClient, KeyWrapAlgorithm keyWrapAlgorithm) {
         this.keyClient = keyClient;
         this.keyWrapAlgorithm = keyWrapAlgorithm;
       }
     }
   }
   ```



-- 
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