You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Vineet Garg (JIRA)" <ji...@apache.org> on 2018/05/22 21:13:04 UTC
[jira] [Updated] (HIVE-19265) Potential NPE and hiding actual
exception in Hive#copyFiles
[ https://issues.apache.org/jira/browse/HIVE-19265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vineet Garg updated HIVE-19265:
-------------------------------
Fix Version/s: (was: 3.1.0)
4.0.0
> Potential NPE and hiding actual exception in Hive#copyFiles
> -----------------------------------------------------------
>
> Key: HIVE-19265
> URL: https://issues.apache.org/jira/browse/HIVE-19265
> Project: Hive
> Issue Type: Bug
> Reporter: Igor Kryvenko
> Assignee: Igor Kryvenko
> Priority: Critical
> Fix For: 4.0.0
>
> Attachments: HIVE-19265.01.patch
>
>
> {{In Hive#copyFiles}} we have such code
> {code:java}
> if (src.isDirectory()) {
> try {
> files = srcFs.listStatus(src.getPath(), FileUtils.HIDDEN_FILES_PATH_FILTER);
> } catch (IOException e) {
> pool.shutdownNow();
> throw new HiveException(e);
> }
> }
> {code}
> If pool is null we will get NPE and actual cause will be lost.
> Initializing of pool
> {code:java}
> final ExecutorService pool = conf.getInt(ConfVars.HIVE_MOVE_FILES_THREAD_COUNT.varname, 25) > 0 ?
> Executors.newFixedThreadPool(conf.getInt(ConfVars.HIVE_MOVE_FILES_THREAD_COUNT.varname, 25),
> new ThreadFactoryBuilder().setDaemon(true).setNameFormat("Move-Thread-%d").build()) : null;
> {code}
> So in the case when the pool is not created we can get potential NPE and swallow an actual exception
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)