[
https://issues.apache.org/jira/browse/HIVE-16612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Remus Rusanu updated HIVE-16612:
--------------------------------
Attachment: HIVE-16612.01.patch
Patch 01 refactors the existing code:
- {{PerfLogger}} is the interface, exposing all the methods used by various
logger clients. Replaced references to use the interface.
{{SessionState.getPerfLogger}} returns the interface etc.
- {{PerfLoggerFactory}} is the factory for returning the current logger
- {{PerfLoggerImpl}} is the existing implementation. Only referenced by Factory
- {{PerfLoggerTokens}} is a static class for all the various strings used by
logging clients: COMPILE, OPTIMIZER etc
Most changes are the cosmetic changes needed to import/reference
{{PerfLoggerTokens}}.
> PerfLogger is configurable, but not extensible
> ----------------------------------------------
>
> Key: HIVE-16612
> URL: https://issues.apache.org/jira/browse/HIVE-16612
> Project: Hive
> Issue Type: Bug
> Components: Query Planning, Query Processor
> Reporter: Remus Rusanu
> Assignee: Remus Rusanu
> Priority: Minor
> Fix For: 3.0.0
>
> Attachments: HIVE-16612.01.patch
>
>
> {code}
> result = (PerfLogger)
> ReflectionUtils.newInstance(conf.getClassByName(
> conf.getVar(HiveConf.ConfVars.HIVE_PERF_LOGGER)), conf);
> {code}
> The PerfLogger instance is configurable via {{hive.exec.perf.logger}}
> (HIVE-11891) but the requirement to extend from {{PerfLogger}} cannot be met
> since HIVE-11149 as the ctor is private. Also useful methods in PerfLogger
> are also private. I tried to extend PerfLogger for my needs and realized
> that, as is, the configurability is not usable. At the very least the
> PerfLogger should make all private members {{protected}}, better the
> requirement should be an interface not a class.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)