Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.11.0
-
None
-
Unknown
Description
In the HdfsProducer and HdfsConsumer classes, there are calls to get the current security configuration
Configuration auth = Configuration.getConfiguration();
in order to later reset them after HDFS tramples the system with its own config. However, if no security configuration was set, this throws a SecurityException like:
Exception in thread "main" org.apache.camel.FailedToCreateProducerException: Failed to create Producer for endpoint: Endpoint[hdfs://localhost:50001/tmp/camel/?splitStrategy=MESSAGES%3A4]. Reason: java.lang.SecurityException: Unable to locate a login configuration
My current workaround is to set the system property "java.security.auth.login.config" to an empty file.
It seems like the code should check if a configuration exists before fetching it.