[
https://issues.apache.org/jira/browse/HIVE-18716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16376756#comment-16376756
]
Zoltan Haindrich commented on HIVE-18716:
-----------------------------------------
it looks good to me; but there is one point which might be problematic:
{code}
private HiveAuthorizationTaskFactory createAuthorizationTaskFactory(HiveConf
conf, Hive db) {
Class<? extends HiveAuthorizationTaskFactory> authProviderClass = conf.
getClass(HiveConf.ConfVars.HIVE_AUTHORIZATION_TASK_FACTORY.varname,
HiveAuthorizationTaskFactoryImpl.class,
HiveAuthorizationTaskFactory.class);
String msg = "Unable to create instance of " + authProviderClass.getName()
+ ": ";
try {
Constructor<? extends HiveAuthorizationTaskFactory> constructor =
authProviderClass.getConstructor(HiveConf.class, Hive.class);
{code}
the patch changes the constructor call from 2 args to 1 arguments....
because it seems to me that the factory is configurable from the conf; I'm not
sure if any people are using it - or we should keep the contructor call intact?
cc: [~thejas]
> Delete unnecessary parameters from TaskFactory
> ----------------------------------------------
>
> Key: HIVE-18716
> URL: https://issues.apache.org/jira/browse/HIVE-18716
> Project: Hive
> Issue Type: Improvement
> Components: HiveServer2
> Affects Versions: 3.0.0
> Reporter: Gergely Hajós
> Assignee: Gergely Hajós
> Priority: Trivial
> Attachments: HIVE-18716.1.patch, HIVE-18716.2.patch,
> HIVE-18716.3.patch
>
>
> * In _TaskFactory class conf_ parameter is not used here
> {code:java}
> public static <T extends Serializable> Task<T> get(Class<T> workClass,
> HiveConf conf)
> {code}
> * _get_ functions never called with vararg parameter _Task<? extends
> Serializable>... tasklist_
> * the following version of _get_ is always called with _setConf_ true from
> outside of _TaskFactory_ class
> {code:java}
> public static <T extends Serializable> Task<T> get(T work, HiveConf conf,
> boolean setConf, Task<? extends Serializable>... tasklist)
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)