[
https://issues.apache.org/jira/browse/RANGER-3390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17412345#comment-17412345
]
caozhiqiang edited comment on RANGER-3390 at 9/9/21, 6:06 AM:
--------------------------------------------------------------
[~bpatel] Thank you for your help.If ES add other resources like shard, we
would get the shard value use
Objects.toString(super.getValue(ElasticsearchResourceMgr.SHARD)) and append it
to INDEX.
Further, we could add a variable in class RangerElasticsearchResource and
RangerYarnResource to save the resource value like below.
{code:java}
class RangerElasticsearchResource extends RangerAccessResourceImpl {
private String index;
public RangerElasticsearchResource(String index) {
if (StringUtils.isEmpty(index)) {
index = "*";
}
setValue(ElasticsearchResourceMgr.INDEX, index);
this.index = index
}
@Override
public String getAsString() {
String ret = super.getStringifiedValue();
if (ret == null) {
ret = index;
super.setStringifiedValue(ret);
}
return ret;
}
}
{code}
I am not sure what's the mean to update RR description with Jira ID, could you
give me more explain? And I have add a review request in
[https://reviews.apache.org/r/73560/] , thank you.
was (Author: caozhiqiang):
If ES add other resources like shard, we would get the shard value use
Objects.toString(super.getValue(ElasticsearchResourceMgr.SHARD)) and append it
to INDEX.
> improve plugin performance for yarn and es by replacing getAsString
> -------------------------------------------------------------------
>
> Key: RANGER-3390
> URL: https://issues.apache.org/jira/browse/RANGER-3390
> Project: Ranger
> Issue Type: Improvement
> Components: plugins
> Affects Versions: 2.0.1
> Reporter: caozhiqiang
> Assignee: caozhiqiang
> Priority: Major
> Attachments: RANGER-3390-branch-2.0.1.001.patch
>
>
> The
> org/apache/ranger/plugin/policyengine/RangerAccessResourceImpl.getAsString
> function take too much time. We should replace it to improve performance for
> Yarn and ES.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)