You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Chen He (Jira)" <ji...@apache.org> on 2022/04/15 02:51:00 UTC

[jira] [Commented] (HIVE-26140) Hive reports IndexOutOfBoundsException when access a database mapped to HBase

    [ https://issues.apache.org/jira/browse/HIVE-26140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17522623#comment-17522623 ] 

Chen He commented on HIVE-26140:
--------------------------------

 
{code:java}
if (!hasResources) {
        String[] skipFilesFromConf = DagUtils.getTempFilesFromConf(conf);
        newResources = utils.localizeTempFiles(dir, conf, newFilesNotFromConf, skipFilesFromConf);
        if (newResources != null) {
          resources.localizedResources.addAll(newResources);
        }
        for (int i=0;i<newFilesNotFromConf.length;i++) {
          resources.additionalFilesNotFromConf.put(newFilesNotFromConf[i], newResources.get(i));
        }
      } else {
        resources.localizedResources.addAll(resources.additionalFilesNotFromConf.values());
      } {code}
We can see there is a bug. It iterates the newFileNotFromConf but did not check "newResources" length and directly call "newResources.get(i)". 

> Hive reports IndexOutOfBoundsException when access a database mapped to HBase
> -----------------------------------------------------------------------------
>
>                 Key: HIVE-26140
>                 URL: https://issues.apache.org/jira/browse/HIVE-26140
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>    Affects Versions: 3.1.2
>            Reporter: Chen He
>            Priority: Major
>              Labels: HBase, hive, tez
>
> ```
> 2022-04-14 02:44:26,587 ERROR [c50cc557-0b28-4d31-80e9-8eae45cd1499 main] exec.Task: Failed to execute tez graph.
> java.lang.IndexOutOfBoundsException: Index: 12, Size: 12
>     at java.util.ArrayList.rangeCheck(ArrayList.java:659)
>     at java.util.ArrayList.get(ArrayList.java:435)
>     at org.apache.hadoop.hive.ql.exec.tez.TezSessionState.ensureLocalResources(TezSessionState.java:634)
>     at org.apache.hadoop.hive.ql.exec.tez.TezTask.ensureSessionHasResources(TezTask.java:371)
>     at org.apache.hadoop.hive.ql.exec.tez.TezTask.execute(TezTask.java:195)
>     at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:205)
>     at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:97)
>     at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:2664)
>     at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:2335)
>     at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:2011)
>     at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1709)
>     at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1703)
>     at org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:157)
>     at org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:218)
>     at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:239)
>     at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:188)
>     at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:402)
>     at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:821)
>     at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:759)
>     at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:683)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:498)
>     at org.apache.hadoop.util.RunJar.run(RunJar.java:323)
>     at org.apache.hadoop.util.RunJar.main(RunJar.java:236)



--
This message was sent by Atlassian Jira
(v8.20.1#820001)