Skip to content

Commit 93987a4

Browse files
authored
Merge pull request #186100 from kcheeeung/kcfix
Hive view doc update
2 parents 5a6815e + 8b16a67 commit 93987a4

File tree

1 file changed

+53
-27
lines changed

1 file changed

+53
-27
lines changed

articles/hdinsight/interactive-query/interactive-query-troubleshoot-view-time-out.md

Lines changed: 53 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,50 @@ title: Apache Hive View times out from query result - Azure HDInsight
33
description: Apache Hive View times out when fetching a query result in Azure HDInsight
44
ms.service: hdinsight
55
ms.topic: troubleshooting
6-
ms.date: 07/30/2019
6+
ms.date: 02/11/2022
77
---
88

99
# Scenario: Apache Hive View times out when fetching a query result in Azure HDInsight
1010

11-
This article describes troubleshooting steps and possible resolutions for issues when using Interactive Query components in Azure HDInsight clusters.
11+
This article describes troubleshooting steps and possible resolutions for issues when using Interactive Query components in Azure HDInsight clusters. The default timeout was 1 minute in HDI 3.6 and HDI 4.0 clusters.
1212

1313
## Issue
1414

1515
When running certain queries from the Apache Hive view, the following error may be encountered:
1616

1717
```
18-
Result fetch timed out
18+
ERROR [ambari-client-thread-1] [HIVE 2.0.0 AUTO_HIVE20_INSTANCE] NonPersistentCursor:131 - Result fetch timed out
19+
java.util.concurrent.TimeoutException: deadline passed
20+
at akka.actor.dsl.Inbox$InboxActor$$anonfun$receive$1.applyOrElse(Inbox.scala:117)
21+
at scala.PartialFunction$AndThen.applyOrElse(PartialFunction.scala:189)
22+
at akka.actor.Actor$class.aroundReceive(Actor.scala:467)
23+
at akka.actor.dsl.Inbox$InboxActor.aroundReceive(Inbox.scala:62)
24+
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516)
25+
at akka.actor.ActorCell.invoke(ActorCell.scala:487)
26+
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238)
27+
at akka.dispatch.Mailbox.run(Mailbox.scala:220)
28+
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:397)
29+
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
30+
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
31+
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
32+
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
33+
ERROR [ambari-client-thread-1] [HIVE 2.0.0 AUTO_HIVE20_INSTANCE] ServiceFormattedException:97 - Result fetch timed out
34+
ERROR [ambari-client-thread-1] [HIVE 2.0.0 AUTO_HIVE20_INSTANCE] ServiceFormattedException:98 - java.util.concurrent.TimeoutException: deadline passed
1935
2036
java.util.concurrent.TimeoutException: deadline passed
21-
at akka.actor.dsl.Inbox$InboxActor$$anonfun$receive$1.applyOrElse(Inbox.scala:117)
22-
at scala.PartialFunction$AndThen.applyOrElse(PartialFunction.scala:189)
23-
at akka.actor.Actor$class.aroundReceive(Actor.scala:467)
24-
at akka.actor.dsl.Inbox$InboxActor.aroundReceive(Inbox.scala:62)
25-
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516)
26-
at akka.actor.ActorCell.invoke(ActorCell.scala:487)
27-
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238)
28-
at akka.dispatch.Mailbox.run(Mailbox.scala:220)
29-
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:397)
30-
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
31-
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
32-
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
33-
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
37+
at akka.actor.dsl.Inbox$InboxActor$$anonfun$receive$1.applyOrElse(Inbox.scala:117)
38+
at scala.PartialFunction$AndThen.applyOrElse(PartialFunction.scala:189)
39+
at akka.actor.Actor$class.aroundReceive(Actor.scala:467)
40+
at akka.actor.dsl.Inbox$InboxActor.aroundReceive(Inbox.scala:62)
41+
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516)
42+
at akka.actor.ActorCell.invoke(ActorCell.scala:487)
43+
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238)
44+
at akka.dispatch.Mailbox.run(Mailbox.scala:220)
45+
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:397)
46+
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
47+
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
48+
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
49+
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
3450
```
3551

3652
## Cause
@@ -40,17 +56,27 @@ The Hive View default timeout value may not be suitable for the query you are ru
4056
## Resolution
4157

4258
1. Increase the Apache Ambari Hive View timeouts by setting the following properties in `/etc/ambari-server/conf/ambari.properties` for **both headnodes**.
43-
```
44-
views.ambari.request.read.timeout.millis=300000
45-
views.request.read.timeout.millis=300000
46-
views.ambari.hive.<HIVE_VIEW_INSTANCE_NAME>.result.fetch.timeout=300000
47-
```
48-
The value of `HIVE_VIEW_INSTANCE_NAME` is available by clicking YOUR_USERNAME > Manage Ambari > Views > Names column. Do not use the URL name.
49-
50-
2. Restart the active Ambari server by running the following. If you get an error message saying it's not the active Ambari server, just ssh into the next headnode and repeat this step.
51-
```
52-
sudo ambari-server restart
53-
```
59+
```
60+
views.ambari.hive.AUTO_HIVE20_INSTANCE.result.fetch.timeout=300000
61+
```
62+
Confirm the Hive View instance name `AUTO_HIVE20_INSTANCE` by going to YOUR_USERNAME > Manage Ambari > Views. Get the instance name from the Name column. If it doesn't match, then replace this value. **Do not use the URL Name column**.
63+
64+
2. Restart the active Ambari server by running the following. If you get an error message saying it's not the active Ambari server, just ssh into the next headnode and repeat this step. Note down the PID of the current Ambari server process.
65+
```
66+
sudo ambari-server status
67+
sudo systemctl restart ambari-server
68+
```
69+
3. Confirm Ambari server actually restarted. If you followed the steps, you will notice the PID has changed.
70+
```
71+
sudo ambari-server status
72+
```
73+
74+
## Notes
75+
If you get a 502 error, then that is coming from the HDI gateway. You can confirm by opening web inspector, go to network tab, then re-submit query. You'll see a request fail, returning a 502 status code, and the time will show 2 mins elapsed.
76+
77+
The query is not suited for Hive View. It is recommended that you either try the following instead:
78+
- Use beeline
79+
- Re-write the query to be more optimal
5480

5581
## Next steps
5682

0 commit comments

Comments
 (0)