You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/10/30 09:52:02 UTC
[jira] [Commented] (DRILL-5910) Logging exception when
AuthenticatorFactory not found
[ https://issues.apache.org/jira/browse/DRILL-5910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224571#comment-16224571 ]
ASF GitHub Bot commented on DRILL-5910:
---------------------------------------
Github user vladimirtkach commented on a diff in the pull request:
https://github.com/apache/drill/pull/1013#discussion_r147655905
--- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/rpc/security/ClientAuthenticatorProvider.java ---
@@ -57,17 +57,17 @@ private ClientAuthenticatorProvider() {
// then, custom factories
if (customFactories != null) {
- try {
- final String[] factories = customFactories.split(",");
- for (final String factory : factories) {
+ final String[] factories = customFactories.split(",");
+ for (final String factory : factories) {
+ try {
final Class<?> clazz = Class.forName(factory);
if (AuthenticatorFactory.class.isAssignableFrom(clazz)) {
final AuthenticatorFactory instance = (AuthenticatorFactory) clazz.newInstance();
authFactories.put(instance.getSimpleName(), instance);
}
+ } catch (final ClassNotFoundException | IllegalAccessException | InstantiationException e) {
--- End diff --
a moot point, I think that three specific exceptions is better the one general.
> Logging exception when AuthenticatorFactory not found
> ------------------------------------------------------
>
> Key: DRILL-5910
> URL: https://issues.apache.org/jira/browse/DRILL-5910
> Project: Apache Drill
> Issue Type: Improvement
> Affects Versions: 1.11.0
> Reporter: Volodymyr Tkach
> Assignee: Volodymyr Tkach
> Priority: Minor
> Fix For: 1.12.0
>
>
> We need to log the exception when any of custom AuthenticatorFactory fails to be instansiated in ClientAuthenticatorProvider constructor. We are doing this to allow drill to use other available AuthenticatorFactory
> Steps to repoduce:
> 1) Configure plain authentication
> 2) Add
> -Ddrill.customAuthFactories=org.apache.drill.exec.rpc.security.maprsasl.MapRSaslFactory to SQLLINE_JAVA_OPTS or another class that is not present in classpath.
> 3) Run sqlline and connect to drillbit
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)