[Bug] linkis-application-manager's RMUtils class has a logic bug

Open Beginner friendly
#4,974 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
86/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
java
Domain
backend

Research direction

Start in linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/java/org/apache/linkis/manager/rm/utils/RMUtils.java around line 130 and read RMUtils.toUserResourceVo. Verify the resource fields it returns against the issue’s expected maximum and usage values, then run the relevant application-manager tests. Done means maxResource reports the maximum resource correctly without breaking the usage information.

Written by the indexing model from the issue text.

Description

bug
Search before asking
  • I searched the issues and found no similar issues.
Linkis Component

linkis-computation-governance

Steps to reproduce

1、开发一个linkis引擎资源监控接口
2、底层使用了linkis-application-manager模块的RMUtils类的toUserResourceVo方法获取资源信息
3、返回的资源信息中maxResource节点信息错误

Expected behavior

RMUtils.toUserResourceVo方法能够正确返回资源的最大值、使用量

Your environment
  • Linkis version used: release-1.4.0
Anything else

linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/java/org/apache/linkis/manager/rm/utils/RMUtils.java类的130行错误的将minResource 设置到了userResourceVo的maxResource 属性中

Resource minResource = userResource.getMinResource(); if (minResource != null) { userResourceVo.setMaxResource( ResourceUtils.parse( ResourceUtils.toJSONString(minResource), new TypeReference<HashMap<String, Object>>() {})); }

Are you willing to submit a PR?
  • Yes I am willing to submit a PR!
Dominant language
Java
Stars
3.4k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/linkis

All issues in apache/linkis

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.