[ https://issues.apache.org/jira/browse/IMPALA-8792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16892978#comment-16892978 ]
Tim Armstrong commented on IMPALA-8792: --------------------------------------- I was thinking that this would be a more generic extension mechanism. I can imagine us having a plugin interface that calls into a user-provided JAR with some information about the query. We'd need to think carefully about the information provided so that it was future-proof, e.g. providing the full AST is risk because our internal data structures might change. I've personally been mostly opposed to adding predefined rejection rules based on compile-time information, e.g. "reject based on estimated bytes scanned" because of the false positive/negative problem - queries get rejected because of a bad estimate or threshold and there's no workaround except for completely disabling the rule. IMPALA-6032 has a couple of proposals like that, and we've looked at them enough to know that they're hard to do in a robust way. If we have a generic extension mechanism then users are at least empowered to fix that themselves. Or at least users will be aware of the potential to shoot themselves in a foot if they are doing something that feels advanced like writing a plugin instead of configuring a builtin option. > User Defined Admission Rules > ---------------------------- > > Key: IMPALA-8792 > URL: https://issues.apache.org/jira/browse/IMPALA-8792 > Project: IMPALA > Issue Type: New Feature > Reporter: Quanlong Huang > Priority: Major > > Impala cluster may be shared by many products. Admin may want to ban some > queries as a work around for some bugs or known limitations, to avoid > problematic queries impact the whole cluster. > The rules can base on user names, query text, AST after parsing, or the plan > after analysis. It'd be better if admin can add/delete/modify rules without > restarting the coordinators. > Example rules: > * Ban all queries submitted from user idiot_product_name > * Ban all queries containing text "application-name=xxx" (usually added as > hint, used to recognize a product) > * Ban all queries with text length larger than a threshold > * Ban all queries that joins more than 20 tables (require AST) > * Ban all queries that joins two specify fact tables (require AST) > * Ban all queries using specify wrong join path (require AST) > * Ban all queries that contain too complex expressions, e.g. #nodes in the > expression tree exceeding a threshold (require AST) > -- This message was sent by Atlassian JIRA (v7.6.14#76016) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org For additional commands, e-mail: issues-all-h...@impala.apache.org