简体   繁体   English

Gemfire - 如何限制/限制区域的 OQL 查询

[英]Gemfire - How to restrict/limit OQL queries for a region

Some users are executing OQL for regions that are triggering out of memory errors in a huge region.一些用户正在为在巨大区域中触发内存不足错误的区域执行 OQL。 Sorting a query alone triggers an out of memory error.单独对查询进行排序会触发内存不足错误。

Is there any configuration to weather restrict the memory footprint or forbid queries for a specific region?是否有任何配置可以限制内存占用或禁止对特定区域的查询?

As far as I know, there are not specific ways to restrict memory consumption only for queries.据我所知,没有特定的方法来限制仅用于查询的内存消耗。

There are, however, other options that you can use to make the cluster more resilient to these situations (aside from the obvious one: educate your users to not execute things like SELECT * on huge regions):但是,您可以使用其他选项来使集群对这些情况更具弹性(除了显而易见的选项:教育您的用户不要在大区域上执行SELECT *操作):

  1. Configure the Geode Resource Manager , which allows Geode to automatically cancel running queries whenever the memory is above a pre-configured threshold (see here ).配置Geode Resource Manager ,它允许 Geode 在内存高于预先配置的阈值时自动取消正在运行的查询(请参阅此处)。
  2. Deploy a custom SecurityManager for authentication and authorization, and assign DATA:READ:RegionName permissions sparingly to your users.部署用于身份验证和授权的自定义SecurityManager ,并谨慎地为您的用户分配DATA:READ:RegionName权限。 When security is enabled, users trying to execute OQL queries against a particular RegionName are required to have the DATA:READ:RegionName ResourcePermission assigned, so you can decide before hand to whom give this privileges.启用安全性后,尝试针对特定RegionName执行OQL查询的用户需要分配DATA:READ:RegionName ResourcePermission ,因此您可以事先决定向谁授予此权限。 More details here .更多细节在这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM