nlu90 commented on code in PR #18738:
URL: https://github.com/apache/pulsar/pull/18738#discussion_r1097956509
##########
pulsar-functions/instance/src/main/python/python_instance.py:
##########
@@ -460,3 +472,16 @@ def close(self):
if self.pulsar_client:
self.pulsar_client.close()
+
+ def get_crypto_reader(self, crypto_spec):
+ crypto_key_reader = None
+ if crypto_spec is not None:
+ try:
+ crypto_config = json.loads(crypto_spec.cryptoKeyReaderConfig)
+ if crypto_spec.cryptoKeyReaderClassName == "" or
crypto_spec.cryptoKeyReaderClassName is None:
+ crypto_key_reader = pulsar.CryptoKeyReader(**crypto_config)
+ else:
+ crypto_key_reader =
util.import_class(os.path.dirname(self.user_code),
crypto_spec.cryptoKeyReaderClassName)(**crypto_config)
+ except:
+ pass
Review Comment:
+1 for a clear error message
--
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]