You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Stamatis Zampetakis (Jira)" <ji...@apache.org> on 2020/09/29 20:59:00 UTC
[jira] [Commented] (HIVE-24206) DefaultGraphWalker IdentityHashMap
causes thread idling
[ https://issues.apache.org/jira/browse/HIVE-24206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17204287#comment-17204287 ]
Stamatis Zampetakis commented on HIVE-24206:
--------------------------------------------
Do you have some profiler snapshots to attach to this issue? Have you tried reproducing the problem with current apache master?
It seems a bit related to HIVE-24031.
> DefaultGraphWalker IdentityHashMap causes thread idling
> -------------------------------------------------------
>
> Key: HIVE-24206
> URL: https://issues.apache.org/jira/browse/HIVE-24206
> Project: Hive
> Issue Type: Bug
> Components: Parser
> Affects Versions: 2.3.4
> Reporter: Zhou
> Priority: Major
>
> the sql is very long,about 3M size,use hive parse to parse the sql, it costs more than one hour to finish it. The reason is hive parse use IdentityHashMap, is not multi-thread safe, than it costs more than one hour to execute the code "while(true)"
>
> my code is :
> ParseDriver pd = new ParseDriver();
> ASTNode tree = pd.parse(query, context);
> while ((tree.getToken() == null) && (tree.getChildCount() > 0))
> { tree = (ASTNode) tree.getChild(0); }
> Map<Rule, NodeProcessor> rules = new LinkedHashMap<>();
> Dispatcher disp = new DefaultRuleDispatcher(this, rules, null);
> GraphWalker ogw = new DefaultGraphWalker(disp);
> List<Node> topNodes = new ArrayList<>();
> topNodes.add(tree);
> ogw.startWalking(topNodes, null);
--
This message was sent by Atlassian Jira
(v8.3.4#803005)