[
https://issues.apache.org/jira/browse/HIVE-4000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13578922#comment-13578922
]
Ashutosh Chauhan commented on HIVE-4000:
----------------------------------------
Many tests are resulting in NPE because we switched to ConcurrentHashMaps which
don't allow null keys (as oppose to HashMaps). Stacktrace:
{noformat}
] java.lang.NullPointerException
[junit] at
java.util.concurrent.ConcurrentHashMap.containsKey(ConcurrentHashMap.java:782)
[junit] at
java.util.Collections$SetFromMap.contains(Collections.java:3574)
[junit] at
org.apache.hadoop.hive.ql.QueryPlan.extractCounters(QueryPlan.java:364)
[junit] at
org.apache.hadoop.hive.ql.QueryPlan.getQueryPlan(QueryPlan.java:444)
[junit] at
org.apache.hadoop.hive.ql.QueryPlan.toString(QueryPlan.java:617)
[junit] at
org.apache.hadoop.hive.ql.history.HiveHistory.logPlanProgress(HiveHistory.java:503)
[junit] at
org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:147)
[junit] at
org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:57)
[junit] at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1343)
[junit] at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1129)
[junit] at org.apache.hadoop.hive.ql.Driver.run(Driver.java:940)
[junit] at
org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:259)
[junit] at
org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:216)
[junit] at
org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:413)
[junit] at
org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:348)
[junit] at
org.apache.hadoop.hive.ql.QTestUtil.executeClient(QTestUtil.java:774)
[junit] at
org.apache.hadoop.hive.cli.TestCliDriver.runTest(TestCliDriver.java:5759)
[junit] at
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_database_drop(TestCliDriver.java:1923)
{noformat}
Seems like we can fix this by modifying QueryPlan.java:364 to:
{code}
if (task.getId() != null && started.contains(task.getId()) &&
done.contains(task.getId())) {
continue;
}
{code}
> Hive client goes into infinite loop at 100% cpu
> -----------------------------------------------
>
> Key: HIVE-4000
> URL: https://issues.apache.org/jira/browse/HIVE-4000
> Project: Hive
> Issue Type: Bug
> Affects Versions: 0.9.0
> Reporter: Owen O'Malley
> Assignee: Owen O'Malley
> Fix For: 0.10.1
>
> Attachments: HIVE-4000.D8493.1.patch
>
>
> The Hive client starts multiple threads to track the progress of the
> MapReduce jobs. Unfortunately those threads access several static HashMaps
> that are not protected by locks. When the HashMaps are modified, they
> sometimes cause race conditions that lead to the client threads getting stuck
> in infinite loops.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira